synedgy.universal.helper.psd1
|
# # Module manifest for module 'synedgy.universal.helper' # # Generated by: Gael Colas # # Generated on: 07/07/2025 # @{ # Script module or binary module file associated with this manifest. RootModule = 'synedgy.universal.helper.psm1' # Version number of this module. ModuleVersion = '0.2.2' # Supported PSEditions # CompatiblePSEditions = @() # ID used to uniquely identify this module GUID = 'a85284d9-2b09-458b-8b3a-9d24e643239b' # Author of this module Author = 'Gael Colas' # Company or vendor of this module CompanyName = 'Gael Colas' # Copyright statement for this module Copyright = '(c) Gael Colas. All rights reserved.' # Description of the functionality provided by this module Description = 'A bunch of PowerShell Universal helpers to make your experience more productive' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '5.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @() # Assemblies that must be loaded prior to importing this module # RequiredAssemblies = @() # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = @('New-UDPsuJobHeader','New-UDPsuJobTerminalView','Get-ModuleAiTool','Get-ModuleApiEndpoint','Get-ModuleApiEndpointScriptblock','Import-PSUAiTool','Import-PSUEndpoint') # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = @() # Variables to export from this module VariablesToExport = @() # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = @() # DSC resources to export from this module DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. # Tags = @() # A URL to the license for this module. # LicenseUri = '' # A URL to the main website for this project. # ProjectUri = '' # A URL to an icon representing this module. # IconUri = '' # ReleaseNotes of this module ReleaseNotes = '## [0.2.2] - 2026-10-09 ### Changed - Changed `New-UDPsuJobTerminalView` job output retrieval to use the explicitly supplied `UniversalServerUrl` as `ComputerName`, or `Integrated` when no URL is supplied. The component no longer uses `Get-ModuleConfig` or assumes a localhost PSU URL. ### Added - Added `New-UDPsuJobHeader` and `New-UDPsuJobTerminalView` public functions under `UDComponents`, providing reusable Universal Dashboard components to render a PSU job summary header and a terminal-style job output view. - Added supporting private helpers `Convert-PlainTextToHtml`, `Convert-AnsiToHtml`, and `ConvertFrom-PsuJobOutputEntry` used by the new components. - Added `images/synedgy_pwsh` branding assets used by the new components. - Added automatic light/dark theming to `New-UDPsuJobHeader` and `New-UDPsuJobTerminalView` via a new `-Theme` parameter (`Auto` (default), `Light`, `Dark`). `Auto` follows PSU''s own theme switch live (no page reload), using the `data-theme` attribute PSU sets on `<html>`. The light palette is inspired by the classic PowerShell ISE / VS Code light theme colors. Added a `-CustomCss` parameter on both components for further customizing the look with raw CSS, which is appended after (and can override) the theme rules. - Added private helpers `Get-UDPsuJobThemePalette`, `Get-UDPsuJobThemeStyleBlock`, and `ConvertTo-UDPsuThemedIconMarkup` supporting the new theming feature. The themed icon helper always uses the plain monochrome `pwsh_custom_black.svg` icon for light theme and `pwsh_custom_white.svg` for dark theme. - Added `-HideLineNumbers` and `-HideTimestamps` switch parameters to `New-UDPsuJobTerminalView` to control whether line numbers and timestamps are shown by default for a first-time viewer (shown by default when omitted). A viewer''s own manual toggle choice, remembered in `localStorage`, still takes precedence over these defaults on later visits. - Added an `AiTool` class attribute (mirroring the existing `APIEndpoint` attribute pattern) that can decorate a public function to expose it as a PowerShell Universal AI tool. Added `Get-ModuleAiTool`, which scans a module''s exported functions for `[AiTool()]`-decorated commands and builds their registration metadata (`Name`, `Description`, `ScriptFullPath`, `Authenticated`, `Role`, `Mcp`, `Environment`), and `Import-PSUAiTool`, which registers each discovered function as a PSU Script (`New-PSUScript`) and AI tool (`New-PSUAiTool`) in one call, analogous to how `Import-PSUEndpoint` wires up `[APIEndpoint()]`-decorated functions. - Added `source/WikiSource` (Home, UD Job Components, API Endpoint Attribute, AI Tool Attribute, PSU Platform Notes pages, and screenshots) as the canonical source for the published GitHub wiki, and wired the `DscResource.DocGenerator` tasks (`Create_Wiki_Output_Folder`, `Generate_Conceptual_Help`, `Generate_Markdown_For_Public_Commands`, `Generate_External_Help_File_For_Public_Commands`, `Clean_Markdown_Of_Public_Commands`, `Copy_Source_Wiki_Folder`, `Generate_Wiki_Sidebar`, `Clean_Markdown_Metadata`) into the `build` workflow, a new `docs` workflow (`Package_Wiki_Content`) into `pack`, and enabled `Publish_GitHub_Wiki_Content` in the `publish` workflow in `build.yaml`. Added `PlatyPS` to `RequiredModules.psd1` (required for command markdown generation). ### Changed - `ConvertFrom-PsuJobOutputEntry`''s `StreamColor` property now returns a CSS `var(--psu-term-stream-*)` reference instead of a literal hex color, so job output stream coloring follows the light/dark theme instead of being fixed to one palette. This is a private helper; the change is only user-visible via the themed rendering of `New-UDPsuJobTerminalView`. - Changed Warning messages to Debug messages when overriding type accelerators. This is to reduce noise in the output and only show warnings for actual issues. ### Fixed - Fixed `New-UDPsuJobTerminalView` rendering a blank output panel when its `New-UDDynamic` refresh runspace could not rediscover the helper module or fetch live job output. The refresh runspace now imports the exact module path used by the parent dashboard, falls back to `-JobOutputSnapshot`, and displays a clear warning when live output is unavailable. Failures are also written to PSU Live Logs with structured job, view, runspace-stage, fallback, and exception context, without logging app tokens or job-output content. - Fixed `Import-PSUAiTool` leaking `New-PSUScript`''s return object onto its output pipeline alongside the intended `New-PSUAiTool` result. Since a module''s `.universal/aiTools.ps1` resource file is expected by PSU to emit only `AiTool` objects, the leaked `PowerShellUniversal.Script` object caused PSU to fail loading the configuration with `Cannot convert the "<Module>\<Command>" value of type "PowerShellUniversal.Script" to type "PowerShellUniversal.Models.Intelligence.AiTool"`, silently preventing all AI tools declared in that file from registering. `New-PSUScript`''s result is now suppressed with `$null =`. - Changed `Import-PSUAiTool` to only create a backing PSU Script when one doesn''t already exist for the `<Module>\<Command>` identity (via `Get-PSUScript`), instead of unconditionally re-declaring it on every config reload. A script may already be explicitly declared elsewhere (e.g. `scripts.ps1`) with more specific settings (Role, Timeout, Tags, etc.); the previous unconditional call would have silently overwritten that configuration with a bare-bones one every time PSU reloaded its config. - Fixed the themed icon (top-right/title-bar `>_` icon) in `New-UDPsuJobHeader` and `New-UDPsuJobTerminalView` always rendering the light (black) variant regardless of PSU''s active theme when `-Theme Auto` (the default). `ConvertTo-UDPsuThemedIconMarkup` was setting the light/dark icon spans'' default visibility via an inline `style` attribute, which always takes precedence over stylesheet rules regardless of CSS specificity -- so `Get-UDPsuJobThemeStyleBlock`''s `html[data-theme="dark"]` override rule could never actually flip visibility. The default and dark-mode-override display rules are now both defined in the `<style>` block instead, so the icon correctly switches color when the PSU theme switch is toggled live. - Fixed how the ApiVersion is set and can be overridden. - Fixed how the Documentation is set and can be overridden. ' # Prerelease string of this module Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' } |