@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,105 @@
|
|
|
1
|
+
import { optionalMemberRegistrar } from "../core/optional-member.js";
|
|
2
|
+
/**
|
|
3
|
+
* Auth Plugins Umbrella - Auth, Secrets backends
|
|
4
|
+
*
|
|
5
|
+
* Depends on: @vibesdotdev/plugins-core (for config/environment)
|
|
6
|
+
*
|
|
7
|
+
* Owned sub-plugins:
|
|
8
|
+
* - auth/plugin (authentication flows)
|
|
9
|
+
* - secrets/plugin (secrets management)
|
|
10
|
+
* - secrets-backend-env-file (env file secrets backend)
|
|
11
|
+
* - secrets-backend-encrypted-local (encrypted local secrets backend)
|
|
12
|
+
*
|
|
13
|
+
* Provider secret backends (platform-api, vault) are composed by hosts from
|
|
14
|
+
* their integration package, never mounted here.
|
|
15
|
+
*/
|
|
16
|
+
import { createRuntimePlugin, createRuntimeKind } from '@vibesdotdev/kernel';
|
|
17
|
+
import { z } from 'zod/v4';
|
|
18
|
+
// NOTE: previously all loads went through a dynamic-string `importPlugin`.
|
|
19
|
+
// `bun build --compile` cannot statically analyze dynamic specifiers, so
|
|
20
|
+
// those modules were missing from the binary closure. Static `await import`
|
|
21
|
+
// with literal specifiers fixes this; importPlugin remains for future
|
|
22
|
+
// optional / runtime-pluggable backends.
|
|
23
|
+
import { AuthPluginsConfigSchema, mergeConfig } from "../schemas/auth.js";
|
|
24
|
+
export const authPluginsPlugin = createRuntimePlugin({
|
|
25
|
+
id: '@vibesdotdev/plugins-auth',
|
|
26
|
+
name: 'Auth Plugins Umbrella',
|
|
27
|
+
description: 'Auth, Secrets, Secrets backends',
|
|
28
|
+
dependencies: ['context', '@vibesdotdev/plugins-core'],
|
|
29
|
+
kinds: [
|
|
30
|
+
createRuntimeKind({
|
|
31
|
+
id: 'plugins/auth/config',
|
|
32
|
+
descriptorSchema: z.object({
|
|
33
|
+
kind: z.literal('plugins/auth/config'),
|
|
34
|
+
id: z.literal('plugins.auth'),
|
|
35
|
+
config: AuthPluginsConfigSchema
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
],
|
|
39
|
+
async onRegister(runtime) {
|
|
40
|
+
const member = optionalMemberRegistrar('plugins-auth', runtime);
|
|
41
|
+
const configId = 'plugins.auth';
|
|
42
|
+
const userConfig = runtime.hasContext(configId) ? await runtime.context(configId) : {};
|
|
43
|
+
const config = mergeConfig(userConfig);
|
|
44
|
+
// The auth plugin is the CLI's identity spine: every authenticated
|
|
45
|
+
// command (auth status, forge, pr, registry publish) resolves the session
|
|
46
|
+
// through it, and its event descriptors (auth.login.succeeded) anchor
|
|
47
|
+
// cross-plugin subscriptions. An app config that disables auth describes
|
|
48
|
+
// the APP runtime (e.g. ai-web uses JWT session handling), not the CLI
|
|
49
|
+
// reading that config from the app cwd — without this floor, `vibes auth`
|
|
50
|
+
// becomes 'unknown command' and forge reports 'Not signed in' from that
|
|
51
|
+
// cwd while credentials are fine. The mount below is deliberately
|
|
52
|
+
// unguarded: if the spine truly cannot register, the CLI must fail loudly.
|
|
53
|
+
if (runtime.scope.surface === 'cli') {
|
|
54
|
+
config.auth = true;
|
|
55
|
+
}
|
|
56
|
+
if (config.auth) {
|
|
57
|
+
await member('@vibesdotdev/auth/plugin', async () => (await import('@vibesdotdev/auth/plugin')).default);
|
|
58
|
+
// The device-session implementation is Node-only. It used to be a loader
|
|
59
|
+
// inside the universal auth plugin, which meant the bundler followed it
|
|
60
|
+
// into every CLOUD worker that composes auth — 14 of 16 deployed apps
|
|
61
|
+
// shipped it. Register it only where it can actually run, so `vibes auth
|
|
62
|
+
// login` keeps working and workerd artifacts stop carrying it.
|
|
63
|
+
if (runtime.scope.hardware === 'consumer' || runtime.scope.surface === 'cli') {
|
|
64
|
+
await member('@vibesdotdev/auth/consumer.plugin', async () => (await import('@vibesdotdev/auth/consumer.plugin')).default);
|
|
65
|
+
}
|
|
66
|
+
if (runtime.scope.surface === 'cli') {
|
|
67
|
+
await member('@vibesdotdev/auth/cli/plugin', async () => (await import('@vibesdotdev/auth/cli/plugin')).default);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (config.secrets) {
|
|
71
|
+
await member('@vibesdotdev/secrets/plugin', async () => (await import('@vibesdotdev/secrets/plugin')).default);
|
|
72
|
+
}
|
|
73
|
+
if (config.secretsBackends.envFile) {
|
|
74
|
+
await member('@vibesdotdev/secrets/backends/env-file/plugin', async () => (await import('@vibesdotdev/secrets/backends/env-file/plugin')).default);
|
|
75
|
+
}
|
|
76
|
+
if (config.secretsBackends.encryptedLocal) {
|
|
77
|
+
await member('@vibesdotdev/secrets/backends/encrypted-local/plugin', async () => (await import('@vibesdotdev/secrets/backends/encrypted-local/plugin')).default);
|
|
78
|
+
}
|
|
79
|
+
// Mount the @vibesdotdev/scope plugin (owns the runtime/scope-resolver
|
|
80
|
+
// kind — RUNTIME-RECIPE §F15). Universal — every surface needs the
|
|
81
|
+
// resolver. The CLI surface ALSO mounts scope-cli below so the
|
|
82
|
+
// `vibes scope` commands are registered.
|
|
83
|
+
{
|
|
84
|
+
await member('@vibesdotdev/scope/plugin', async () => (await import('@vibesdotdev/scope/plugin')).default);
|
|
85
|
+
}
|
|
86
|
+
// Mount `@vibesdotdev/scope/cli` when running in the CLI surface.
|
|
87
|
+
if (runtime.scope.surface === 'cli') {
|
|
88
|
+
await member('@vibesdotdev/scope/cli/plugin', async () => (await import('@vibesdotdev/scope/cli/plugin')).default);
|
|
89
|
+
}
|
|
90
|
+
// Canonical `@vibesdotdev/secrets/cli` surface. Registers `vibes secrets
|
|
91
|
+
// list`, `reveal`, and `set` plus the `secrets` cli/group. Must run AFTER
|
|
92
|
+
// the secrets plugin (above). CLI-only by surface; wrapped in try/catch so
|
|
93
|
+
// external consumers without the optional peer still bootstrap.
|
|
94
|
+
if (config.secrets && runtime.scope.surface === 'cli') {
|
|
95
|
+
{
|
|
96
|
+
const mod = await import('@vibesdotdev/secrets/cli/plugin');
|
|
97
|
+
// One plugin: it also registers the check/import/export/pull/push/unset and
|
|
98
|
+
// pre-commit commands (lazy impls, so no consumer edge on cloud bundles).
|
|
99
|
+
await runtime.registerPlugin(mod.default);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
export default authPluginsPlugin;
|
|
105
|
+
//# sourceMappingURL=consumer.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumer.plugin.js","sourceRoot":"","sources":["../../src/auth/consumer.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,2EAA2E;AAC3E,yEAAyE;AACzE,4EAA4E;AAC5E,sEAAsE;AACtE,yCAAyC;AACzC,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;IACjD,EAAE,EAAE,2BAA2B;IAC/B,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,iCAAiC;IAC9C,YAAY,EAAE,CAAC,SAAS,EAAE,2BAA2B,CAAC;IACtD,KAAK,EAAE;QACH,iBAAiB,CAAC;YACd,EAAE,EAAE,qBAAqB;YACzB,gBAAgB,EAAE,CAAC,CAAC,MAAM,CAAC;gBACvB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C,CAAC,CAAC,OAAO,CAAC,CAAC;QACvH,CAAC;QACD,yEAAyE;QACzE,0EAA0E;QAC1E,2EAA2E;QAC3E,gEAAgE;QAChE,IAAI,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;YACpD,CAAC;gBACG,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAC;gBAC5D,4EAA4E;gBAC5E,0EAA0E;gBAC1E,MAAM,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC9C,CAAC;QACL,CAAC;IACL,CAAC;CACJ,CAAC,CAAC;AACH,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/auth/plugin.ts"],"names":[],"mappings":"AAMA,0FAA0F;AAC1F,eAAO,MAAM,iBAAiB,6CAuB5B,CAAC;AACH,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createRuntimePlugin, createRuntimeKind } from '@vibesdotdev/kernel';
|
|
2
|
+
import { z } from 'zod/v4';
|
|
3
|
+
import { AuthPluginsConfigSchema, mergeConfig } from "../schemas/auth.js";
|
|
4
|
+
import { optionalMemberRegistrar } from "../core/optional-member.js";
|
|
5
|
+
/** Scope-neutral contracts; native and surface capabilities live in ./consumer.plugin. */
|
|
6
|
+
export const authPluginsPlugin = createRuntimePlugin({
|
|
7
|
+
id: '@vibesdotdev/plugins-auth',
|
|
8
|
+
name: 'Auth family contracts',
|
|
9
|
+
dependencies: ['context', '@vibesdotdev/plugins-core'],
|
|
10
|
+
kinds: [createRuntimeKind({
|
|
11
|
+
id: 'plugins/auth/config',
|
|
12
|
+
descriptorSchema: z.object({
|
|
13
|
+
kind: z.literal('plugins/auth/config'), id: z.literal('plugins.auth'),
|
|
14
|
+
config: AuthPluginsConfigSchema
|
|
15
|
+
})
|
|
16
|
+
})],
|
|
17
|
+
async onRegister(runtime) {
|
|
18
|
+
const input = runtime.hasContext('plugins.auth')
|
|
19
|
+
? await runtime.context('plugins.auth') : {};
|
|
20
|
+
const config = mergeConfig(input);
|
|
21
|
+
runtime.registerDescriptor('plugins/auth/config', {
|
|
22
|
+
kind: 'plugins/auth/config', id: 'plugins.auth', config
|
|
23
|
+
});
|
|
24
|
+
const member = optionalMemberRegistrar('plugins-auth', runtime);
|
|
25
|
+
if (config.auth)
|
|
26
|
+
await member('@vibesdotdev/auth/cloud.plugin', async () => (await import('@vibesdotdev/auth/cloud.plugin')).default);
|
|
27
|
+
if (config.secrets)
|
|
28
|
+
await member('@vibesdotdev/secrets/plugin', async () => (await import('@vibesdotdev/secrets/plugin')).default);
|
|
29
|
+
await member('@vibesdotdev/scope/plugin', async () => (await import('@vibesdotdev/scope/plugin')).default);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export default authPluginsPlugin;
|
|
33
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/auth/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,uBAAuB,EAAE,WAAW,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MAAM,MAAM,CAAC,6BAA6B,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QACnI,MAAM,MAAM,CAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC3G,CAAC;CACD,CAAC,CAAC;AACH,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumer.plugin.d.ts","sourceRoot":"","sources":["../../src/automation/consumer.plugin.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,uBAAuB,6CA2ElC,CAAC;AACH,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { optionalMemberRegistrar } from "../core/optional-member.js";
|
|
2
|
+
/**
|
|
3
|
+
* Automation Plugins Umbrella - Browser Automation, AutoLoop
|
|
4
|
+
*
|
|
5
|
+
* Depends on: @vibesdotdev/plugins-core
|
|
6
|
+
*
|
|
7
|
+
* Surface-specific sub-plugins:
|
|
8
|
+
* - browser-automation/cli.plugin (surface: cli)
|
|
9
|
+
* - browser-automation/tui.plugin (surface: tui)
|
|
10
|
+
*/
|
|
11
|
+
import { createRuntimePlugin, createRuntimeKind } from '@vibesdotdev/kernel';
|
|
12
|
+
import { z } from 'zod/v4';
|
|
13
|
+
import { relocatedPluginNotice } from "../core/optional-plugin.js";
|
|
14
|
+
import { AutomationPluginsConfigSchema, mergeConfig } from "../schemas/automation.js";
|
|
15
|
+
export const automationPluginsPlugin = createRuntimePlugin({
|
|
16
|
+
id: '@vibesdotdev/plugins-automation',
|
|
17
|
+
name: 'Automation Plugins Umbrella',
|
|
18
|
+
description: 'Browser Automation, AutoLoop',
|
|
19
|
+
dependencies: ['context', '@vibesdotdev/plugins-core'],
|
|
20
|
+
kinds: [
|
|
21
|
+
createRuntimeKind({
|
|
22
|
+
id: 'plugins/automation/config',
|
|
23
|
+
descriptorSchema: z.object({
|
|
24
|
+
kind: z.literal('plugins/automation/config'),
|
|
25
|
+
id: z.literal('plugins.automation'),
|
|
26
|
+
config: AutomationPluginsConfigSchema
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
],
|
|
30
|
+
async onRegister(runtime) {
|
|
31
|
+
const member = optionalMemberRegistrar('plugins-automation', runtime);
|
|
32
|
+
const relocatedPlugin = relocatedPluginNotice('plugins-automation', runtime);
|
|
33
|
+
const configId = 'plugins.automation';
|
|
34
|
+
const userConfig = runtime.hasContext(configId) ? await runtime.context(configId) : {};
|
|
35
|
+
const config = mergeConfig(userConfig, runtime.scope);
|
|
36
|
+
const browserConfig = config.browserAutomation;
|
|
37
|
+
if (browserConfig.enabled) {
|
|
38
|
+
// OWNER COMPLETENESS. `browser-automation` declares
|
|
39
|
+
// `dependencies: ['context','storage','localdb','runtime-client','tools']`,
|
|
40
|
+
// and plugin id `localdb` is provided by `@vibesdotdev/localdb/plugin` —
|
|
41
|
+
// a FRAMEWORK package. Until the CLI host became a string list, the only
|
|
42
|
+
// host that mounted it was the RESTRICTED infra preset, so this umbrella
|
|
43
|
+
// silently relied on an internal plugin being spliced in ahead of it. A
|
|
44
|
+
// scope list that selects only `@vibesdotdev/plugins/plugin` then aborted
|
|
45
|
+
// with `Plugin 'browser-automation' has unmet dependencies: localdb`.
|
|
46
|
+
// Registration is idempotent (first wins), so a host that already mounted
|
|
47
|
+
// the infra preset is unaffected.
|
|
48
|
+
await member('@vibesdotdev/localdb/plugin', async () => (await import('@vibesdotdev/localdb/plugin')).default);
|
|
49
|
+
await member('@vibesdotdev/control/browser-automation/plugin', async () => (await import('@vibesdotdev/control/browser-automation/plugin')).default);
|
|
50
|
+
if (browserConfig.cli) {
|
|
51
|
+
await member('@vibesdotdev/control/browser-automation/cli.plugin', async () => (await import('@vibesdotdev/control/browser-automation/cli.plugin')).default);
|
|
52
|
+
}
|
|
53
|
+
if (browserConfig.tui) {
|
|
54
|
+
{
|
|
55
|
+
await member('@vibesdotdev/control/browser-automation/tui.plugin', async () => (await import('@vibesdotdev/control/browser-automation/tui.plugin')).default);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const terminalConfig = config.terminal;
|
|
60
|
+
if (terminalConfig.enabled) {
|
|
61
|
+
{
|
|
62
|
+
await member('@vibesdotdev/terminal-client/plugin', async () => (await import('@vibesdotdev/terminal-client/plugin')).default);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const isConsumer = runtime.scope?.hardware === 'consumer' || runtime.scope?.surface === 'cli' || runtime.scope?.surface === 'tui';
|
|
66
|
+
const isCloud = runtime.scope?.hardware === 'cloud';
|
|
67
|
+
// Autoloop is a premium agent extra: @vibesdotdev/agent-extras-premium
|
|
68
|
+
// registers it (and the git-operations plugin its lanes integrate through).
|
|
69
|
+
if ((isConsumer && config.autoloop.enabled) || (isCloud && config.autoloop.cloud)) {
|
|
70
|
+
relocatedPlugin('autoloop', '@vibesdotdev/agent-extras-premium');
|
|
71
|
+
}
|
|
72
|
+
// Workbench — workflow automation. Registers the core runtime plugin
|
|
73
|
+
// (so the WorkbenchClient is resolvable via getVibesClient('workbench'))
|
|
74
|
+
// and optionally the CLI surface when on a CLI runtime. Mirrors the
|
|
75
|
+
// tools-cli registration pattern from plugins-ai.
|
|
76
|
+
const workbenchConfig = config.workbench;
|
|
77
|
+
const workbenchEnabled = workbenchConfig.enabled;
|
|
78
|
+
const workbenchCliEnabled = workbenchConfig.cli;
|
|
79
|
+
if (workbenchEnabled) {
|
|
80
|
+
{
|
|
81
|
+
await member('@vibesdotdev/workspace/workbench/plugin', async () => (await import('@vibesdotdev/workspace/workbench/plugin')).default);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (workbenchCliEnabled && runtime.scope?.surface === 'cli') {
|
|
85
|
+
{
|
|
86
|
+
await member('@vibesdotdev/workspace/cli/workbench/plugin', async () => (await import('@vibesdotdev/workspace/cli/workbench/plugin')).default);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
export default automationPluginsPlugin;
|
|
92
|
+
//# sourceMappingURL=consumer.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumer.plugin.js","sourceRoot":"","sources":["../../src/automation/consumer.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;;;;;;GAQG;AACH,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACtF,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;IACvD,EAAE,EAAE,iCAAiC;IACrC,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,8BAA8B;IAC3C,YAAY,EAAE,CAAC,SAAS,EAAE,2BAA2B,CAAC;IACtD,KAAK,EAAE;QACH,iBAAiB,CAAC;YACd,EAAE,EAAE,2BAA2B;YAC/B,gBAAgB,EAAE,CAAC,CAAC,MAAM,CAAC;gBACvB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC;gBAC5C,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC;gBACnC,MAAM,EAAE,6BAA6B;aACxC,CAAC;SACL,CAAC;KACL;IACD,KAAK,CAAC,UAAU,CAAC,OAAmB;QAChC,MAAM,MAAM,GAAG,uBAAuB,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QACtE,MAAM,eAAe,GAAG,qBAAqB,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QAC7E,MAAM,QAAQ,GAAG,oBAAoB,CAAC;QACtC,MAAM,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,CAAC,CAAC,OAAO,CAAC,CAAC;YACnJ,CAAC;QACL,CAAC;IACL,CAAC;CACJ,CAAC,CAAC;AACH,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/automation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/automation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/automation/plugin.ts"],"names":[],"mappings":"AAMA,0FAA0F;AAC1F,eAAO,MAAM,uBAAuB,6CAqBlC,CAAC;AACH,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createRuntimePlugin, createRuntimeKind } from '@vibesdotdev/kernel';
|
|
2
|
+
import { z } from 'zod/v4';
|
|
3
|
+
import { AutomationPluginsConfigSchema, mergeConfig } from "../schemas/automation.js";
|
|
4
|
+
import { optionalMemberRegistrar } from "../core/optional-member.js";
|
|
5
|
+
/** Scope-neutral contracts; native and surface capabilities live in ./consumer.plugin. */
|
|
6
|
+
export const automationPluginsPlugin = createRuntimePlugin({
|
|
7
|
+
id: '@vibesdotdev/plugins-automation',
|
|
8
|
+
name: 'Automation family contracts',
|
|
9
|
+
dependencies: ['context', '@vibesdotdev/plugins-core'],
|
|
10
|
+
kinds: [createRuntimeKind({
|
|
11
|
+
id: 'plugins/automation/config',
|
|
12
|
+
descriptorSchema: z.object({
|
|
13
|
+
kind: z.literal('plugins/automation/config'), id: z.literal('plugins.automation'),
|
|
14
|
+
config: AutomationPluginsConfigSchema
|
|
15
|
+
})
|
|
16
|
+
})],
|
|
17
|
+
async onRegister(runtime) {
|
|
18
|
+
const input = runtime.hasContext('plugins.automation')
|
|
19
|
+
? await runtime.context('plugins.automation') : {};
|
|
20
|
+
const config = mergeConfig(input, runtime.scope);
|
|
21
|
+
runtime.registerDescriptor('plugins/automation/config', {
|
|
22
|
+
kind: 'plugins/automation/config', id: 'plugins.automation', config
|
|
23
|
+
});
|
|
24
|
+
const member = optionalMemberRegistrar('plugins-automation', runtime);
|
|
25
|
+
if (config.terminal.enabled)
|
|
26
|
+
await member('@vibesdotdev/terminal-client/api-client-plugin', async () => (await import('@vibesdotdev/terminal-client/api-client-plugin')).default);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export default automationPluginsPlugin;
|
|
30
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/automation/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,6BAA6B,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,0FAA0F;AAC1F,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;IAC1D,EAAE,EAAE,iCAAiC;IACrC,IAAI,EAAE,6BAA6B;IACnC,YAAY,EAAE,CAAC,SAAS,EAAE,2BAA2B,CAAC;IACtD,KAAK,EAAE,CAAC,iBAAiB,CAAC;YACzB,EAAE,EAAE,2BAA2B;YAC/B,gBAAgB,EAAE,CAAC,CAAC,MAAM,CAAC;gBAC1B,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC;gBACjF,MAAM,EAAE,6BAA6B;aACrC,CAAC;SACF,CAAC,CAAC;IACH,KAAK,CAAC,UAAU,CAAC,OAAO;QACvB,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC;YACrD,CAAC,CAAC,MAAM,OAAO,CAAC,OAAO,CAAoB,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACvE,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACjD,OAAO,CAAC,kBAAkB,CAAC,2BAA2B,EAAE;YACvD,IAAI,EAAE,2BAA2B,EAAE,EAAE,EAAE,oBAAoB,EAAE,MAAM;SACnE,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,uBAAuB,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QACtE,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO;YAAE,MAAM,MAAM,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,gDAAgD,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IACnL,CAAC;CACD,CAAC,CAAC;AACH,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vibes CLI HOST ENTRY — the on-disk module a compiled thin `vibes` shim
|
|
3
|
+
* imports IN-PROCESS (through the package-root `host.mjs` / `host-start.mjs`
|
|
4
|
+
* trampolines).
|
|
5
|
+
*
|
|
6
|
+
* `docs/proposals/cli-thin-host-compile-once.md` §2.2 step 5 / §2.3. Why this
|
|
7
|
+
* module lives in `@vibesdotdev/plugins` and not in cli-bin: the shim must
|
|
8
|
+
* bundle ZERO framework code (P1/P2/P5 — module identity is realpath, and a
|
|
9
|
+
* copy inside `/$bunfs` is never shared with on-disk plugins). Everything the
|
|
10
|
+
* host needs therefore resolves from R's `node_modules`.
|
|
11
|
+
*
|
|
12
|
+
* This module owns the PLUGIN FLOOR only: the repair kernel plus the editor
|
|
13
|
+
* deep-link and the runtime daemon controls. The process duties (argv, the
|
|
14
|
+
* external hook relay fast path, shim custody, `VIBES_CLI_MODE`, self-spawn,
|
|
15
|
+
* the output formatter, the boot-failure report and the keep-alive exit) are
|
|
16
|
+
* the CLI host's: `@vibesdotdev/surface-cli/bun/host` `runCliHost`,
|
|
17
|
+
* which `startHost` forwards to. Importing this module boots nothing.
|
|
18
|
+
*/
|
|
19
|
+
import type { HostBootstrap } from '@vibesdotdev/cli/host-bootstrap';
|
|
20
|
+
export type { HostBootstrap } from '@vibesdotdev/cli/host-bootstrap';
|
|
21
|
+
import type { HostStartOptions } from '../schemas/host.ts';
|
|
22
|
+
export type { HostStartOptions } from '../schemas/host.ts';
|
|
23
|
+
/**
|
|
24
|
+
* The executable's own plugin floor. Repair commands must exist even when every
|
|
25
|
+
* scope list is empty or broken. Editor is on the floor so a consumer can run
|
|
26
|
+
* `vibes editor` and have it install the published Vessel host. The runtime
|
|
27
|
+
* daemon control commands are on the floor for the same reason: the editor's
|
|
28
|
+
* launcher spawns `vibes --workspace-root <folder> runtime daemon serve` for
|
|
29
|
+
* ANY opened folder, including app checkouts whose own plugin selection names
|
|
30
|
+
* no daemon CLI — the daemon is the executable's serve surface, not a
|
|
31
|
+
* capability the opened workspace must select. Relative literal, not the
|
|
32
|
+
* self-referencing package name: the compiled body's resolver and Node's
|
|
33
|
+
* differ on self-reference, and this module is in the same package anyway. A
|
|
34
|
+
* first-install bootstrap rides in first, as runtime-local context for the
|
|
35
|
+
* auth plugin; without one the runtime carries no such context at all.
|
|
36
|
+
*/
|
|
37
|
+
export declare function hostPluginFloor(bootstrap?: HostBootstrap): ((() => Promise<import("@vibesdotdev/kernel").RuntimePlugin>) | (() => Promise<typeof import("../cli/plugin.ts")>))[];
|
|
38
|
+
/**
|
|
39
|
+
* Boot and run the CLI for this process: the CLI host (`runCliHost`) with this
|
|
40
|
+
* package's plugin floor, then the executable's own specifiers. A malformed
|
|
41
|
+
* `bootstrap` refuses (`InvalidHostBootstrapError`) before anything boots.
|
|
42
|
+
*/
|
|
43
|
+
export declare function startHost(options?: HostStartOptions): Promise<void>;
|
|
44
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/bun/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAErE,YAAY,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,oBAAoB,CAAC;AAC3E,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,aAAa,yHAcxD;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAY7E"}
|
package/dist/bun/host.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vibes CLI HOST ENTRY — the on-disk module a compiled thin `vibes` shim
|
|
3
|
+
* imports IN-PROCESS (through the package-root `host.mjs` / `host-start.mjs`
|
|
4
|
+
* trampolines).
|
|
5
|
+
*
|
|
6
|
+
* `docs/proposals/cli-thin-host-compile-once.md` §2.2 step 5 / §2.3. Why this
|
|
7
|
+
* module lives in `@vibesdotdev/plugins` and not in cli-bin: the shim must
|
|
8
|
+
* bundle ZERO framework code (P1/P2/P5 — module identity is realpath, and a
|
|
9
|
+
* copy inside `/$bunfs` is never shared with on-disk plugins). Everything the
|
|
10
|
+
* host needs therefore resolves from R's `node_modules`.
|
|
11
|
+
*
|
|
12
|
+
* This module owns the PLUGIN FLOOR only: the repair kernel plus the editor
|
|
13
|
+
* deep-link and the runtime daemon controls. The process duties (argv, the
|
|
14
|
+
* external hook relay fast path, shim custody, `VIBES_CLI_MODE`, self-spawn,
|
|
15
|
+
* the output formatter, the boot-failure report and the keep-alive exit) are
|
|
16
|
+
* the CLI host's: `@vibesdotdev/surface-cli/bun/host` `runCliHost`,
|
|
17
|
+
* which `startHost` forwards to. Importing this module boots nothing.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* The executable's own plugin floor. Repair commands must exist even when every
|
|
21
|
+
* scope list is empty or broken. Editor is on the floor so a consumer can run
|
|
22
|
+
* `vibes editor` and have it install the published Vessel host. The runtime
|
|
23
|
+
* daemon control commands are on the floor for the same reason: the editor's
|
|
24
|
+
* launcher spawns `vibes --workspace-root <folder> runtime daemon serve` for
|
|
25
|
+
* ANY opened folder, including app checkouts whose own plugin selection names
|
|
26
|
+
* no daemon CLI — the daemon is the executable's serve surface, not a
|
|
27
|
+
* capability the opened workspace must select. Relative literal, not the
|
|
28
|
+
* self-referencing package name: the compiled body's resolver and Node's
|
|
29
|
+
* differ on self-reference, and this module is in the same package anyway. A
|
|
30
|
+
* first-install bootstrap rides in first, as runtime-local context for the
|
|
31
|
+
* auth plugin; without one the runtime carries no such context at all.
|
|
32
|
+
*/
|
|
33
|
+
export function hostPluginFloor(bootstrap) {
|
|
34
|
+
return [
|
|
35
|
+
...(bootstrap
|
|
36
|
+
? [
|
|
37
|
+
async () => (await import('@vibesdotdev/cli/host-bootstrap')).createHostBootstrapPlugin(bootstrap)
|
|
38
|
+
]
|
|
39
|
+
: []),
|
|
40
|
+
() => import("../cli/plugin.js"),
|
|
41
|
+
() => import('@vibesdotdev/kernel-rpc/daemon/plugin'),
|
|
42
|
+
() => import('@vibesdotdev/kernel-rpc/daemon/cli/plugin'),
|
|
43
|
+
() => import('@vibesdotdev/vessel/launch/plugin'),
|
|
44
|
+
() => import('@vibesdotdev/editor/cli/plugin')
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Boot and run the CLI for this process: the CLI host (`runCliHost`) with this
|
|
49
|
+
* package's plugin floor, then the executable's own specifiers. A malformed
|
|
50
|
+
* `bootstrap` refuses (`InvalidHostBootstrapError`) before anything boots.
|
|
51
|
+
*/
|
|
52
|
+
export async function startHost(options = {}) {
|
|
53
|
+
const { runCliHost } = await import('@vibesdotdev/surface-cli/bun/host');
|
|
54
|
+
const run = {
|
|
55
|
+
hostPlugins: [...hostPluginFloor(options.bootstrap), ...(options.hostPluginSpecifiers ?? [])]
|
|
56
|
+
};
|
|
57
|
+
if (options.argv)
|
|
58
|
+
run.argv = options.argv;
|
|
59
|
+
if (options.attestHostGraph !== undefined)
|
|
60
|
+
run.attestHostGraph = options.attestHostGraph;
|
|
61
|
+
if (options.hostConfig)
|
|
62
|
+
run.hostConfig = { ...options.hostConfig };
|
|
63
|
+
if (options.host)
|
|
64
|
+
run.host = options.host;
|
|
65
|
+
if (options.globalPackagePlugins !== undefined)
|
|
66
|
+
run.globalPackagePlugins = options.globalPackagePlugins;
|
|
67
|
+
if (options.bootstrap)
|
|
68
|
+
run.bootstrap = options.bootstrap;
|
|
69
|
+
await runCliHost(run);
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/bun/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AASH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,eAAe,CAAC,SAAyB;IACxD,OAAO;QACN,GAAG,CAAC,SAAS;YACZ,CAAC,CAAC;gBACA,KAAK,IAAI,EAAE,CACV,CAAC,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAC,CAAC,yBAAyB,CAAC,SAAS,CAAC;aACvF;YACF,CAAC,CAAC,EAAE,CAAC;QACN,GAAG,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC;QAChC,GAAG,EAAE,CAAC,M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
* Every diagnostic in this directory comes from re-entering the shipping
|
|
5
|
+
* binary (`vibes plugins list --json` for verification, `vibes pm daemon
|
|
6
|
+
* restart` for a roll) or from Bun itself. Taking the LAST few lines of such a
|
|
7
|
+
* child's stderr is wrong, and it was wrong in the shipped draft: a Bun crash
|
|
8
|
+
* ends with
|
|
9
|
+
*
|
|
10
|
+
* error: <the actual cause>
|
|
11
|
+
* at /path/to/file.ts:2:11
|
|
12
|
+
*
|
|
13
|
+
* Bun v1.4.0 (macOS arm64)
|
|
14
|
+
*
|
|
15
|
+
* and a compiled body adds `note: consider bundling with '--sourcemap' to get
|
|
16
|
+
* unminified traces`. `slice(-3)` therefore reported the Bun banner and the
|
|
17
|
+
* sourcemap note — measured — while the cause scrolled past. The operator was
|
|
18
|
+
* shown boilerplate for the one message that is supposed to explain why their
|
|
19
|
+
* scope will not compose.
|
|
20
|
+
*
|
|
21
|
+
* So: drop the frames and the trailer, then PREFER the first signal line
|
|
22
|
+
* (`error:`, a plugin/graph failure, a refusal) over position. If nothing
|
|
23
|
+
* matches, fall back to the last non-boilerplate lines. If the child gave us
|
|
24
|
+
* nothing but boilerplate, return the boilerplate rather than an empty string
|
|
25
|
+
* — an empty detail reads as "no reason", which is the failure this module
|
|
26
|
+
* exists to prevent.
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* `max` lines of cause from a child's output. `stderr` wins when it has
|
|
30
|
+
* content; otherwise `stdout` (bun writes some diagnostics there).
|
|
31
|
+
*/
|
|
32
|
+
export declare function summarizeChildFailure(input: {
|
|
33
|
+
stdout?: string;
|
|
34
|
+
stderr?: string;
|
|
35
|
+
max?: number;
|
|
36
|
+
}): string;
|
|
37
|
+
//# sourceMappingURL=child-failure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child-failure.d.ts","sourceRoot":"","sources":["../../src/cli/child-failure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AA6BH;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACb,GAAG,MAAM,CAyBT"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turn a failed child process's output into the line an operator can act on.
|
|
3
|
+
*
|
|
4
|
+
* Every diagnostic in this directory comes from re-entering the shipping
|
|
5
|
+
* binary (`vibes plugins list --json` for verification, `vibes pm daemon
|
|
6
|
+
* restart` for a roll) or from Bun itself. Taking the LAST few lines of such a
|
|
7
|
+
* child's stderr is wrong, and it was wrong in the shipped draft: a Bun crash
|
|
8
|
+
* ends with
|
|
9
|
+
*
|
|
10
|
+
* error: <the actual cause>
|
|
11
|
+
* at /path/to/file.ts:2:11
|
|
12
|
+
*
|
|
13
|
+
* Bun v1.4.0 (macOS arm64)
|
|
14
|
+
*
|
|
15
|
+
* and a compiled body adds `note: consider bundling with '--sourcemap' to get
|
|
16
|
+
* unminified traces`. `slice(-3)` therefore reported the Bun banner and the
|
|
17
|
+
* sourcemap note — measured — while the cause scrolled past. The operator was
|
|
18
|
+
* shown boilerplate for the one message that is supposed to explain why their
|
|
19
|
+
* scope will not compose.
|
|
20
|
+
*
|
|
21
|
+
* So: drop the frames and the trailer, then PREFER the first signal line
|
|
22
|
+
* (`error:`, a plugin/graph failure, a refusal) over position. If nothing
|
|
23
|
+
* matches, fall back to the last non-boilerplate lines. If the child gave us
|
|
24
|
+
* nothing but boilerplate, return the boilerplate rather than an empty string
|
|
25
|
+
* — an empty detail reads as "no reason", which is the failure this module
|
|
26
|
+
* exists to prevent.
|
|
27
|
+
*/
|
|
28
|
+
/** Lines that carry no information about the cause. */
|
|
29
|
+
const BOILERPLATE = [
|
|
30
|
+
/^Bun v\S+\s*\(.*\)$/,
|
|
31
|
+
/^note: /,
|
|
32
|
+
/^\s*at\s+\S+/,
|
|
33
|
+
/^\s*\^+\s*$/,
|
|
34
|
+
/^\s*\d+\s*\|\s?/
|
|
35
|
+
];
|
|
36
|
+
/** Lines that name a cause. Order inside a line does not matter. */
|
|
37
|
+
const SIGNAL = [
|
|
38
|
+
/(^|\s)error:\s/i,
|
|
39
|
+
/failed to load/i,
|
|
40
|
+
/PluginGraphMismatch/,
|
|
41
|
+
/^\s*Refusing\b/i,
|
|
42
|
+
/\bENOENT\b|\bEACCES\b/,
|
|
43
|
+
/Cannot find (?:module|package)/i
|
|
44
|
+
];
|
|
45
|
+
function isBoilerplate(line) {
|
|
46
|
+
return BOILERPLATE.some((pattern) => pattern.test(line));
|
|
47
|
+
}
|
|
48
|
+
function isSignal(line) {
|
|
49
|
+
return SIGNAL.some((pattern) => pattern.test(line));
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* `max` lines of cause from a child's output. `stderr` wins when it has
|
|
53
|
+
* content; otherwise `stdout` (bun writes some diagnostics there).
|
|
54
|
+
*/
|
|
55
|
+
export function summarizeChildFailure(input) {
|
|
56
|
+
const max = Math.max(1, input.max ?? 3);
|
|
57
|
+
const raw = (input.stderr ?? '').trim() || (input.stdout ?? '').trim();
|
|
58
|
+
if (!raw)
|
|
59
|
+
return '';
|
|
60
|
+
const all = raw
|
|
61
|
+
.split('\n')
|
|
62
|
+
.map((line) => line.trimEnd())
|
|
63
|
+
.filter((line) => line.trim().length > 0);
|
|
64
|
+
const informative = all.filter((line) => !isBoilerplate(line));
|
|
65
|
+
if (informative.length === 0)
|
|
66
|
+
return all.slice(-max).join('\n');
|
|
67
|
+
const first = informative.findIndex(isSignal);
|
|
68
|
+
if (first < 0)
|
|
69
|
+
return informative.slice(-max).join('\n');
|
|
70
|
+
// From the signal line, keep only what BELONGS to it: its indented
|
|
71
|
+
// continuation lines (` @fx/local/plugin (failed: …)`) and any further
|
|
72
|
+
// signal lines. Unrelated chatter a long-lived host prints on the way out
|
|
73
|
+
// (the OpenTUI janitor's exit sweep, progress lines) is not the cause and
|
|
74
|
+
// must not occupy the operator's three lines.
|
|
75
|
+
const signal = informative[first];
|
|
76
|
+
if (signal === undefined)
|
|
77
|
+
return informative.slice(-max).join('\n');
|
|
78
|
+
const detail = [signal];
|
|
79
|
+
for (const line of informative.slice(first + 1, first + max)) {
|
|
80
|
+
if (!/^\s/.test(line) && !isSignal(line))
|
|
81
|
+
break;
|
|
82
|
+
detail.push(line);
|
|
83
|
+
}
|
|
84
|
+
return detail.join('\n');
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=child-failure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child-failure.js","sourceRoot":"","sources":["../../src/cli/child-failure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,uDAAuD;AACvD,MAAM,WAAW,GAA0B;IAC1C,qBAAqB;IACrB,SAAS;IACT,cAAc;IACd,aAAa;IACb,iBAAiB;CACjB,CAAC;AAEF,oEAAoE;AACpE,MAAM,MAAM,GAA0B;IACrC,iBAAiB;IACjB,iBAAiB;IACjB,qBAAqB;IACrB,iBAAiB;IACjB,uBAAuB;IACvB,iCAAiC;CACjC,CAAC;AAEF,SAAS,aAAa,CAAC,IAAY;IAClC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC7B,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACrD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAIrC;IACA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IACx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AAK,CAAC,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC,EAAE,CAAC;QAC9D,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YAAE,MAAM;QAChD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { UIContext } from '@vibesdotdev/cli/providers';
|
|
2
|
+
import type { CLICommandAssetDescriptor } from '@vibesdotdev/cli/schemas/types';
|
|
3
|
+
import type { VibesRuntime } from '@vibesdotdev/kernel/api/runtime';
|
|
4
|
+
import type { PluginsCLIContext } from './schemas/context.ts';
|
|
5
|
+
export type { PluginsCLIContext } from './schemas/context.ts';
|
|
6
|
+
export declare abstract class PluginsCLICommand {
|
|
7
|
+
protected readonly runtime: VibesRuntime;
|
|
8
|
+
protected readonly ui: UIContext;
|
|
9
|
+
protected readonly format: string;
|
|
10
|
+
constructor(_descriptor: CLICommandAssetDescriptor, context: PluginsCLIContext);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=context.d.ts.map
|