@vibesdotdev/plugins 0.0.0-stage → 1.0.0-rc.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/LICENSE +18 -0
- package/README.md +54 -2
- package/VIBES.md +165 -0
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +3 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/plugin.impl.cloud.d.ts +4 -0
- package/dist/ai/plugin.impl.cloud.d.ts.map +1 -0
- package/dist/ai/plugin.impl.cloud.js +32 -0
- package/dist/ai/plugin.impl.cloud.js.map +1 -0
- package/dist/ai/plugin.impl.consumer.d.ts +7 -0
- package/dist/ai/plugin.impl.consumer.d.ts.map +1 -0
- package/dist/ai/plugin.impl.consumer.js +222 -0
- package/dist/ai/plugin.impl.consumer.js.map +1 -0
- package/dist/auth/consumer.plugin.d.ts +3 -0
- package/dist/auth/consumer.plugin.d.ts.map +1 -0
- package/dist/auth/consumer.plugin.js +105 -0
- package/dist/auth/consumer.plugin.js.map +1 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +2 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/plugin.d.ts +4 -0
- package/dist/auth/plugin.d.ts.map +1 -0
- package/dist/auth/plugin.js +33 -0
- package/dist/auth/plugin.js.map +1 -0
- package/dist/automation/consumer.plugin.d.ts +3 -0
- package/dist/automation/consumer.plugin.d.ts.map +1 -0
- package/dist/automation/consumer.plugin.js +92 -0
- package/dist/automation/consumer.plugin.js.map +1 -0
- package/dist/automation/index.d.ts +2 -0
- package/dist/automation/index.d.ts.map +1 -0
- package/dist/automation/index.js +2 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/automation/plugin.d.ts +4 -0
- package/dist/automation/plugin.d.ts.map +1 -0
- package/dist/automation/plugin.js +30 -0
- package/dist/automation/plugin.js.map +1 -0
- package/dist/bun/host.d.ts +44 -0
- package/dist/bun/host.d.ts.map +1 -0
- package/dist/bun/host.js +71 -0
- package/dist/bun/host.js.map +1 -0
- package/dist/cli/child-failure.d.ts +37 -0
- package/dist/cli/child-failure.d.ts.map +1 -0
- package/dist/cli/child-failure.js +86 -0
- package/dist/cli/child-failure.js.map +1 -0
- package/dist/cli/context.d.ts +12 -0
- package/dist/cli/context.d.ts.map +1 -0
- package/dist/cli/context.js +11 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/execution.d.ts +10 -0
- package/dist/cli/execution.d.ts.map +1 -0
- package/dist/cli/execution.js +20 -0
- package/dist/cli/execution.js.map +1 -0
- package/dist/cli/failure-facts.d.ts +16 -0
- package/dist/cli/failure-facts.d.ts.map +1 -0
- package/dist/cli/failure-facts.js +39 -0
- package/dist/cli/failure-facts.js.map +1 -0
- package/dist/cli/package-manager.consumer.d.ts +106 -0
- package/dist/cli/package-manager.consumer.d.ts.map +1 -0
- package/dist/cli/package-manager.consumer.js +258 -0
- package/dist/cli/package-manager.consumer.js.map +1 -0
- package/dist/cli/plugin.d.ts +9 -0
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +34 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/plugins.add.cli-command.descriptor.d.ts +36 -0
- package/dist/cli/plugins.add.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/plugins.add.cli-command.descriptor.js +31 -0
- package/dist/cli/plugins.add.cli-command.descriptor.js.map +1 -0
- package/dist/cli/plugins.add.cli-command.impl.consumer.d.ts +63 -0
- package/dist/cli/plugins.add.cli-command.impl.consumer.d.ts.map +1 -0
- package/dist/cli/plugins.add.cli-command.impl.consumer.js +206 -0
- package/dist/cli/plugins.add.cli-command.impl.consumer.js.map +1 -0
- package/dist/cli/plugins.cli-group.descriptor.d.ts +4 -0
- package/dist/cli/plugins.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/plugins.cli-group.descriptor.js +10 -0
- package/dist/cli/plugins.cli-group.descriptor.js.map +1 -0
- package/dist/cli/plugins.host.cli-command.descriptor.d.ts +31 -0
- package/dist/cli/plugins.host.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/plugins.host.cli-command.descriptor.js +37 -0
- package/dist/cli/plugins.host.cli-command.descriptor.js.map +1 -0
- package/dist/cli/plugins.host.cli-command.impl.consumer.d.ts +29 -0
- package/dist/cli/plugins.host.cli-command.impl.consumer.d.ts.map +1 -0
- package/dist/cli/plugins.host.cli-command.impl.consumer.js +109 -0
- package/dist/cli/plugins.host.cli-command.impl.consumer.js.map +1 -0
- package/dist/cli/plugins.link.cli-command.descriptor.d.ts +35 -0
- package/dist/cli/plugins.link.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/plugins.link.cli-command.descriptor.js +32 -0
- package/dist/cli/plugins.link.cli-command.descriptor.js.map +1 -0
- package/dist/cli/plugins.link.cli-command.impl.consumer.d.ts +31 -0
- package/dist/cli/plugins.link.cli-command.impl.consumer.d.ts.map +1 -0
- package/dist/cli/plugins.link.cli-command.impl.consumer.js +104 -0
- package/dist/cli/plugins.link.cli-command.impl.consumer.js.map +1 -0
- package/dist/cli/plugins.list.cli-command.descriptor.d.ts +26 -0
- package/dist/cli/plugins.list.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/plugins.list.cli-command.descriptor.js +22 -0
- package/dist/cli/plugins.list.cli-command.descriptor.js.map +1 -0
- package/dist/cli/plugins.list.cli-command.impl.consumer.d.ts +116 -0
- package/dist/cli/plugins.list.cli-command.impl.consumer.d.ts.map +1 -0
- package/dist/cli/plugins.list.cli-command.impl.consumer.js +343 -0
- package/dist/cli/plugins.list.cli-command.impl.consumer.js.map +1 -0
- package/dist/cli/plugins.remove.cli-command.descriptor.d.ts +31 -0
- package/dist/cli/plugins.remove.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/plugins.remove.cli-command.descriptor.js +26 -0
- package/dist/cli/plugins.remove.cli-command.descriptor.js.map +1 -0
- package/dist/cli/plugins.remove.cli-command.impl.consumer.d.ts +30 -0
- package/dist/cli/plugins.remove.cli-command.impl.consumer.d.ts.map +1 -0
- package/dist/cli/plugins.remove.cli-command.impl.consumer.js +80 -0
- package/dist/cli/plugins.remove.cli-command.impl.consumer.js.map +1 -0
- package/dist/cli/plugins.unlink.cli-command.descriptor.d.ts +31 -0
- package/dist/cli/plugins.unlink.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/plugins.unlink.cli-command.descriptor.js +21 -0
- package/dist/cli/plugins.unlink.cli-command.descriptor.js.map +1 -0
- package/dist/cli/plugins.unlink.cli-command.impl.consumer.d.ts +76 -0
- package/dist/cli/plugins.unlink.cli-command.impl.consumer.d.ts.map +1 -0
- package/dist/cli/plugins.unlink.cli-command.impl.consumer.js +190 -0
- package/dist/cli/plugins.unlink.cli-command.impl.consumer.js.map +1 -0
- package/dist/cli/registry-sign-in.consumer.d.ts +80 -0
- package/dist/cli/registry-sign-in.consumer.d.ts.map +1 -0
- package/dist/cli/registry-sign-in.consumer.js +199 -0
- package/dist/cli/registry-sign-in.consumer.js.map +1 -0
- package/dist/cli/roll.d.ts +230 -0
- package/dist/cli/roll.d.ts.map +1 -0
- package/dist/cli/roll.js +569 -0
- package/dist/cli/roll.js.map +1 -0
- package/dist/cli/schemas/context.d.ts +10 -0
- package/dist/cli/schemas/context.d.ts.map +1 -0
- package/dist/cli/schemas/context.js +3 -0
- package/dist/cli/schemas/context.js.map +1 -0
- package/dist/cli/schemas/scopes.d.ts +37 -0
- package/dist/cli/schemas/scopes.d.ts.map +1 -0
- package/dist/cli/schemas/scopes.js +11 -0
- package/dist/cli/schemas/scopes.js.map +1 -0
- package/dist/cli/schemas/unlink.d.ts +18 -0
- package/dist/cli/schemas/unlink.d.ts.map +1 -0
- package/dist/cli/schemas/unlink.js +3 -0
- package/dist/cli/schemas/unlink.js.map +1 -0
- package/dist/cli/schemas/update.d.ts +77 -0
- package/dist/cli/schemas/update.d.ts.map +1 -0
- package/dist/cli/schemas/update.js +3 -0
- package/dist/cli/schemas/update.js.map +1 -0
- package/dist/cli/scopes.d.ts +50 -0
- package/dist/cli/scopes.d.ts.map +1 -0
- package/dist/cli/scopes.js +90 -0
- package/dist/cli/scopes.js.map +1 -0
- package/dist/cli/seed.d.ts +232 -0
- package/dist/cli/seed.d.ts.map +1 -0
- package/dist/cli/seed.js +590 -0
- package/dist/cli/seed.js.map +1 -0
- package/dist/cli/self-update.d.ts +120 -0
- package/dist/cli/self-update.d.ts.map +1 -0
- package/dist/cli/self-update.js +274 -0
- package/dist/cli/self-update.js.map +1 -0
- package/dist/cli/update.cli-command.descriptor.d.ts +62 -0
- package/dist/cli/update.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/update.cli-command.descriptor.js +49 -0
- package/dist/cli/update.cli-command.descriptor.js.map +1 -0
- package/dist/cli/update.cli-command.impl.consumer.d.ts +178 -0
- package/dist/cli/update.cli-command.impl.consumer.d.ts.map +1 -0
- package/dist/cli/update.cli-command.impl.consumer.js +750 -0
- package/dist/cli/update.cli-command.impl.consumer.js.map +1 -0
- package/dist/comms/consumer.plugin.d.ts +3 -0
- package/dist/comms/consumer.plugin.d.ts.map +1 -0
- package/dist/comms/consumer.plugin.js +108 -0
- package/dist/comms/consumer.plugin.js.map +1 -0
- package/dist/comms/index.d.ts +2 -0
- package/dist/comms/index.d.ts.map +1 -0
- package/dist/comms/index.js +2 -0
- package/dist/comms/index.js.map +1 -0
- package/dist/comms/plugin.d.ts +4 -0
- package/dist/comms/plugin.d.ts.map +1 -0
- package/dist/comms/plugin.js +30 -0
- package/dist/comms/plugin.js.map +1 -0
- package/dist/consumer.d.ts +3 -0
- package/dist/consumer.d.ts.map +1 -0
- package/dist/consumer.js +3 -0
- package/dist/consumer.js.map +1 -0
- package/dist/consumer.plugin.d.ts +63 -0
- package/dist/consumer.plugin.d.ts.map +1 -0
- package/dist/consumer.plugin.js +89 -0
- package/dist/consumer.plugin.js.map +1 -0
- package/dist/core/consumer.plugin.d.ts +4 -0
- package/dist/core/consumer.plugin.d.ts.map +1 -0
- package/dist/core/consumer.plugin.js +358 -0
- package/dist/core/consumer.plugin.js.map +1 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +2 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/optional-member.d.ts +11 -0
- package/dist/core/optional-member.d.ts.map +1 -0
- package/dist/core/optional-member.js +68 -0
- package/dist/core/optional-member.js.map +1 -0
- package/dist/core/optional-plugin.d.ts +40 -0
- package/dist/core/optional-plugin.d.ts.map +1 -0
- package/dist/core/optional-plugin.js +107 -0
- package/dist/core/optional-plugin.js.map +1 -0
- package/dist/core/plugin.d.ts +10 -0
- package/dist/core/plugin.d.ts.map +1 -0
- package/dist/core/plugin.js +64 -0
- package/dist/core/plugin.js.map +1 -0
- package/dist/core/setup-requirements.descriptors.d.ts +7 -0
- package/dist/core/setup-requirements.descriptors.d.ts.map +1 -0
- package/dist/core/setup-requirements.descriptors.js +117 -0
- package/dist/core/setup-requirements.descriptors.js.map +1 -0
- package/dist/data/consumer.plugin.d.ts +3 -0
- package/dist/data/consumer.plugin.d.ts.map +1 -0
- package/dist/data/consumer.plugin.js +99 -0
- package/dist/data/consumer.plugin.js.map +1 -0
- package/dist/data/index.d.ts +2 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +2 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/plugin.d.ts +4 -0
- package/dist/data/plugin.d.ts.map +1 -0
- package/dist/data/plugin.js +37 -0
- package/dist/data/plugin.js.map +1 -0
- package/dist/devtools/consumer.plugin.d.ts +3 -0
- package/dist/devtools/consumer.plugin.d.ts.map +1 -0
- package/dist/devtools/consumer.plugin.js +323 -0
- package/dist/devtools/consumer.plugin.js.map +1 -0
- package/dist/devtools/index.d.ts +2 -0
- package/dist/devtools/index.d.ts.map +1 -0
- package/dist/devtools/index.js +2 -0
- package/dist/devtools/index.js.map +1 -0
- package/dist/devtools/plugin.d.ts +4 -0
- package/dist/devtools/plugin.d.ts.map +1 -0
- package/dist/devtools/plugin.js +34 -0
- package/dist/devtools/plugin.js.map +1 -0
- package/dist/filesystem/index.d.ts +2 -0
- package/dist/filesystem/index.d.ts.map +1 -0
- package/dist/filesystem/index.js +2 -0
- package/dist/filesystem/index.js.map +1 -0
- package/dist/filesystem/plugin.d.ts +4 -0
- package/dist/filesystem/plugin.d.ts.map +1 -0
- package/dist/filesystem/plugin.js +21 -0
- package/dist/filesystem/plugin.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +7 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +16 -0
- package/dist/plugin.js.map +1 -0
- package/dist/schemas/ai.d.ts +119 -0
- package/dist/schemas/ai.d.ts.map +1 -0
- package/dist/schemas/ai.js +84 -0
- package/dist/schemas/ai.js.map +1 -0
- package/dist/schemas/auth.d.ts +15 -0
- package/dist/schemas/auth.d.ts.map +1 -0
- package/dist/schemas/auth.js +19 -0
- package/dist/schemas/auth.js.map +1 -0
- package/dist/schemas/automation.d.ts +66 -0
- package/dist/schemas/automation.d.ts.map +1 -0
- package/dist/schemas/automation.js +36 -0
- package/dist/schemas/automation.js.map +1 -0
- package/dist/schemas/comms.d.ts +13 -0
- package/dist/schemas/comms.d.ts.map +1 -0
- package/dist/schemas/comms.js +27 -0
- package/dist/schemas/comms.js.map +1 -0
- package/dist/schemas/core.d.ts +102 -0
- package/dist/schemas/core.d.ts.map +1 -0
- package/dist/schemas/core.js +124 -0
- package/dist/schemas/core.js.map +1 -0
- package/dist/schemas/data.d.ts +13 -0
- package/dist/schemas/data.d.ts.map +1 -0
- package/dist/schemas/data.js +25 -0
- package/dist/schemas/data.js.map +1 -0
- package/dist/schemas/devtools.d.ts +33 -0
- package/dist/schemas/devtools.d.ts.map +1 -0
- package/dist/schemas/devtools.js +56 -0
- package/dist/schemas/devtools.js.map +1 -0
- package/dist/schemas/family.d.ts +11 -0
- package/dist/schemas/family.d.ts.map +1 -0
- package/dist/schemas/family.js +21 -0
- package/dist/schemas/family.js.map +1 -0
- package/dist/schemas/filesystem.d.ts +25 -0
- package/dist/schemas/filesystem.d.ts.map +1 -0
- package/dist/schemas/filesystem.js +24 -0
- package/dist/schemas/filesystem.js.map +1 -0
- package/dist/schemas/host.d.ts +10 -0
- package/dist/schemas/host.d.ts.map +1 -0
- package/dist/schemas/host.js +2 -0
- package/dist/schemas/host.js.map +1 -0
- package/dist/schemas/optional-member.d.ts +67 -0
- package/dist/schemas/optional-member.d.ts.map +1 -0
- package/dist/schemas/optional-member.js +31 -0
- package/dist/schemas/optional-member.js.map +1 -0
- package/dist/schemas/roll.d.ts +47 -0
- package/dist/schemas/roll.d.ts.map +1 -0
- package/dist/schemas/roll.js +18 -0
- package/dist/schemas/roll.js.map +1 -0
- package/dist/schemas/tui.d.ts +33 -0
- package/dist/schemas/tui.d.ts.map +1 -0
- package/dist/schemas/tui.js +95 -0
- package/dist/schemas/tui.js.map +1 -0
- package/dist/schemas/ui.d.ts +15 -0
- package/dist/schemas/ui.d.ts.map +1 -0
- package/dist/schemas/ui.js +45 -0
- package/dist/schemas/ui.js.map +1 -0
- package/dist/tui/code-sessions-tui-plugin-shim.d.ts +7 -0
- package/dist/tui/code-sessions-tui-plugin-shim.d.ts.map +1 -0
- package/dist/tui/code-sessions-tui-plugin-shim.js +2 -0
- package/dist/tui/code-sessions-tui-plugin-shim.js.map +1 -0
- package/dist/tui/index.d.ts +8 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +8 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/plugin.d.ts +53 -0
- package/dist/tui/plugin.d.ts.map +1 -0
- package/dist/tui/plugin.js +350 -0
- package/dist/tui/plugin.js.map +1 -0
- package/dist/ui/consumer.plugin.d.ts +3 -0
- package/dist/ui/consumer.plugin.d.ts.map +1 -0
- package/dist/ui/consumer.plugin.js +75 -0
- package/dist/ui/consumer.plugin.js.map +1 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +2 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/plugin.d.ts +4 -0
- package/dist/ui/plugin.d.ts.map +1 -0
- package/dist/ui/plugin.js +35 -0
- package/dist/ui/plugin.js.map +1 -0
- package/host-start.mjs +39 -0
- package/host.mjs +24 -0
- package/package.json +437 -4
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { getRuntimePath } from '@vibesdotdev/paths';
|
|
2
|
+
import { PLUGIN_RESOLUTIONS_CONTEXT_ID } from '@vibesdotdev/kernel/schemas/package-plugins';
|
|
3
|
+
import { getRuntimePackagePlugins } from '@vibesdotdev/kernel';
|
|
4
|
+
import { readWorkspacePluginSurfaces, workspacePluginRows } from '@vibesdotdev/kernel/bootstrap';
|
|
5
|
+
import { z } from 'zod/v4';
|
|
6
|
+
import { PluginsCLICommand } from "./context.js";
|
|
7
|
+
import { resolveScopes } from "./scopes.js";
|
|
8
|
+
/** The command's inputs, each read on its own: a missing or non-text `--scope` is empty. */
|
|
9
|
+
const ListInputSchema = z.object({
|
|
10
|
+
scope: z.string().trim().catch('')
|
|
11
|
+
});
|
|
12
|
+
function listedScope(scope, delegatedGlobalRoot) {
|
|
13
|
+
const listed = { kind: scope.kind, root: scope.root };
|
|
14
|
+
// Named, so a reader can see WHY a global row's surface is a file
|
|
15
|
+
// under someone else's root instead of `$VIBES_HOME/package.json`.
|
|
16
|
+
if (scope.kind === 'global' && delegatedGlobalRoot)
|
|
17
|
+
listed.delegatesTo = delegatedGlobalRoot;
|
|
18
|
+
return listed;
|
|
19
|
+
}
|
|
20
|
+
function listedResolution(row) {
|
|
21
|
+
const listed = {
|
|
22
|
+
id: row.id,
|
|
23
|
+
specifier: row.specifier,
|
|
24
|
+
scope: row.scope,
|
|
25
|
+
status: row.status,
|
|
26
|
+
reason: row.reason,
|
|
27
|
+
root: row.root,
|
|
28
|
+
realpath: row.realpath,
|
|
29
|
+
linked: row.linked,
|
|
30
|
+
importMs: row.importMs
|
|
31
|
+
};
|
|
32
|
+
if (row.reason)
|
|
33
|
+
listed.reason = row.reason;
|
|
34
|
+
if (row.error)
|
|
35
|
+
listed.error = row.error;
|
|
36
|
+
return listed;
|
|
37
|
+
}
|
|
38
|
+
function packageNameOf(specifier) {
|
|
39
|
+
return specifier.startsWith('@')
|
|
40
|
+
? specifier.split('/').slice(0, 2).join('/')
|
|
41
|
+
: (specifier.split('/')[0] ?? specifier);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* DELEGATION DELEGATES THE LIST, TOO (plan §3) — the root whose own manifest
|
|
45
|
+
* supplies this process' GLOBAL list, or `null` when `$VIBES_HOME` owns it.
|
|
46
|
+
*
|
|
47
|
+
* TWO SCOPES REACH HERE, and they are the same shape: a home delegating through
|
|
48
|
+
* `vibes.hostWorkspace` (`global→hostWorkspace`), and an app BUNDLE whose CLI
|
|
49
|
+
* resolved `<dirname(realpath(execPath))>/../vibes-home` as R (`bundle`, plan
|
|
50
|
+
* §2.2 step 2c, added WU-12). In both, R is not `$VIBES_HOME`, R holds the
|
|
51
|
+
* packages, and R's manifest holds the list the loader actually composed as the
|
|
52
|
+
* global batch — so reading `$VIBES_HOME/package.json` reports an empty list
|
|
53
|
+
* for a process that is running nine umbrellas. For the bundle that is not a
|
|
54
|
+
* cosmetic gap: the user's `$VIBES_HOME` on a packaged-app machine is normally
|
|
55
|
+
* empty, so `plugins list --global` would have described a CLI that does not
|
|
56
|
+
* exist.
|
|
57
|
+
*
|
|
58
|
+
* When `$VIBES_HOME/package.json#vibes.hostWorkspace` is set the schema forces
|
|
59
|
+
* the home's own `vibes.plugins` empty (the workspace it delegates to owns the
|
|
60
|
+
* list) and the loader composes that root's list AS the global batch
|
|
61
|
+
* (`composition.consumer.ts`: `scope: host.scope === 'global→hostWorkspace' ?
|
|
62
|
+
* 'global' : 'workspace'`). Reading only `$VIBES_HOME/package.json` therefore
|
|
63
|
+
* reported `plugins: []` from a delegating home while `resolutions` listed
|
|
64
|
+
* every one of them `loaded` — the command whose whole job is to say what is
|
|
65
|
+
* installed said nothing was.
|
|
66
|
+
*
|
|
67
|
+
* R comes from the composition report, never re-derived: that is the root THIS
|
|
68
|
+
* process delegated to, established once by the host (the shim) and captured by the environment, so there is no
|
|
69
|
+
* second resolver to drift. `hostScope` is the discriminator because
|
|
70
|
+
* delegation is only IN EFFECT when the graph actually followed it — from
|
|
71
|
+
* inside a workspace, R is that workspace and the home's `hostWorkspace` key is
|
|
72
|
+
* inert for this process.
|
|
73
|
+
*
|
|
74
|
+
* Suppressed when a selected workspace scope already sits on R: that mirrors
|
|
75
|
+
* the loader's own `workspaceRoot !== host.root` guard, and reporting the rows
|
|
76
|
+
* twice would invent a second selection out of one list.
|
|
77
|
+
*/
|
|
78
|
+
export function resolveDelegatedGlobalRoot(report, scopes) {
|
|
79
|
+
if (report?.hostScope !== 'global→hostWorkspace' && report?.hostScope !== 'bundle') {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
const root = report.hostRoot;
|
|
83
|
+
if (!root)
|
|
84
|
+
return null;
|
|
85
|
+
if (scopes.some((scope) => scope.kind === 'workspace' && scope.root === root))
|
|
86
|
+
return null;
|
|
87
|
+
return root;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* `vibes plugins list` — what this host composed, and from which roots.
|
|
91
|
+
*
|
|
92
|
+
* Reports BOTH roots because they are different concepts with different
|
|
93
|
+
* readers and a user debugging composition needs to see them disagree:
|
|
94
|
+
*
|
|
95
|
+
* - `hostRoot` (R) is the module-graph root the host declared — the
|
|
96
|
+
* outermost bun root that materializes `@vibesdotdev/plugins`. It decides
|
|
97
|
+
* which framework copy runs.
|
|
98
|
+
* - `workspaceRoot` is the identity/state root (`findWorkspaceRoot`) that
|
|
99
|
+
* anchors PM socket ids, per-workspace `.vibes` state and config discovery.
|
|
100
|
+
*
|
|
101
|
+
* From a linked provider checkout they legitimately differ (`hostRoot` = the
|
|
102
|
+
* developer root that links the member, `workspaceRoot` = the member's own
|
|
103
|
+
* repository), and nothing derives one from the other.
|
|
104
|
+
*
|
|
105
|
+
* Scoping: `--global` / `--workspace`, or `--scope <kind>` — which is the form
|
|
106
|
+
* `vibes update` spawns when it verifies a scope through the shipping path.
|
|
107
|
+
* A scope selection narrows the ROWS only; the two roots and the resolution
|
|
108
|
+
* table describe the PROCESS, not a scope, and are always reported in full.
|
|
109
|
+
*
|
|
110
|
+
* Every row carries the composition `status` for its specifier when this host
|
|
111
|
+
* actually loaded it (`loaded`, `shadowed`, `missing`, `failed`, …), which is
|
|
112
|
+
* what makes `plugins list --json --scope global` a real verification instead
|
|
113
|
+
* of an echo of the manifest: `vibes update` requires every row to be `loaded`.
|
|
114
|
+
* A row this process did not compose reads `not-composed` rather than being
|
|
115
|
+
* silently omitted or reported as healthy.
|
|
116
|
+
*
|
|
117
|
+
* `plugins` IS THE HUMAN-FACING ANSWER, `resolutions` IS THE PROCESS RECORD.
|
|
118
|
+
* `plugins` is the addressable selection — one row per specifier some list
|
|
119
|
+
* declares, which is exactly the set `plugins add|remove` and `vibes update`
|
|
120
|
+
* act on — and the table printed in non-JSON mode is that same array, column
|
|
121
|
+
* for column, so the two formats cannot report different counts for one
|
|
122
|
+
* question. `resolutions` additionally carries the executable's own host floor
|
|
123
|
+
* (the repair kernel, selected by no list and removable by nobody) and the
|
|
124
|
+
* per-import realpath/linkage a doctor needs. The difference is stated in the
|
|
125
|
+
* `composed` line rather than left for a reader to discover as a discrepancy.
|
|
126
|
+
*
|
|
127
|
+
* The delegated case is the reason both had to be reconciled: from a home with
|
|
128
|
+
* `vibes.hostWorkspace`, `plugins` used to read `[]` while `resolutions`
|
|
129
|
+
* reported ten plugins `loaded` — two fields disagreeing about one fact.
|
|
130
|
+
*/
|
|
131
|
+
export default class PluginsListCLICommand extends PluginsCLICommand {
|
|
132
|
+
constructor(descriptor, context) {
|
|
133
|
+
super(descriptor, context);
|
|
134
|
+
}
|
|
135
|
+
async execute(args, options) {
|
|
136
|
+
const flags = { ...args, ...options };
|
|
137
|
+
const requestedScope = ListInputSchema.parse(flags).scope;
|
|
138
|
+
if (requestedScope && requestedScope !== 'global' && requestedScope !== 'workspace') {
|
|
139
|
+
throw new Error(`--scope must be 'global' or 'workspace' (got '${requestedScope}')`);
|
|
140
|
+
}
|
|
141
|
+
const scopes = await resolveScopes(this.runtime, requestedScope
|
|
142
|
+
? { global: requestedScope === 'global', workspace: requestedScope === 'workspace' }
|
|
143
|
+
: flags, { fallback: 'both' });
|
|
144
|
+
// A host that composed no scope lists (an app host) retains no report.
|
|
145
|
+
const report = this.runtime.hasContext(PLUGIN_RESOLUTIONS_CONTEXT_ID)
|
|
146
|
+
? await this.runtime.context(PLUGIN_RESOLUTIONS_CONTEXT_ID)
|
|
147
|
+
: null;
|
|
148
|
+
const resolutions = new Map((report?.resolutions ?? []).map((row) => [`${row.scope}:${row.specifier}`, row]));
|
|
149
|
+
const delegatedGlobalRoot = resolveDelegatedGlobalRoot(report, scopes);
|
|
150
|
+
const rows = [];
|
|
151
|
+
const shadowed = [];
|
|
152
|
+
const surfaces = [];
|
|
153
|
+
const surfacePaths = new Map();
|
|
154
|
+
const failures = [];
|
|
155
|
+
const readers = {
|
|
156
|
+
plugins: await getRuntimePackagePlugins(this.runtime),
|
|
157
|
+
paths: await getRuntimePath(this.runtime)
|
|
158
|
+
};
|
|
159
|
+
for (const scope of scopes) {
|
|
160
|
+
const read = await this.readScope(readers, scope, delegatedGlobalRoot);
|
|
161
|
+
for (const entry of read.entries) {
|
|
162
|
+
surfacePaths.set(`${scope.kind}:${entry.surface}`, entry.surfacePath);
|
|
163
|
+
rows.push({
|
|
164
|
+
scope: scope.kind,
|
|
165
|
+
plugin: entry.specifier,
|
|
166
|
+
package: entry.packageName,
|
|
167
|
+
version: entry.version ?? 'missing',
|
|
168
|
+
surface: entry.surface,
|
|
169
|
+
status: resolutions.get(`${scope.kind}:${entry.specifier}`)?.status ?? 'not-composed',
|
|
170
|
+
reason: resolutions.get(`${scope.kind}:${entry.specifier}`)?.reason
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
for (const entry of read.shadowed) {
|
|
174
|
+
shadowed.push({
|
|
175
|
+
scope: scope.kind,
|
|
176
|
+
plugin: entry.specifier,
|
|
177
|
+
package: entry.packageName,
|
|
178
|
+
surface: entry.surface,
|
|
179
|
+
surfacePath: entry.surfacePath,
|
|
180
|
+
shadowedBy: entry.shadowedBy
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
for (const surface of read.surfaces)
|
|
184
|
+
surfaces.push({ scope: scope.kind, ...surface });
|
|
185
|
+
for (const failure of read.failures)
|
|
186
|
+
failures.push({ scope: scope.kind, ...failure });
|
|
187
|
+
}
|
|
188
|
+
if (this.format === 'json') {
|
|
189
|
+
this.ui.json({
|
|
190
|
+
hostRoot: report?.hostRoot ?? null,
|
|
191
|
+
hostScope: report?.hostScope ?? null,
|
|
192
|
+
hostSource: report?.hostSource ?? null,
|
|
193
|
+
workspaceRoot: report?.workspaceRoot ?? null,
|
|
194
|
+
scopes: scopes.map((scope) => listedScope(scope, delegatedGlobalRoot)),
|
|
195
|
+
plugins: rows,
|
|
196
|
+
// SEPARATE key, deliberately. `vibes update` verifies a scope by
|
|
197
|
+
// requiring every `plugins[]` row to read `loaded`; a shadowed entry
|
|
198
|
+
// is by definition not composed, so folding it into that array would
|
|
199
|
+
// turn a redundant second declaration into a failed update. It is
|
|
200
|
+
// still REPORTED — the most specific copy wins (C8) with a shadow line — so a
|
|
201
|
+
// user can see the entries their config overrides.
|
|
202
|
+
shadowed,
|
|
203
|
+
surfaces,
|
|
204
|
+
configFailures: failures,
|
|
205
|
+
resolutions: report?.resolutions.map(listedResolution) ?? []
|
|
206
|
+
});
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (report) {
|
|
210
|
+
this.ui.info(`graph root ${report.hostRoot} [${report.hostScope}]`);
|
|
211
|
+
this.ui.info(`workspace ${report.workspaceRoot ?? '(unbound)'}`);
|
|
212
|
+
}
|
|
213
|
+
// Prefixed `scope ` so a workspace SCOPE row is not mistaken for the
|
|
214
|
+
// `workspace` identity root printed above — they are different concepts
|
|
215
|
+
// that happen to share a name and often share a value.
|
|
216
|
+
for (const scope of scopes) {
|
|
217
|
+
const delegation = scope.kind === 'global' && delegatedGlobalRoot
|
|
218
|
+
? ` → delegates to ${delegatedGlobalRoot}`
|
|
219
|
+
: '';
|
|
220
|
+
this.ui.info(`scope ${scope.kind.padEnd(9)} ${scope.root}${delegation}`);
|
|
221
|
+
}
|
|
222
|
+
for (const surface of surfaces) {
|
|
223
|
+
const path = surfacePaths.get(`${surface.scope}:${surface.surface}`) ?? surface.path;
|
|
224
|
+
this.ui.info(`list ${surface.scope.padEnd(9)} ${surface.surface}${surface.effective ? '' : ' (shadowed)'} ${path}`);
|
|
225
|
+
}
|
|
226
|
+
this.ui.table(rows, {
|
|
227
|
+
columns: ['scope', 'plugin', 'package', 'version', 'surface', 'status']
|
|
228
|
+
});
|
|
229
|
+
// `plugins` IS THE ANSWER; `resolutions` IS THE PROCESS. The table is the
|
|
230
|
+
// same array as the JSON `plugins` key — never `resolutions` — so the two
|
|
231
|
+
// formats can never report different counts for the same question. The
|
|
232
|
+
// remainder is stated rather than left as a silent discrepancy: a
|
|
233
|
+
// resolution with no listed row is the executable's own host floor (the
|
|
234
|
+
// repair kernel, which no scope list selects and no user can remove), or a
|
|
235
|
+
// plane the current `--scope` filter excluded.
|
|
236
|
+
if (report) {
|
|
237
|
+
const listed = new Set(rows.map((row) => `${row.scope}:${row.plugin}`));
|
|
238
|
+
const unlisted = report.resolutions.filter((row) => !listed.has(`${row.scope}:${row.specifier}`));
|
|
239
|
+
this.ui.info(`composed ${report.resolutions.length} plugin(s) in this process; ${rows.length} declared by the list(s) above` +
|
|
240
|
+
(unlisted.length
|
|
241
|
+
? `, ${unlisted.length} not from a listed scope: ${unlisted
|
|
242
|
+
.map((row) => `${row.id} (${row.scope})`)
|
|
243
|
+
.join(', ')}`
|
|
244
|
+
: ''));
|
|
245
|
+
}
|
|
246
|
+
for (const entry of shadowed) {
|
|
247
|
+
this.ui.warn(`${entry.plugin} is declared in ${entry.surfacePath} but ${entry.shadowedBy} owns the ` +
|
|
248
|
+
`${entry.scope} list, so it is NOT composed. Move it into ${entry.shadowedBy} or ` +
|
|
249
|
+
`remove the ${entry.surface} list.`);
|
|
250
|
+
}
|
|
251
|
+
for (const failure of failures) {
|
|
252
|
+
this.ui.error(`Failed to load ${failure.path}: ${failure.error}`);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* The list a scope root declares, read through the SAME resolution the
|
|
257
|
+
* bootstrap loader composes from.
|
|
258
|
+
*
|
|
259
|
+
* The workspace half used to call `resolveWorkspaceListTarget`, the WRITER's
|
|
260
|
+
* target resolver, which reports an empty list for a `vibes.config.ts`
|
|
261
|
+
* because it refuses to rewrite a module. That made this command blind to
|
|
262
|
+
* plan §3's PRIMARY workspace surface — the one the docs tell users to use —
|
|
263
|
+
* so a config with a plugin list printed an empty table. It now reads
|
|
264
|
+
* Runtime's `readWorkspacePluginSurfaces` (`@vibesdotdev/kernel/bootstrap`,
|
|
265
|
+
* the owner of workspace composition formats) over the handed runtime's
|
|
266
|
+
* selected `runtime/loader` — the same reader the workspace composition
|
|
267
|
+
* reads, in the same precedence: `vibes.config.{ts,js,json}#plugins`
|
|
268
|
+
* primary, `package.json#vibes.plugins` fallback.
|
|
269
|
+
*
|
|
270
|
+
* `delegatedGlobalRoot` is R for a home that delegates through
|
|
271
|
+
* `vibes.hostWorkspace`: the global scope then has no list of its own and the
|
|
272
|
+
* delegated root's config surfaces ARE the global list (plan §3). Same reader,
|
|
273
|
+
* same precedence, different root — not a second resolution.
|
|
274
|
+
*/
|
|
275
|
+
async readScope(readers, scope, delegatedGlobalRoot) {
|
|
276
|
+
if (scope.kind === 'global' && delegatedGlobalRoot) {
|
|
277
|
+
return this.readConfigSurfaces(readers.plugins, delegatedGlobalRoot);
|
|
278
|
+
}
|
|
279
|
+
if (scope.kind === 'global') {
|
|
280
|
+
const surface = 'package.json#vibes.plugins';
|
|
281
|
+
const surfacePath = readers.paths.join(scope.root, 'package.json');
|
|
282
|
+
const entries = (await readers.plugins.listGlobalPlugins(scope.root)).map((entry) => ({
|
|
283
|
+
specifier: entry.specifier,
|
|
284
|
+
packageName: entry.packageName,
|
|
285
|
+
version: entry.version,
|
|
286
|
+
surface,
|
|
287
|
+
surfacePath
|
|
288
|
+
}));
|
|
289
|
+
return {
|
|
290
|
+
entries,
|
|
291
|
+
shadowed: [],
|
|
292
|
+
surfaces: entries.length
|
|
293
|
+
? [{ surface, path: surfacePath, effective: true, plugins: entries.length, loaders: 0 }]
|
|
294
|
+
: [],
|
|
295
|
+
failures: []
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
return this.readConfigSurfaces(readers.plugins, scope.root);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* `<root>/vibes.config.{ts,js,json}#plugins`, else
|
|
302
|
+
* `<root>/package.json#vibes.plugins` — one root, read once, shadowing
|
|
303
|
+
* reported. Both the workspace scope and a delegating global scope resolve
|
|
304
|
+
* their list this way; the only difference is which root they point at.
|
|
305
|
+
*/
|
|
306
|
+
async readConfigSurfaces(plugins, root) {
|
|
307
|
+
const loader = await this.runtime
|
|
308
|
+
.query('runtime/loader')
|
|
309
|
+
.enabled()
|
|
310
|
+
.resolve();
|
|
311
|
+
const listing = await readWorkspacePluginSurfaces(root, { loader });
|
|
312
|
+
const versioned = (row) => {
|
|
313
|
+
const packageName = packageNameOf(row.specifier);
|
|
314
|
+
return {
|
|
315
|
+
specifier: row.specifier,
|
|
316
|
+
packageName,
|
|
317
|
+
version: plugins.readDirectInstalledPackageManifest(root, packageName)?.version ?? null,
|
|
318
|
+
surface: row.surface,
|
|
319
|
+
surfacePath: row.surfacePath
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
const all = workspacePluginRows(listing);
|
|
323
|
+
const effectiveSurface = listing.effective?.surface ?? null;
|
|
324
|
+
return {
|
|
325
|
+
entries: all.filter((row) => row.effective).map(versioned),
|
|
326
|
+
shadowed: all
|
|
327
|
+
.filter((row) => !row.effective)
|
|
328
|
+
.map((row) => ({ ...versioned(row), shadowedBy: effectiveSurface ?? '(none)' })),
|
|
329
|
+
surfaces: listing.surfaces.map((surface) => ({
|
|
330
|
+
surface: surface.surface,
|
|
331
|
+
path: surface.path,
|
|
332
|
+
effective: surface.effective,
|
|
333
|
+
plugins: surface.plugins.length,
|
|
334
|
+
loaders: surface.loaders
|
|
335
|
+
})),
|
|
336
|
+
failures: listing.failures.map((failure) => ({
|
|
337
|
+
path: failure.path,
|
|
338
|
+
error: failure.error instanceof Error ? failure.error.message : String(failure.error)
|
|
339
|
+
}))
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
//# sourceMappingURL=plugins.list.cli-command.impl.consumer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.list.cli-command.impl.consumer.js","sourceRoot":"","sources":["../../src/cli/plugins.list.cli-command.impl.consumer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAoB,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,EACN,wBAAwB,EAIxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACjG,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAA0B,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,4FAA4F;AAC5F,MAAM,eAAe,GAAG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QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBAC5C,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,KAAK,EAAE,OAAO,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;aACrF,CAAC,CAAC;SACH,CAAC;IACH,CAAC;CACD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
readonly id: "plugins.remove";
|
|
3
|
+
readonly kind: "cli/command";
|
|
4
|
+
readonly name: "remove";
|
|
5
|
+
readonly description: "Disable a package plugin in a scope and remove its package when unused";
|
|
6
|
+
readonly group: "plugins";
|
|
7
|
+
readonly surfaces: ["cli"];
|
|
8
|
+
readonly hardware: ["consumer"];
|
|
9
|
+
readonly requiredContext: ["cli/ui", "cli/output-format"];
|
|
10
|
+
readonly effects: {
|
|
11
|
+
readonly homeWrite: "required";
|
|
12
|
+
};
|
|
13
|
+
readonly arguments: [{
|
|
14
|
+
readonly name: "plugin";
|
|
15
|
+
readonly description: "Enabled plugin export or package name";
|
|
16
|
+
readonly required: true;
|
|
17
|
+
readonly variadic: false;
|
|
18
|
+
}];
|
|
19
|
+
readonly options: [{
|
|
20
|
+
readonly flags: "--keep-package";
|
|
21
|
+
readonly description: "Disable the plugin without uninstalling its package";
|
|
22
|
+
}, {
|
|
23
|
+
readonly flags: "--global";
|
|
24
|
+
readonly description: "Act on the global scope ($VIBES_HOME) — the default";
|
|
25
|
+
}, {
|
|
26
|
+
readonly flags: "--workspace";
|
|
27
|
+
readonly description: "Act on the current workspace scope";
|
|
28
|
+
}];
|
|
29
|
+
};
|
|
30
|
+
export default _default;
|
|
31
|
+
//# sourceMappingURL=plugins.remove.cli-command.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.remove.cli-command.descriptor.d.ts","sourceRoot":"","sources":["../../src/cli/plugins.remove.cli-command.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBAuBG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createRuntimeAsset } from '@vibesdotdev/kernel';
|
|
2
|
+
export default createRuntimeAsset({
|
|
3
|
+
id: 'plugins.remove',
|
|
4
|
+
kind: 'cli/command',
|
|
5
|
+
name: 'remove',
|
|
6
|
+
description: 'Disable a package plugin in a scope and remove its package when unused',
|
|
7
|
+
group: 'plugins',
|
|
8
|
+
surfaces: ['cli'],
|
|
9
|
+
hardware: ['consumer'],
|
|
10
|
+
requiredContext: ['cli/ui', 'cli/output-format'],
|
|
11
|
+
effects: { homeWrite: 'required' },
|
|
12
|
+
arguments: [
|
|
13
|
+
{
|
|
14
|
+
name: 'plugin',
|
|
15
|
+
description: 'Enabled plugin export or package name',
|
|
16
|
+
required: true,
|
|
17
|
+
variadic: false
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
options: [
|
|
21
|
+
{ flags: '--keep-package', description: 'Disable the plugin without uninstalling its package' },
|
|
22
|
+
{ flags: '--global', description: 'Act on the global scope ($VIBES_HOME) — the default' },
|
|
23
|
+
{ flags: '--workspace', description: 'Act on the current workspace scope' }
|
|
24
|
+
]
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=plugins.remove.cli-command.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.remove.cli-command.descriptor.js","sourceRoot":"","sources":["../../src/cli/plugins.remove.cli-command.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,eAAe,kBAAkB,CAAC;IACjC,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,wEAAwE;IACrF,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,eAAe,EAAE,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IAChD,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;IAClC,SAAS,EAAE;QACV;YACC,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,KAAK;SACf;KACD;IACD,OAAO,EAAE;QACR,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,qDAAqD,EAAE;QAC/F,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,qDAAqD,EAAE;QACzF,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,oCAAoC,EAAE;KAC3E;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CommandExecutionStartInfo } from '@vibesdotdev/cli/schemas/surface';
|
|
2
|
+
import type { CLICommandAssetDescriptor } from '@vibesdotdev/cli/schemas/types';
|
|
3
|
+
import { type RuntimePackagePlugins } from '@vibesdotdev/kernel';
|
|
4
|
+
import { PluginsCLICommand, type PluginsCLIContext } from './context.ts';
|
|
5
|
+
import type { SelectedScope } from './schemas/scopes.ts';
|
|
6
|
+
/**
|
|
7
|
+
* `vibes plugins remove <plugin> [--global|--workspace] [--keep-package]`.
|
|
8
|
+
*
|
|
9
|
+
* Disable first, undeclare second, and only when nothing else in the scope
|
|
10
|
+
* still selects the package. Undeclaring is symmetric with `add`, which is what
|
|
11
|
+
* wrote the dependency; leaving a dangling `workspace:*` behind would make the
|
|
12
|
+
* next `bun install` keep linking a provider nothing selects.
|
|
13
|
+
*
|
|
14
|
+
* What is NEVER touched is the provider CHECKOUT: a linked member lives in a
|
|
15
|
+
* directory the user owns, so removal drops the declaration and re-installs the
|
|
16
|
+
* scope, and the reported line says the path is still linked.
|
|
17
|
+
* `vibes plugins unlink <glob>` is the command that stops linking it.
|
|
18
|
+
*/
|
|
19
|
+
export default class PluginsRemoveCLICommand extends PluginsCLICommand {
|
|
20
|
+
constructor(descriptor: CLICommandAssetDescriptor, context: PluginsCLIContext);
|
|
21
|
+
execute(args: CommandExecutionStartInfo['args'], options: CommandExecutionStartInfo['options']): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Disable `selection` in `scope`, and say whether the scope still selects the
|
|
25
|
+
* package it names. Both scopes compare package names (the capability's
|
|
26
|
+
* `getPackageName`), never specifier prefixes: `@a/bc/plugin` does not keep
|
|
27
|
+
* `@a/b` selected, so removing `@a/b/plugin` still undeclares `@a/b`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function disableSelection(plugins: RuntimePackagePlugins, scope: SelectedScope, selection: string): ReturnType<RuntimePackagePlugins['disableGlobalPlugin']>;
|
|
30
|
+
//# sourceMappingURL=plugins.remove.cli-command.impl.consumer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.remove.cli-command.impl.consumer.d.ts","sourceRoot":"","sources":["../../src/cli/plugins.remove.cli-command.impl.consumer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAA4B,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE3F,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQzD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,iBAAiB;gBACzD,UAAU,EAAE,yBAAyB,EAAE,OAAO,EAAE,iBAAiB;IAIvE,OAAO,CAAC,IAAI,EAAE,yBAAyB,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,yBAAyB,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAmCpH;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACrC,OAAO,EAAE,qBAAqB,EAC9B,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,MAAM,GACf,UAAU,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,CAAC,CAS1D"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { getRuntimePackagePlugins } from '@vibesdotdev/kernel';
|
|
2
|
+
import { z } from 'zod/v4';
|
|
3
|
+
import { PluginsCLICommand } from "./context.js";
|
|
4
|
+
import { runBunOrThrow } from "./package-manager.consumer.js";
|
|
5
|
+
import { resolveSingleScope } from "./scopes.js";
|
|
6
|
+
/** The command's inputs, each read on its own: a missing or non-text plugin is empty, a missing flag is off. */
|
|
7
|
+
const RemoveInputSchema = z.object({
|
|
8
|
+
plugin: z.string().trim().catch(''),
|
|
9
|
+
keepPackage: z.boolean().catch(false)
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* `vibes plugins remove <plugin> [--global|--workspace] [--keep-package]`.
|
|
13
|
+
*
|
|
14
|
+
* Disable first, undeclare second, and only when nothing else in the scope
|
|
15
|
+
* still selects the package. Undeclaring is symmetric with `add`, which is what
|
|
16
|
+
* wrote the dependency; leaving a dangling `workspace:*` behind would make the
|
|
17
|
+
* next `bun install` keep linking a provider nothing selects.
|
|
18
|
+
*
|
|
19
|
+
* What is NEVER touched is the provider CHECKOUT: a linked member lives in a
|
|
20
|
+
* directory the user owns, so removal drops the declaration and re-installs the
|
|
21
|
+
* scope, and the reported line says the path is still linked.
|
|
22
|
+
* `vibes plugins unlink <glob>` is the command that stops linking it.
|
|
23
|
+
*/
|
|
24
|
+
export default class PluginsRemoveCLICommand extends PluginsCLICommand {
|
|
25
|
+
constructor(descriptor, context) {
|
|
26
|
+
super(descriptor, context);
|
|
27
|
+
}
|
|
28
|
+
async execute(args, options) {
|
|
29
|
+
const flags = { ...args, ...options };
|
|
30
|
+
const input = RemoveInputSchema.parse({ ...flags, plugin: args.plugin });
|
|
31
|
+
const selection = input.plugin;
|
|
32
|
+
if (!selection)
|
|
33
|
+
throw new Error('plugins remove requires a plugin export or package name');
|
|
34
|
+
const scope = await resolveSingleScope(this.runtime, flags, { fallback: 'global' });
|
|
35
|
+
const plugins = await getRuntimePackagePlugins(this.runtime);
|
|
36
|
+
const disabled = await disableSelection(plugins, scope, selection);
|
|
37
|
+
if (disabled.removed.length === 0) {
|
|
38
|
+
throw new Error(`${scope.kind} plugin '${selection}' is not enabled`);
|
|
39
|
+
}
|
|
40
|
+
const linked = plugins.expandWorkspaceMembers(scope.root).has(disabled.packageName);
|
|
41
|
+
let uninstalled = false;
|
|
42
|
+
if (!input.keepPackage && !disabled.packageStillSelected) {
|
|
43
|
+
await plugins.undeclareGlobalDependency(scope.root, disabled.packageName);
|
|
44
|
+
await runBunOrThrow({ runtime: this.runtime, action: 'install', cwd: scope.root });
|
|
45
|
+
uninstalled = true;
|
|
46
|
+
}
|
|
47
|
+
if (this.format === 'json') {
|
|
48
|
+
this.ui.json({
|
|
49
|
+
scope: scope.kind,
|
|
50
|
+
root: scope.root,
|
|
51
|
+
removed: disabled.removed,
|
|
52
|
+
package: disabled.packageName,
|
|
53
|
+
uninstalled,
|
|
54
|
+
linked
|
|
55
|
+
});
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
this.ui.success(`Disabled ${disabled.removed.join(', ')} in the ${scope.kind} scope (${scope.root})` +
|
|
59
|
+
(uninstalled ? ` and undeclared ${disabled.packageName}` : '') +
|
|
60
|
+
(linked ? ` — its provider path is still linked (vibes plugins unlink <glob>)` : ''));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Disable `selection` in `scope`, and say whether the scope still selects the
|
|
65
|
+
* package it names. Both scopes compare package names (the capability's
|
|
66
|
+
* `getPackageName`), never specifier prefixes: `@a/bc/plugin` does not keep
|
|
67
|
+
* `@a/b` selected, so removing `@a/b/plugin` still undeclares `@a/b`.
|
|
68
|
+
*/
|
|
69
|
+
export async function disableSelection(plugins, scope, selection) {
|
|
70
|
+
if (scope.kind === 'global')
|
|
71
|
+
return plugins.disableGlobalPlugin(scope.root, selection);
|
|
72
|
+
const result = await plugins.disableWorkspacePlugin(scope.root, selection);
|
|
73
|
+
const packageName = plugins.getPackageName(selection);
|
|
74
|
+
return {
|
|
75
|
+
removed: result.removed,
|
|
76
|
+
packageName,
|
|
77
|
+
packageStillSelected: result.plugins.some((specifier) => plugins.getPackageName(specifier) === packageName)
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=plugins.remove.cli-command.impl.consumer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.remove.cli-command.impl.consumer.js","sourceRoot":"","sources":["../../src/cli/plugins.remove.cli-command.impl.consumer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAA8B,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAA0B,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,gHAAgH;AAChH,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IACnC,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;CACrC,CAAC,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,i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cAAc,CAAC,SAAS,CAAC,CAAC;IACtD,OAAO;QACN,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,WAAW;QACX,oBAAoB,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,KAAK,WAAW,CAAC;KAC3G,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
readonly id: "plugins.unlink";
|
|
3
|
+
readonly kind: "cli/command";
|
|
4
|
+
readonly name: "unlink";
|
|
5
|
+
readonly description: "Remove a provider path glob from a scope";
|
|
6
|
+
readonly group: "plugins";
|
|
7
|
+
readonly surfaces: ["cli"];
|
|
8
|
+
readonly hardware: ["consumer"];
|
|
9
|
+
readonly requiredContext: ["cli/ui", "cli/output-format"];
|
|
10
|
+
readonly effects: {
|
|
11
|
+
readonly homeWrite: "required";
|
|
12
|
+
};
|
|
13
|
+
readonly arguments: [{
|
|
14
|
+
readonly name: "glob";
|
|
15
|
+
readonly description: "Exact glob to remove";
|
|
16
|
+
readonly required: true;
|
|
17
|
+
readonly variadic: false;
|
|
18
|
+
}];
|
|
19
|
+
readonly options: [{
|
|
20
|
+
readonly flags: "--global";
|
|
21
|
+
readonly description: "Act on the global scope ($VIBES_HOME)";
|
|
22
|
+
}, {
|
|
23
|
+
readonly flags: "--workspace";
|
|
24
|
+
readonly description: "Act on the current workspace scope";
|
|
25
|
+
}, {
|
|
26
|
+
readonly flags: "--dry-run";
|
|
27
|
+
readonly description: "Report what would be removed without writing";
|
|
28
|
+
}];
|
|
29
|
+
};
|
|
30
|
+
export default _default;
|
|
31
|
+
//# sourceMappingURL=plugins.unlink.cli-command.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.unlink.cli-command.descriptor.d.ts","sourceRoot":"","sources":["../../src/cli/plugins.unlink.cli-command.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBAkBG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createRuntimeAsset } from '@vibesdotdev/kernel';
|
|
2
|
+
export default createRuntimeAsset({
|
|
3
|
+
id: 'plugins.unlink',
|
|
4
|
+
kind: 'cli/command',
|
|
5
|
+
name: 'unlink',
|
|
6
|
+
description: 'Remove a provider path glob from a scope',
|
|
7
|
+
group: 'plugins',
|
|
8
|
+
surfaces: ['cli'],
|
|
9
|
+
hardware: ['consumer'],
|
|
10
|
+
requiredContext: ['cli/ui', 'cli/output-format'],
|
|
11
|
+
effects: { homeWrite: 'required' },
|
|
12
|
+
arguments: [
|
|
13
|
+
{ name: 'glob', description: 'Exact glob to remove', required: true, variadic: false }
|
|
14
|
+
],
|
|
15
|
+
options: [
|
|
16
|
+
{ flags: '--global', description: 'Act on the global scope ($VIBES_HOME)' },
|
|
17
|
+
{ flags: '--workspace', description: 'Act on the current workspace scope' },
|
|
18
|
+
{ flags: '--dry-run', description: 'Report what would be removed without writing' }
|
|
19
|
+
]
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=plugins.unlink.cli-command.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.unlink.cli-command.descriptor.js","sourceRoot":"","sources":["../../src/cli/plugins.unlink.cli-command.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,eAAe,kBAAkB,CAAC;IACjC,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,0CAA0C;IACvD,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,eAAe,EAAE,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IAChD,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;IAClC,SAAS,EAAE;QACV,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;KACtF;IACD,OAAO,EAAE;QACR,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,uCAAuC,EAAE;QAC3E,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,oCAAoC,EAAE;QAC3E,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,8CAA8C,EAAE;KACnF;CACD,CAAC,CAAC"}
|