@evref-bl/dev-nexus 0.1.0-alpha.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/README.md +677 -0
- package/dist/browserOpener.d.ts +9 -0
- package/dist/browserOpener.js +47 -0
- package/dist/cli.d.ts +18 -0
- package/dist/cli.js +2374 -0
- package/dist/gitWorktreeService.d.ts +57 -0
- package/dist/gitWorktreeService.js +157 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +47 -0
- package/dist/nexusAgentMcpConfig.d.ts +30 -0
- package/dist/nexusAgentMcpConfig.js +228 -0
- package/dist/nexusAutomation.d.ts +103 -0
- package/dist/nexusAutomation.js +390 -0
- package/dist/nexusAutomationAgentLaunch.d.ts +148 -0
- package/dist/nexusAutomationAgentLaunch.js +855 -0
- package/dist/nexusAutomationAgentProfile.d.ts +39 -0
- package/dist/nexusAutomationAgentProfile.js +103 -0
- package/dist/nexusAutomationAgentSurface.d.ts +62 -0
- package/dist/nexusAutomationAgentSurface.js +90 -0
- package/dist/nexusAutomationCommandExecutor.d.ts +29 -0
- package/dist/nexusAutomationCommandExecutor.js +251 -0
- package/dist/nexusAutomationConfig.d.ts +114 -0
- package/dist/nexusAutomationConfig.js +547 -0
- package/dist/nexusAutomationEnqueue.d.ts +37 -0
- package/dist/nexusAutomationEnqueue.js +128 -0
- package/dist/nexusAutomationRunOnce.d.ts +91 -0
- package/dist/nexusAutomationRunOnce.js +586 -0
- package/dist/nexusAutomationScheduler.d.ts +50 -0
- package/dist/nexusAutomationScheduler.js +196 -0
- package/dist/nexusAutomationStatus.d.ts +55 -0
- package/dist/nexusAutomationStatus.js +462 -0
- package/dist/nexusAutomationTarget.d.ts +19 -0
- package/dist/nexusAutomationTarget.js +33 -0
- package/dist/nexusAutomationTargetCycle.d.ts +90 -0
- package/dist/nexusAutomationTargetCycle.js +282 -0
- package/dist/nexusAutomationTargetReport.d.ts +136 -0
- package/dist/nexusAutomationTargetReport.js +504 -0
- package/dist/nexusAutomationWorktreeSetup.d.ts +89 -0
- package/dist/nexusAutomationWorktreeSetup.js +661 -0
- package/dist/nexusCoordination.d.ts +198 -0
- package/dist/nexusCoordination.js +1018 -0
- package/dist/nexusExtension.d.ts +31 -0
- package/dist/nexusExtension.js +1 -0
- package/dist/nexusHomeConfig.d.ts +38 -0
- package/dist/nexusHomeConfig.js +133 -0
- package/dist/nexusMcpServer.d.ts +31 -0
- package/dist/nexusMcpServer.js +1036 -0
- package/dist/nexusPluginCapabilities.d.ts +197 -0
- package/dist/nexusPluginCapabilities.js +201 -0
- package/dist/nexusProjectConfig.d.ts +95 -0
- package/dist/nexusProjectConfig.js +880 -0
- package/dist/nexusProjectHomeService.d.ts +121 -0
- package/dist/nexusProjectHomeService.js +171 -0
- package/dist/nexusProjectLifecycle.d.ts +62 -0
- package/dist/nexusProjectLifecycle.js +205 -0
- package/dist/nexusProjectOperations.d.ts +101 -0
- package/dist/nexusProjectOperations.js +296 -0
- package/dist/nexusProjectRegistry.d.ts +42 -0
- package/dist/nexusProjectRegistry.js +91 -0
- package/dist/nexusProjectScaffold.d.ts +25 -0
- package/dist/nexusProjectScaffold.js +61 -0
- package/dist/nexusProjectTemplate.d.ts +34 -0
- package/dist/nexusProjectTemplate.js +354 -0
- package/dist/nexusSkills.d.ts +134 -0
- package/dist/nexusSkills.js +647 -0
- package/dist/nexusWorkerContextBundle.d.ts +142 -0
- package/dist/nexusWorkerContextBundle.js +375 -0
- package/dist/processSupervisor.d.ts +89 -0
- package/dist/processSupervisor.js +440 -0
- package/dist/vibeKanbanApi.d.ts +11 -0
- package/dist/vibeKanbanApi.js +14 -0
- package/dist/vibeKanbanAuth.d.ts +25 -0
- package/dist/vibeKanbanAuth.js +101 -0
- package/dist/vibeKanbanBoardAdapter.d.ts +36 -0
- package/dist/vibeKanbanBoardAdapter.js +196 -0
- package/dist/vibeKanbanMcpConfig.d.ts +36 -0
- package/dist/vibeKanbanMcpConfig.js +191 -0
- package/dist/vibeKanbanProjectAdapter.d.ts +39 -0
- package/dist/vibeKanbanProjectAdapter.js +113 -0
- package/dist/vibeKanbanWorkspaceSetup.d.ts +1 -0
- package/dist/vibeKanbanWorkspaceSetup.js +96 -0
- package/dist/workItemService.d.ts +60 -0
- package/dist/workItemService.js +163 -0
- package/dist/workTrackingGitHubProvider.d.ts +71 -0
- package/dist/workTrackingGitHubProvider.js +663 -0
- package/dist/workTrackingGitLabProvider.d.ts +62 -0
- package/dist/workTrackingGitLabProvider.js +523 -0
- package/dist/workTrackingJiraProvider.d.ts +67 -0
- package/dist/workTrackingJiraProvider.js +652 -0
- package/dist/workTrackingLocalProvider.d.ts +49 -0
- package/dist/workTrackingLocalProvider.js +463 -0
- package/dist/workTrackingProviderService.d.ts +21 -0
- package/dist/workTrackingProviderService.js +117 -0
- package/dist/workTrackingTypes.d.ts +202 -0
- package/dist/workTrackingTypes.js +1 -0
- package/dist/workTrackingVibeProvider.d.ts +35 -0
- package/dist/workTrackingVibeProvider.js +119 -0
- package/dist/worktreeExecutionMetadata.d.ts +76 -0
- package/dist/worktreeExecutionMetadata.js +239 -0
- package/package.json +37 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
export type NexusPluginCapabilityKind = "projected_skill" | "mcp_server" | "setup_obligation" | "environment_hint" | "cleanup_hook" | "agent_affordance" | "dependency_projection" | "worker_context_fragment" | "worker_briefing_fragment";
|
|
2
|
+
export type NexusPluginWorkerFragmentCapabilityKind = "worker_context_fragment" | "worker_briefing_fragment";
|
|
3
|
+
export type NexusPluginCleanupHookTrigger = "before_run" | "after_run" | "manual";
|
|
4
|
+
export type NexusPluginDependencyProjectionSourceControl = "support" | "source";
|
|
5
|
+
export declare const nexusPluginWorkerFragmentTitleMaxLength = 160;
|
|
6
|
+
export declare const nexusPluginWorkerFragmentBodyMaxLength = 4000;
|
|
7
|
+
export declare const nexusPluginWorkerFragmentProvenanceMaxLength = 240;
|
|
8
|
+
export interface NexusPluginCapabilityBase {
|
|
9
|
+
kind: NexusPluginCapabilityKind;
|
|
10
|
+
id: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface NexusPluginProjectedSkillCapability extends NexusPluginCapabilityBase {
|
|
14
|
+
kind: "projected_skill";
|
|
15
|
+
skillId: string;
|
|
16
|
+
targetAgents?: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface NexusPluginMcpToolCapability {
|
|
19
|
+
name: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface NexusPluginMcpServerCapability extends NexusPluginCapabilityBase {
|
|
23
|
+
kind: "mcp_server";
|
|
24
|
+
serverName: string;
|
|
25
|
+
tools?: NexusPluginMcpToolCapability[];
|
|
26
|
+
}
|
|
27
|
+
export interface NexusPluginSetupObligationCapability extends NexusPluginCapabilityBase {
|
|
28
|
+
kind: "setup_obligation";
|
|
29
|
+
description: string;
|
|
30
|
+
required?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface NexusPluginEnvironmentHintCapability extends NexusPluginCapabilityBase {
|
|
33
|
+
kind: "environment_hint";
|
|
34
|
+
variable: string;
|
|
35
|
+
valueHint?: string;
|
|
36
|
+
required?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface NexusPluginCleanupHookCapability extends NexusPluginCapabilityBase {
|
|
39
|
+
kind: "cleanup_hook";
|
|
40
|
+
description: string;
|
|
41
|
+
trigger?: NexusPluginCleanupHookTrigger;
|
|
42
|
+
required?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface NexusPluginAgentAffordanceCapability extends NexusPluginCapabilityBase {
|
|
45
|
+
kind: "agent_affordance";
|
|
46
|
+
description: string;
|
|
47
|
+
}
|
|
48
|
+
export interface NexusPluginDependencyProjectionCapability extends NexusPluginCapabilityBase {
|
|
49
|
+
kind: "dependency_projection";
|
|
50
|
+
source: string;
|
|
51
|
+
target: string;
|
|
52
|
+
required?: boolean;
|
|
53
|
+
sourceControl?: NexusPluginDependencyProjectionSourceControl;
|
|
54
|
+
targetAgents?: string[];
|
|
55
|
+
targetComponents?: string[];
|
|
56
|
+
reason?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface NexusPluginWorkerFragmentCapability extends NexusPluginCapabilityBase {
|
|
59
|
+
kind: NexusPluginWorkerFragmentCapabilityKind;
|
|
60
|
+
title: string;
|
|
61
|
+
body: string;
|
|
62
|
+
targetAgents?: string[];
|
|
63
|
+
targetComponents?: string[];
|
|
64
|
+
provenance: string;
|
|
65
|
+
}
|
|
66
|
+
export type NexusPluginCapabilityRecord = NexusPluginProjectedSkillCapability | NexusPluginMcpServerCapability | NexusPluginSetupObligationCapability | NexusPluginEnvironmentHintCapability | NexusPluginCleanupHookCapability | NexusPluginAgentAffordanceCapability | NexusPluginDependencyProjectionCapability | NexusPluginWorkerFragmentCapability;
|
|
67
|
+
export interface NexusProjectPluginConfig {
|
|
68
|
+
id: string;
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
name?: string;
|
|
71
|
+
version?: string;
|
|
72
|
+
capabilities: NexusPluginCapabilityRecord[];
|
|
73
|
+
}
|
|
74
|
+
export type NexusProjectPluginsConfig = NexusProjectPluginConfig[];
|
|
75
|
+
export type NexusPluginCapabilityProjectionRecord = {
|
|
76
|
+
kind: "projected_skill";
|
|
77
|
+
id: string;
|
|
78
|
+
description: string | null;
|
|
79
|
+
skillId: string;
|
|
80
|
+
targetAgents: string[];
|
|
81
|
+
} | {
|
|
82
|
+
kind: "mcp_server";
|
|
83
|
+
id: string;
|
|
84
|
+
description: string | null;
|
|
85
|
+
serverName: string;
|
|
86
|
+
tools: Array<{
|
|
87
|
+
name: string;
|
|
88
|
+
description: string | null;
|
|
89
|
+
}>;
|
|
90
|
+
} | {
|
|
91
|
+
kind: "setup_obligation";
|
|
92
|
+
id: string;
|
|
93
|
+
description: string;
|
|
94
|
+
required: boolean;
|
|
95
|
+
} | {
|
|
96
|
+
kind: "environment_hint";
|
|
97
|
+
id: string;
|
|
98
|
+
description: string | null;
|
|
99
|
+
variable: string;
|
|
100
|
+
valueHint: string | null;
|
|
101
|
+
required: boolean;
|
|
102
|
+
} | {
|
|
103
|
+
kind: "cleanup_hook";
|
|
104
|
+
id: string;
|
|
105
|
+
description: string;
|
|
106
|
+
trigger: NexusPluginCleanupHookTrigger | null;
|
|
107
|
+
required: boolean;
|
|
108
|
+
} | {
|
|
109
|
+
kind: "agent_affordance";
|
|
110
|
+
id: string;
|
|
111
|
+
description: string;
|
|
112
|
+
} | {
|
|
113
|
+
kind: "dependency_projection";
|
|
114
|
+
id: string;
|
|
115
|
+
description: string | null;
|
|
116
|
+
source: string;
|
|
117
|
+
target: string;
|
|
118
|
+
required: boolean;
|
|
119
|
+
sourceControl: NexusPluginDependencyProjectionSourceControl;
|
|
120
|
+
targetAgents: string[];
|
|
121
|
+
targetComponents: string[];
|
|
122
|
+
reason: string | null;
|
|
123
|
+
} | {
|
|
124
|
+
kind: NexusPluginWorkerFragmentCapabilityKind;
|
|
125
|
+
id: string;
|
|
126
|
+
description: string | null;
|
|
127
|
+
title: string;
|
|
128
|
+
body: string;
|
|
129
|
+
targetAgents: string[];
|
|
130
|
+
targetComponents: string[];
|
|
131
|
+
provenance: string;
|
|
132
|
+
advisory: true;
|
|
133
|
+
};
|
|
134
|
+
export interface NexusPluginCapabilityProjection {
|
|
135
|
+
pluginId: string;
|
|
136
|
+
pluginName: string | null;
|
|
137
|
+
version: string | null;
|
|
138
|
+
capabilityCount: number;
|
|
139
|
+
capabilities: NexusPluginCapabilityProjectionRecord[];
|
|
140
|
+
}
|
|
141
|
+
export interface NexusPluginWorkerFragmentSource {
|
|
142
|
+
pluginId: string;
|
|
143
|
+
pluginName: string | null;
|
|
144
|
+
version: string | null;
|
|
145
|
+
capabilityId: string;
|
|
146
|
+
}
|
|
147
|
+
export interface NexusPluginWorkerFragmentProjection {
|
|
148
|
+
kind: NexusPluginWorkerFragmentCapabilityKind;
|
|
149
|
+
id: string;
|
|
150
|
+
title: string;
|
|
151
|
+
body: string;
|
|
152
|
+
provenance: string;
|
|
153
|
+
advisory: true;
|
|
154
|
+
targetAgents: string[];
|
|
155
|
+
targetComponents: string[];
|
|
156
|
+
source: NexusPluginWorkerFragmentSource;
|
|
157
|
+
}
|
|
158
|
+
export interface NexusPluginWorkerFragmentsProjection {
|
|
159
|
+
context: NexusPluginWorkerFragmentProjection[];
|
|
160
|
+
briefing: NexusPluginWorkerFragmentProjection[];
|
|
161
|
+
}
|
|
162
|
+
export interface ProjectPluginWorkerFragmentsOptions {
|
|
163
|
+
componentId?: string | null;
|
|
164
|
+
agent?: string | null;
|
|
165
|
+
}
|
|
166
|
+
export interface NexusPluginDependencyProjectionSource {
|
|
167
|
+
pluginId: string;
|
|
168
|
+
pluginName: string | null;
|
|
169
|
+
version: string | null;
|
|
170
|
+
capabilityId: string;
|
|
171
|
+
}
|
|
172
|
+
export interface NexusPluginDependencyProjection {
|
|
173
|
+
kind: "dependency_projection";
|
|
174
|
+
id: string;
|
|
175
|
+
description: string | null;
|
|
176
|
+
source: string;
|
|
177
|
+
target: string;
|
|
178
|
+
required: boolean;
|
|
179
|
+
sourceControl: NexusPluginDependencyProjectionSourceControl;
|
|
180
|
+
targetAgents: string[];
|
|
181
|
+
targetComponents: string[];
|
|
182
|
+
reason: string | null;
|
|
183
|
+
pluginSource: NexusPluginDependencyProjectionSource;
|
|
184
|
+
}
|
|
185
|
+
export interface ProjectPluginDependencyProjectionsOptions {
|
|
186
|
+
componentId?: string | null;
|
|
187
|
+
agent?: string | null;
|
|
188
|
+
}
|
|
189
|
+
export declare function projectPluginCapabilityProjections(config: {
|
|
190
|
+
plugins?: NexusProjectPluginsConfig;
|
|
191
|
+
}): NexusPluginCapabilityProjection[];
|
|
192
|
+
export declare function projectPluginWorkerFragments(config: {
|
|
193
|
+
plugins?: NexusProjectPluginsConfig;
|
|
194
|
+
}, options?: ProjectPluginWorkerFragmentsOptions): NexusPluginWorkerFragmentsProjection;
|
|
195
|
+
export declare function projectPluginDependencyProjections(config: {
|
|
196
|
+
plugins?: NexusProjectPluginsConfig;
|
|
197
|
+
}, options?: ProjectPluginDependencyProjectionsOptions): NexusPluginDependencyProjection[];
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
export const nexusPluginWorkerFragmentTitleMaxLength = 160;
|
|
2
|
+
export const nexusPluginWorkerFragmentBodyMaxLength = 4000;
|
|
3
|
+
export const nexusPluginWorkerFragmentProvenanceMaxLength = 240;
|
|
4
|
+
export function projectPluginCapabilityProjections(config) {
|
|
5
|
+
return (config.plugins ?? [])
|
|
6
|
+
.filter((plugin) => plugin.enabled !== false)
|
|
7
|
+
.map((plugin) => {
|
|
8
|
+
const capabilities = plugin.capabilities.map(projectCapabilityRecord);
|
|
9
|
+
return {
|
|
10
|
+
pluginId: plugin.id,
|
|
11
|
+
pluginName: plugin.name ?? null,
|
|
12
|
+
version: plugin.version ?? null,
|
|
13
|
+
capabilityCount: capabilities.length,
|
|
14
|
+
capabilities,
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export function projectPluginWorkerFragments(config, options = {}) {
|
|
19
|
+
const fragments = (config.plugins ?? [])
|
|
20
|
+
.filter((plugin) => plugin.enabled !== false)
|
|
21
|
+
.flatMap((plugin) => plugin.capabilities
|
|
22
|
+
.filter(isWorkerFragmentCapability)
|
|
23
|
+
.filter((capability) => workerFragmentMatchesScope(capability, options))
|
|
24
|
+
.map((capability) => projectWorkerFragment(plugin, capability)))
|
|
25
|
+
.sort(compareProjectedWorkerFragments);
|
|
26
|
+
return {
|
|
27
|
+
context: fragments.filter((fragment) => fragment.kind === "worker_context_fragment"),
|
|
28
|
+
briefing: fragments.filter((fragment) => fragment.kind === "worker_briefing_fragment"),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export function projectPluginDependencyProjections(config, options = {}) {
|
|
32
|
+
return (config.plugins ?? [])
|
|
33
|
+
.filter((plugin) => plugin.enabled !== false)
|
|
34
|
+
.flatMap((plugin) => plugin.capabilities
|
|
35
|
+
.filter(isDependencyProjectionCapability)
|
|
36
|
+
.filter((capability) => dependencyProjectionMatchesScope(capability, options))
|
|
37
|
+
.map((capability) => projectDependencyProjection(plugin, capability)))
|
|
38
|
+
.sort(compareProjectedDependencyProjections);
|
|
39
|
+
}
|
|
40
|
+
function projectCapabilityRecord(capability) {
|
|
41
|
+
if (capability.kind === "projected_skill") {
|
|
42
|
+
return {
|
|
43
|
+
kind: capability.kind,
|
|
44
|
+
id: capability.id,
|
|
45
|
+
description: capability.description ?? null,
|
|
46
|
+
skillId: capability.skillId,
|
|
47
|
+
targetAgents: capability.targetAgents ?? [],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
if (capability.kind === "mcp_server") {
|
|
51
|
+
return {
|
|
52
|
+
kind: capability.kind,
|
|
53
|
+
id: capability.id,
|
|
54
|
+
description: capability.description ?? null,
|
|
55
|
+
serverName: capability.serverName,
|
|
56
|
+
tools: (capability.tools ?? []).map((tool) => ({
|
|
57
|
+
name: tool.name,
|
|
58
|
+
description: tool.description ?? null,
|
|
59
|
+
})),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
if (capability.kind === "setup_obligation") {
|
|
63
|
+
return {
|
|
64
|
+
kind: capability.kind,
|
|
65
|
+
id: capability.id,
|
|
66
|
+
description: capability.description,
|
|
67
|
+
required: capability.required ?? false,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (capability.kind === "environment_hint") {
|
|
71
|
+
return {
|
|
72
|
+
kind: capability.kind,
|
|
73
|
+
id: capability.id,
|
|
74
|
+
description: capability.description ?? null,
|
|
75
|
+
variable: capability.variable,
|
|
76
|
+
valueHint: capability.valueHint ?? null,
|
|
77
|
+
required: capability.required ?? false,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
if (capability.kind === "cleanup_hook") {
|
|
81
|
+
return {
|
|
82
|
+
kind: capability.kind,
|
|
83
|
+
id: capability.id,
|
|
84
|
+
description: capability.description,
|
|
85
|
+
trigger: capability.trigger ?? null,
|
|
86
|
+
required: capability.required ?? false,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
if (isDependencyProjectionCapability(capability)) {
|
|
90
|
+
return {
|
|
91
|
+
kind: capability.kind,
|
|
92
|
+
id: capability.id,
|
|
93
|
+
description: capability.description ?? null,
|
|
94
|
+
source: capability.source,
|
|
95
|
+
target: capability.target,
|
|
96
|
+
required: capability.required ?? false,
|
|
97
|
+
sourceControl: capability.sourceControl ?? "support",
|
|
98
|
+
targetAgents: capability.targetAgents ?? [],
|
|
99
|
+
targetComponents: capability.targetComponents ?? [],
|
|
100
|
+
reason: capability.reason ?? null,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
if (isWorkerFragmentCapability(capability)) {
|
|
104
|
+
return {
|
|
105
|
+
kind: capability.kind,
|
|
106
|
+
id: capability.id,
|
|
107
|
+
description: capability.description ?? null,
|
|
108
|
+
title: capability.title,
|
|
109
|
+
body: capability.body,
|
|
110
|
+
targetAgents: capability.targetAgents ?? [],
|
|
111
|
+
targetComponents: capability.targetComponents ?? [],
|
|
112
|
+
provenance: capability.provenance,
|
|
113
|
+
advisory: true,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
kind: capability.kind,
|
|
118
|
+
id: capability.id,
|
|
119
|
+
description: capability.description,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function projectDependencyProjection(plugin, capability) {
|
|
123
|
+
return {
|
|
124
|
+
kind: capability.kind,
|
|
125
|
+
id: capability.id,
|
|
126
|
+
description: capability.description ?? null,
|
|
127
|
+
source: capability.source,
|
|
128
|
+
target: capability.target,
|
|
129
|
+
required: capability.required ?? false,
|
|
130
|
+
sourceControl: capability.sourceControl ?? "support",
|
|
131
|
+
targetAgents: capability.targetAgents ?? [],
|
|
132
|
+
targetComponents: capability.targetComponents ?? [],
|
|
133
|
+
reason: capability.reason ?? null,
|
|
134
|
+
pluginSource: {
|
|
135
|
+
pluginId: plugin.id,
|
|
136
|
+
pluginName: plugin.name ?? null,
|
|
137
|
+
version: plugin.version ?? null,
|
|
138
|
+
capabilityId: capability.id,
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function projectWorkerFragment(plugin, capability) {
|
|
143
|
+
return {
|
|
144
|
+
kind: capability.kind,
|
|
145
|
+
id: capability.id,
|
|
146
|
+
title: capability.title,
|
|
147
|
+
body: capability.body,
|
|
148
|
+
provenance: capability.provenance,
|
|
149
|
+
advisory: true,
|
|
150
|
+
targetAgents: capability.targetAgents ?? [],
|
|
151
|
+
targetComponents: capability.targetComponents ?? [],
|
|
152
|
+
source: {
|
|
153
|
+
pluginId: plugin.id,
|
|
154
|
+
pluginName: plugin.name ?? null,
|
|
155
|
+
version: plugin.version ?? null,
|
|
156
|
+
capabilityId: capability.id,
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
function isDependencyProjectionCapability(capability) {
|
|
161
|
+
return capability.kind === "dependency_projection";
|
|
162
|
+
}
|
|
163
|
+
function isWorkerFragmentCapability(capability) {
|
|
164
|
+
return (capability.kind === "worker_context_fragment" ||
|
|
165
|
+
capability.kind === "worker_briefing_fragment");
|
|
166
|
+
}
|
|
167
|
+
function dependencyProjectionMatchesScope(capability, options) {
|
|
168
|
+
return (targetMatches(capability.targetComponents, options.componentId) &&
|
|
169
|
+
targetMatches(capability.targetAgents, options.agent));
|
|
170
|
+
}
|
|
171
|
+
function workerFragmentMatchesScope(capability, options) {
|
|
172
|
+
return (targetMatches(capability.targetComponents, options.componentId) &&
|
|
173
|
+
targetMatches(capability.targetAgents, options.agent));
|
|
174
|
+
}
|
|
175
|
+
function targetMatches(targets, activeTarget) {
|
|
176
|
+
if (!targets || targets.length === 0 || !activeTarget) {
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
return targets.includes(activeTarget);
|
|
180
|
+
}
|
|
181
|
+
function compareProjectedDependencyProjections(left, right) {
|
|
182
|
+
return (compareStrings(left.pluginSource.pluginId, right.pluginSource.pluginId) ||
|
|
183
|
+
compareStrings(left.id, right.id) ||
|
|
184
|
+
compareStrings(left.source, right.source) ||
|
|
185
|
+
compareStrings(left.target, right.target));
|
|
186
|
+
}
|
|
187
|
+
function compareProjectedWorkerFragments(left, right) {
|
|
188
|
+
return (compareStrings(left.source.pluginId, right.source.pluginId) ||
|
|
189
|
+
compareStrings(left.id, right.id) ||
|
|
190
|
+
compareStrings(left.kind, right.kind) ||
|
|
191
|
+
compareStrings(left.provenance, right.provenance));
|
|
192
|
+
}
|
|
193
|
+
function compareStrings(left, right) {
|
|
194
|
+
if (left < right) {
|
|
195
|
+
return -1;
|
|
196
|
+
}
|
|
197
|
+
if (left > right) {
|
|
198
|
+
return 1;
|
|
199
|
+
}
|
|
200
|
+
return 0;
|
|
201
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { WorkTrackingConfig } from "./workTrackingTypes.js";
|
|
2
|
+
import type { NexusProjectSkillsConfig, NexusSkillSourceControl } from "./nexusSkills.js";
|
|
3
|
+
import { type NexusProjectPluginsConfig } from "./nexusPluginCapabilities.js";
|
|
4
|
+
import { type NexusAutomationConfig, type NexusAutomationPublicationConfig, type NexusAutomationVerificationConfig } from "./nexusAutomationConfig.js";
|
|
5
|
+
export declare const devNexusProjectConfigFileName = "dev-nexus.project.json";
|
|
6
|
+
export declare const nexusProjectWorktreesDirectoryName = "worktrees";
|
|
7
|
+
export type NexusProjectRepoKind = "local" | "git";
|
|
8
|
+
export interface NexusProjectRepoConfig {
|
|
9
|
+
kind: NexusProjectRepoKind;
|
|
10
|
+
remoteUrl: string | null;
|
|
11
|
+
defaultBranch: string | null;
|
|
12
|
+
sourceRoot?: string;
|
|
13
|
+
}
|
|
14
|
+
export type NexusProjectComponentRole = "primary" | "extension" | "addon" | "dependency" | "optional";
|
|
15
|
+
export type NexusProjectComponentRelationshipKind = "extends" | "depends_on" | "optional" | "related";
|
|
16
|
+
export interface NexusProjectComponentRelationshipConfig {
|
|
17
|
+
kind: NexusProjectComponentRelationshipKind;
|
|
18
|
+
componentId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface NexusProjectComponentConfig {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
kind: NexusProjectRepoKind;
|
|
24
|
+
role: NexusProjectComponentRole;
|
|
25
|
+
remoteUrl: string | null;
|
|
26
|
+
defaultBranch: string | null;
|
|
27
|
+
sourceRoot?: string;
|
|
28
|
+
worktreesRoot?: string;
|
|
29
|
+
workTracking?: WorkTrackingConfig;
|
|
30
|
+
verification?: Partial<NexusAutomationVerificationConfig>;
|
|
31
|
+
publication?: Partial<NexusAutomationPublicationConfig>;
|
|
32
|
+
relationships: NexusProjectComponentRelationshipConfig[];
|
|
33
|
+
}
|
|
34
|
+
export interface NexusAgentConfig {
|
|
35
|
+
executor?: string;
|
|
36
|
+
model?: string;
|
|
37
|
+
reasoning?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface NexusProjectKanbanConfig {
|
|
40
|
+
provider: "vibe-kanban";
|
|
41
|
+
projectId: string | null;
|
|
42
|
+
}
|
|
43
|
+
export type NexusProjectExtensionsConfig = Record<string, Record<string, unknown>>;
|
|
44
|
+
export interface NexusProjectAgentMcpTarget {
|
|
45
|
+
agent: string;
|
|
46
|
+
enabled?: boolean;
|
|
47
|
+
configPath?: string;
|
|
48
|
+
sourceControl?: NexusSkillSourceControl;
|
|
49
|
+
serverName?: string;
|
|
50
|
+
command?: string;
|
|
51
|
+
args?: string[];
|
|
52
|
+
}
|
|
53
|
+
export interface NexusProjectMcpConfig {
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
sourceControl?: NexusSkillSourceControl;
|
|
56
|
+
serverName?: string;
|
|
57
|
+
command?: string;
|
|
58
|
+
args?: string[];
|
|
59
|
+
agentTargets?: NexusProjectAgentMcpTarget[];
|
|
60
|
+
}
|
|
61
|
+
export interface NexusProjectConfig {
|
|
62
|
+
version: 1;
|
|
63
|
+
id: string;
|
|
64
|
+
name: string;
|
|
65
|
+
home: string | null;
|
|
66
|
+
repo: NexusProjectRepoConfig;
|
|
67
|
+
components: NexusProjectComponentConfig[];
|
|
68
|
+
worktreesRoot: string;
|
|
69
|
+
kanban: NexusProjectKanbanConfig;
|
|
70
|
+
workTracking?: WorkTrackingConfig;
|
|
71
|
+
extensions?: NexusProjectExtensionsConfig;
|
|
72
|
+
agent?: NexusAgentConfig;
|
|
73
|
+
mcp?: NexusProjectMcpConfig;
|
|
74
|
+
skills?: NexusProjectSkillsConfig;
|
|
75
|
+
plugins?: NexusProjectPluginsConfig;
|
|
76
|
+
automation?: NexusAutomationConfig;
|
|
77
|
+
}
|
|
78
|
+
export interface ResolveNexusAgentConfigOptions {
|
|
79
|
+
issue?: NexusAgentConfig;
|
|
80
|
+
project?: Pick<NexusProjectConfig, "agent"> | NexusAgentConfig;
|
|
81
|
+
home?: {
|
|
82
|
+
agent?: NexusAgentConfig;
|
|
83
|
+
} | NexusAgentConfig;
|
|
84
|
+
fallback?: NexusAgentConfig;
|
|
85
|
+
}
|
|
86
|
+
export declare class NexusConfigError extends Error {
|
|
87
|
+
constructor(message: string);
|
|
88
|
+
}
|
|
89
|
+
export declare function projectConfigPath(projectRootPath: string): string;
|
|
90
|
+
export declare function projectWorktreesRootPath(projectRootPath: string, config?: Pick<NexusProjectConfig, "worktreesRoot">): string;
|
|
91
|
+
export declare function validateNexusAgentConfig(value: unknown, pathName: string): NexusAgentConfig | undefined;
|
|
92
|
+
export declare function resolveNexusAgentConfig(options: ResolveNexusAgentConfigOptions): NexusAgentConfig;
|
|
93
|
+
export declare function validateProjectConfig(value: unknown): NexusProjectConfig;
|
|
94
|
+
export declare function loadProjectConfig(projectRootPath: string): NexusProjectConfig;
|
|
95
|
+
export declare function saveProjectConfig(projectRootPath: string, config: NexusProjectConfig): string;
|