From 106e492fae666f614c67b7804577cf1d02cbb78c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Feb 2026 17:02:13 +0000 Subject: [PATCH 1/6] Initial plan From 378e6ddd01c7cdf5b3de07a22e39d2d6d35f7caa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Feb 2026 17:06:01 +0000 Subject: [PATCH 2/6] Move step infrastructure from IdLE.Steps.Common to IdLE.Core Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com> --- src/IdLE.Core/IdLE.Core.psd1 | 3 ++- src/IdLE.Core/IdLE.Core.psm1 | 3 ++- .../Private/Invoke-IdleProviderMethod.ps1 | 0 .../Private/Test-IdleProviderMethodParameter.ps1 | 0 .../Public/Get-IdleStepMetadataCatalog.ps1 | 0 src/IdLE.Steps.Common/IdLE.Steps.Common.psd1 | 3 ++- src/IdLE.Steps.DirectorySync/IdLE.Steps.DirectorySync.psd1 | 1 + src/IdLE.Steps.Mailbox/IdLE.Steps.Mailbox.psd1 | 2 +- 8 files changed, 8 insertions(+), 4 deletions(-) rename src/{IdLE.Steps.Common => IdLE.Core}/Private/Invoke-IdleProviderMethod.ps1 (100%) rename src/{IdLE.Steps.Common => IdLE.Core}/Private/Test-IdleProviderMethodParameter.ps1 (100%) rename src/{IdLE.Steps.Common => IdLE.Core}/Public/Get-IdleStepMetadataCatalog.ps1 (100%) diff --git a/src/IdLE.Core/IdLE.Core.psd1 b/src/IdLE.Core/IdLE.Core.psd1 index 7ff00c9b..abfe87c6 100644 --- a/src/IdLE.Core/IdLE.Core.psd1 +++ b/src/IdLE.Core/IdLE.Core.psd1 @@ -13,7 +13,8 @@ 'New-IdlePlanObject', 'Invoke-IdlePlanObject', 'Export-IdlePlanObject', - 'New-IdleAuthSessionBroker' + 'New-IdleAuthSessionBroker', + 'Get-IdleStepMetadataCatalog' ) CmdletsToExport = @() AliasesToExport = @() diff --git a/src/IdLE.Core/IdLE.Core.psm1 b/src/IdLE.Core/IdLE.Core.psm1 index 0575360c..a789ae49 100644 --- a/src/IdLE.Core/IdLE.Core.psm1 +++ b/src/IdLE.Core/IdLE.Core.psm1 @@ -45,5 +45,6 @@ Export-ModuleMember -Function @( 'New-IdlePlanObject', 'Invoke-IdlePlanObject', 'Export-IdlePlanObject', - 'New-IdleAuthSessionBroker' + 'New-IdleAuthSessionBroker', + 'Get-IdleStepMetadataCatalog' ) -Alias @() diff --git a/src/IdLE.Steps.Common/Private/Invoke-IdleProviderMethod.ps1 b/src/IdLE.Core/Private/Invoke-IdleProviderMethod.ps1 similarity index 100% rename from src/IdLE.Steps.Common/Private/Invoke-IdleProviderMethod.ps1 rename to src/IdLE.Core/Private/Invoke-IdleProviderMethod.ps1 diff --git a/src/IdLE.Steps.Common/Private/Test-IdleProviderMethodParameter.ps1 b/src/IdLE.Core/Private/Test-IdleProviderMethodParameter.ps1 similarity index 100% rename from src/IdLE.Steps.Common/Private/Test-IdleProviderMethodParameter.ps1 rename to src/IdLE.Core/Private/Test-IdleProviderMethodParameter.ps1 diff --git a/src/IdLE.Steps.Common/Public/Get-IdleStepMetadataCatalog.ps1 b/src/IdLE.Core/Public/Get-IdleStepMetadataCatalog.ps1 similarity index 100% rename from src/IdLE.Steps.Common/Public/Get-IdleStepMetadataCatalog.ps1 rename to src/IdLE.Core/Public/Get-IdleStepMetadataCatalog.ps1 diff --git a/src/IdLE.Steps.Common/IdLE.Steps.Common.psd1 b/src/IdLE.Steps.Common/IdLE.Steps.Common.psd1 index 6958b740..da68cc19 100644 --- a/src/IdLE.Steps.Common/IdLE.Steps.Common.psd1 +++ b/src/IdLE.Steps.Common/IdLE.Steps.Common.psd1 @@ -7,8 +7,9 @@ Description = 'Common built-in steps for IdLE.' PowerShellVersion = '7.0' + RequiredModules = @('IdLE.Core') + FunctionsToExport = @( - 'Get-IdleStepMetadataCatalog', 'Invoke-IdleStepEmitEvent', 'Invoke-IdleStepEnsureAttribute', 'Invoke-IdleStepEnsureEntitlement', diff --git a/src/IdLE.Steps.DirectorySync/IdLE.Steps.DirectorySync.psd1 b/src/IdLE.Steps.DirectorySync/IdLE.Steps.DirectorySync.psd1 index 6189f3ef..ed07b09c 100644 --- a/src/IdLE.Steps.DirectorySync/IdLE.Steps.DirectorySync.psd1 +++ b/src/IdLE.Steps.DirectorySync/IdLE.Steps.DirectorySync.psd1 @@ -8,6 +8,7 @@ PowerShellVersion = '7.0' RequiredModules = @( + 'IdLE.Core', 'IdLE.Steps.Common' ) diff --git a/src/IdLE.Steps.Mailbox/IdLE.Steps.Mailbox.psd1 b/src/IdLE.Steps.Mailbox/IdLE.Steps.Mailbox.psd1 index 7572d6d4..b07d5d3d 100644 --- a/src/IdLE.Steps.Mailbox/IdLE.Steps.Mailbox.psd1 +++ b/src/IdLE.Steps.Mailbox/IdLE.Steps.Mailbox.psd1 @@ -7,7 +7,7 @@ Description = 'Provider-agnostic mailbox step pack for IdLE.' PowerShellVersion = '7.0' - RequiredModules = @('IdLE.Steps.Common') + RequiredModules = @('IdLE.Core', 'IdLE.Steps.Common') FunctionsToExport = @( 'Get-IdleStepMetadataCatalog', From 85f213ba7f6b488a22496f4315ef8e6974c0752b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Feb 2026 17:10:09 +0000 Subject: [PATCH 3/6] Make provider helpers public and restore step metadata to IdLE.Steps.Common Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com> --- src/IdLE.Core/IdLE.Core.psd1 | 4 +- src/IdLE.Core/IdLE.Core.psm1 | 4 +- .../Invoke-IdleProviderMethod.ps1 | 43 ++++++++++++ .../Test-IdleProviderMethodParameter.ps1 | 34 ++++++++++ src/IdLE.Steps.Common/IdLE.Steps.Common.psd1 | 1 + .../Public/Get-IdleStepMetadataCatalog.ps1 | 67 +++++++++++++++++++ 6 files changed, 151 insertions(+), 2 deletions(-) rename src/IdLE.Core/{Private => Public}/Invoke-IdleProviderMethod.ps1 (58%) rename src/IdLE.Core/{Private => Public}/Test-IdleProviderMethodParameter.ps1 (66%) create mode 100644 src/IdLE.Steps.Common/Public/Get-IdleStepMetadataCatalog.ps1 diff --git a/src/IdLE.Core/IdLE.Core.psd1 b/src/IdLE.Core/IdLE.Core.psd1 index abfe87c6..450d1669 100644 --- a/src/IdLE.Core/IdLE.Core.psd1 +++ b/src/IdLE.Core/IdLE.Core.psd1 @@ -14,7 +14,9 @@ 'Invoke-IdlePlanObject', 'Export-IdlePlanObject', 'New-IdleAuthSessionBroker', - 'Get-IdleStepMetadataCatalog' + 'Get-IdleStepMetadataCatalog', + 'Invoke-IdleProviderMethod', + 'Test-IdleProviderMethodParameter' ) CmdletsToExport = @() AliasesToExport = @() diff --git a/src/IdLE.Core/IdLE.Core.psm1 b/src/IdLE.Core/IdLE.Core.psm1 index a789ae49..3d38f487 100644 --- a/src/IdLE.Core/IdLE.Core.psm1 +++ b/src/IdLE.Core/IdLE.Core.psm1 @@ -46,5 +46,7 @@ Export-ModuleMember -Function @( 'Invoke-IdlePlanObject', 'Export-IdlePlanObject', 'New-IdleAuthSessionBroker', - 'Get-IdleStepMetadataCatalog' + 'Get-IdleStepMetadataCatalog', + 'Invoke-IdleProviderMethod', + 'Test-IdleProviderMethodParameter' ) -Alias @() diff --git a/src/IdLE.Core/Private/Invoke-IdleProviderMethod.ps1 b/src/IdLE.Core/Public/Invoke-IdleProviderMethod.ps1 similarity index 58% rename from src/IdLE.Core/Private/Invoke-IdleProviderMethod.ps1 rename to src/IdLE.Core/Public/Invoke-IdleProviderMethod.ps1 index a8d28431..e750241a 100644 --- a/src/IdLE.Core/Private/Invoke-IdleProviderMethod.ps1 +++ b/src/IdLE.Core/Public/Invoke-IdleProviderMethod.ps1 @@ -2,6 +2,49 @@ # Handles auth session acquisition, parameter detection, and backwards-compatible fallback. function Invoke-IdleProviderMethod { + <# + .SYNOPSIS + Invokes a provider method with optional AuthSession support. + + .DESCRIPTION + This is a foundational helper for step implementations that need to invoke + provider methods with proper authentication handling. + + Key features: + - Acquires auth sessions via Context.AcquireAuthSession when With.AuthSessionName is present + - Detects whether provider methods support AuthSession parameter (backwards compatible) + - Passes AuthSession to provider methods that support it + - Validates provider existence and method implementation + + .PARAMETER Context + Execution context created by IdLE.Core. Must contain Providers hashtable and + AcquireAuthSession method. + + .PARAMETER With + Step configuration hashtable. May contain: + - AuthSessionName (string): Name of auth session to acquire + - AuthSessionOptions (hashtable): Optional session selection options + + .PARAMETER ProviderAlias + Key to look up the provider in Context.Providers. + + .PARAMETER MethodName + Name of the provider method to invoke. + + .PARAMETER MethodArguments + Array of arguments to pass to the provider method (excluding AuthSession). + + .OUTPUTS + Object returned by the provider method. + + .EXAMPLE + $result = Invoke-IdleProviderMethod ` + -Context $Context ` + -With @{ AuthSessionName = 'ExchangeOnline' } ` + -ProviderAlias 'ExchangeOnline' ` + -MethodName 'EnsureMailboxType' ` + -MethodArguments @('user@contoso.com', 'Shared') + #> [CmdletBinding()] param( [Parameter(Mandatory)] diff --git a/src/IdLE.Core/Private/Test-IdleProviderMethodParameter.ps1 b/src/IdLE.Core/Public/Test-IdleProviderMethodParameter.ps1 similarity index 66% rename from src/IdLE.Core/Private/Test-IdleProviderMethodParameter.ps1 rename to src/IdLE.Core/Public/Test-IdleProviderMethodParameter.ps1 index 870217a6..434a6b61 100644 --- a/src/IdLE.Core/Private/Test-IdleProviderMethodParameter.ps1 +++ b/src/IdLE.Core/Public/Test-IdleProviderMethodParameter.ps1 @@ -2,6 +2,40 @@ # Supports ScriptMethod (AST inspection) and compiled methods (reflection). function Test-IdleProviderMethodParameter { + <# + .SYNOPSIS + Tests whether a provider method supports a given parameter. + + .DESCRIPTION + This is a foundational helper that inspects provider method signatures to determine + if they accept a specific parameter (e.g., AuthSession). + + Supports: + - ScriptMethod (AST inspection via PowerShell parser) + - Compiled methods (reflection-based inspection) + + Used by Invoke-IdleProviderMethod to detect backwards-compatible method signatures. + + .PARAMETER ProviderMethod + PSMethodInfo object representing the provider method to inspect. + + .PARAMETER ParameterName + Name of the parameter to check for (e.g., 'AuthSession'). + + .OUTPUTS + Boolean. True if the method accepts the specified parameter, False otherwise. + + .EXAMPLE + $provider = [pscustomobject]@{} + $provider | Add-Member -MemberType ScriptMethod -Name MyMethod -Value { + param($Arg1, $AuthSession) + # ... + } + + $method = $provider.PSObject.Methods['MyMethod'] + Test-IdleProviderMethodParameter -ProviderMethod $method -ParameterName 'AuthSession' + # Returns: True + #> [CmdletBinding()] [OutputType([bool])] param( diff --git a/src/IdLE.Steps.Common/IdLE.Steps.Common.psd1 b/src/IdLE.Steps.Common/IdLE.Steps.Common.psd1 index da68cc19..9526e698 100644 --- a/src/IdLE.Steps.Common/IdLE.Steps.Common.psd1 +++ b/src/IdLE.Steps.Common/IdLE.Steps.Common.psd1 @@ -10,6 +10,7 @@ RequiredModules = @('IdLE.Core') FunctionsToExport = @( + 'Get-IdleStepMetadataCatalog', 'Invoke-IdleStepEmitEvent', 'Invoke-IdleStepEnsureAttribute', 'Invoke-IdleStepEnsureEntitlement', diff --git a/src/IdLE.Steps.Common/Public/Get-IdleStepMetadataCatalog.ps1 b/src/IdLE.Steps.Common/Public/Get-IdleStepMetadataCatalog.ps1 new file mode 100644 index 00000000..42f2818a --- /dev/null +++ b/src/IdLE.Steps.Common/Public/Get-IdleStepMetadataCatalog.ps1 @@ -0,0 +1,67 @@ +function Get-IdleStepMetadataCatalog { + <# + .SYNOPSIS + Returns metadata for common built-in IdLE step types. + + .DESCRIPTION + This function provides a metadata catalog mapping Step.Type to metadata objects. + Each metadata object contains RequiredCapabilities (array of capability identifiers). + + The metadata is used during plan building to derive required provider capabilities + for each step, removing the need to declare RequiresCapabilities in workflow definitions. + + .OUTPUTS + Hashtable (case-insensitive) mapping Step.Type (string) to metadata (hashtable). + + .EXAMPLE + $metadata = Get-IdleStepMetadataCatalog + $metadata['IdLE.Step.DisableIdentity'].RequiredCapabilities + # Returns: @('IdLE.Identity.Disable') + #> + [CmdletBinding()] + param() + + $catalog = [hashtable]::new([System.StringComparer]::OrdinalIgnoreCase) + + # IdLE.Step.EmitEvent - no provider capabilities required (writes to event sink only) + $catalog['IdLE.Step.EmitEvent'] = @{ + RequiredCapabilities = @() + } + + # IdLE.Step.CreateIdentity - requires identity creation capability + $catalog['IdLE.Step.CreateIdentity'] = @{ + RequiredCapabilities = @('IdLE.Identity.Create') + } + + # IdLE.Step.DisableIdentity - requires identity disable capability + $catalog['IdLE.Step.DisableIdentity'] = @{ + RequiredCapabilities = @('IdLE.Identity.Disable') + } + + # IdLE.Step.EnableIdentity - requires identity enable capability + $catalog['IdLE.Step.EnableIdentity'] = @{ + RequiredCapabilities = @('IdLE.Identity.Enable') + } + + # IdLE.Step.DeleteIdentity - requires identity delete capability + $catalog['IdLE.Step.DeleteIdentity'] = @{ + RequiredCapabilities = @('IdLE.Identity.Delete') + } + + # IdLE.Step.MoveIdentity - requires identity move capability + $catalog['IdLE.Step.MoveIdentity'] = @{ + RequiredCapabilities = @('IdLE.Identity.Move') + } + + # IdLE.Step.EnsureAttribute - requires identity attribute ensure capability + $catalog['IdLE.Step.EnsureAttribute'] = @{ + RequiredCapabilities = @('IdLE.Identity.Attribute.Ensure') + } + + # IdLE.Step.EnsureEntitlement - requires entitlement list and grant/revoke capabilities + $catalog['IdLE.Step.EnsureEntitlement'] = @{ + RequiredCapabilities = @('IdLE.Entitlement.List', 'IdLE.Entitlement.Grant', 'IdLE.Entitlement.Revoke') + } + + return $catalog +} From dc1fbdfdfa55ffb0421c2fb86071b2dd683d4ee6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Feb 2026 17:12:07 +0000 Subject: [PATCH 4/6] Add migration guide for v0.10 step infrastructure refactor Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com> --- docs/develop/migration-v0.10.md | 113 ++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 docs/develop/migration-v0.10.md diff --git a/docs/develop/migration-v0.10.md b/docs/develop/migration-v0.10.md new file mode 100644 index 00000000..341ccf96 --- /dev/null +++ b/docs/develop/migration-v0.10.md @@ -0,0 +1,113 @@ +--- +title: Migration Guide v0.10 +sidebar_label: Migration v0.10 +--- + +# Migration Guide: v0.9 → v0.10 + +This guide describes breaking changes introduced in IdLE v0.10 and how to adapt existing code. + +## Step Infrastructure Refactor + +**Summary**: Generic step infrastructure has been moved from `IdLE.Steps.Common` to `IdLE.Core`. + +### What Changed + +In v0.9 and earlier: +- `IdLE.Steps.Common` contained both step infrastructure (helpers, metadata) and step implementations +- Step packs could depend solely on `IdLE.Steps.Common` + +In v0.10+: +- `IdLE.Core` contains all generic step infrastructure: + - `Get-IdleStepMetadataCatalog` (exported from Core) + - `Invoke-IdleProviderMethod` (now public, exported from Core) + - `Test-IdleProviderMethodParameter` (now public, exported from Core) +- `IdLE.Steps.Common` contains only step implementations +- Each step pack (including `IdLE.Steps.Common`) has its own `Get-IdleStepMetadataCatalog` for the steps it implements + +### Impact on Step Pack Authors + +**Before v0.10:** +```powershell +# In MyStepPack.psd1 +@{ + RequiredModules = @('IdLE.Steps.Common') + # ... +} +``` + +**After v0.10:** +```powershell +# In MyStepPack.psd1 +@{ + RequiredModules = @('IdLE.Core', 'IdLE.Steps.Common') # Add IdLE.Core + # ... +} +``` + +**If your step pack uses `Invoke-IdleProviderMethod`:** +- No code changes required +- Function is now exported from `IdLE.Core` and available to all step packs + +**If your step pack provides custom step types:** +- Implement `Get-IdleStepMetadataCatalog` in your step pack +- Return a hashtable mapping your step types to their metadata + +### Impact on Hosts + +**For hosts that import the IdLE meta-module:** +- No changes required +- `IdLE` meta-module automatically loads `IdLE.Core` and `IdLE.Steps.Common` + +**For hosts that directly import individual modules:** +- Ensure `IdLE.Core` is loaded before step packs +- Order: `IdLE.Core` → `IdLE.Steps.Common` → Other step packs + +### New Public API in IdLE.Core + +The following functions are now **public** and exported from `IdLE.Core`: + +#### `Get-IdleStepMetadataCatalog` +Returns the metadata catalog for common step types. Previously only in `IdLE.Steps.Common`. + +**Note**: Each step pack module should implement its own `Get-IdleStepMetadataCatalog` that returns metadata for the steps in that pack. + +#### `Invoke-IdleProviderMethod` +Foundational helper for invoking provider methods with auth session support. + +**Usage:** +```powershell +$result = Invoke-IdleProviderMethod ` + -Context $Context ` + -With @{ AuthSessionName = 'ProviderName' } ` + -ProviderAlias 'ProviderName' ` + -MethodName 'SomeMethod' ` + -MethodArguments @($arg1, $arg2) +``` + +#### `Test-IdleProviderMethodParameter` +Tests whether a provider method accepts a specific parameter (used for backwards compatibility detection). + +**Usage:** +```powershell +$method = $provider.PSObject.Methods['MyMethod'] +$supportsAuth = Test-IdleProviderMethodParameter -ProviderMethod $method -ParameterName 'AuthSession' +``` + +### Rationale + +This refactor establishes a clearer architectural layering: + +- **IdLE.Core**: Engine foundations and step infrastructure (required by all step packs) +- **IdLE.Steps.Common**: Reusable step implementations (optional, use when needed) +- **Other step packs**: Domain-specific step implementations + +Benefits: +- Clear separation of concerns +- Reduced coupling between step packs +- Third-party step packs can depend solely on `IdLE.Core` +- Easier to reason about module dependencies + +## Questions or Issues? + +If you encounter issues migrating to v0.10, please file an issue on GitHub. From f5559e8ecc8e8f940ee1d11042cd5895fac44c7a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Feb 2026 17:14:42 +0000 Subject: [PATCH 5/6] Remove Get-IdleStepMetadataCatalog from IdLE.Core (each step pack has its own) Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com> --- docs/develop/migration-v0.10.md | 7 +- src/IdLE.Core/IdLE.Core.psd1 | 1 - src/IdLE.Core/IdLE.Core.psm1 | 1 - .../Public/Get-IdleStepMetadataCatalog.ps1 | 67 ------------------- 4 files changed, 1 insertion(+), 75 deletions(-) delete mode 100644 src/IdLE.Core/Public/Get-IdleStepMetadataCatalog.ps1 diff --git a/docs/develop/migration-v0.10.md b/docs/develop/migration-v0.10.md index 341ccf96..f742e7d2 100644 --- a/docs/develop/migration-v0.10.md +++ b/docs/develop/migration-v0.10.md @@ -65,12 +65,7 @@ In v0.10+: ### New Public API in IdLE.Core -The following functions are now **public** and exported from `IdLE.Core`: - -#### `Get-IdleStepMetadataCatalog` -Returns the metadata catalog for common step types. Previously only in `IdLE.Steps.Common`. - -**Note**: Each step pack module should implement its own `Get-IdleStepMetadataCatalog` that returns metadata for the steps in that pack. +The following foundational helpers are now **public** and exported from `IdLE.Core`: #### `Invoke-IdleProviderMethod` Foundational helper for invoking provider methods with auth session support. diff --git a/src/IdLE.Core/IdLE.Core.psd1 b/src/IdLE.Core/IdLE.Core.psd1 index 450d1669..48385a27 100644 --- a/src/IdLE.Core/IdLE.Core.psd1 +++ b/src/IdLE.Core/IdLE.Core.psd1 @@ -14,7 +14,6 @@ 'Invoke-IdlePlanObject', 'Export-IdlePlanObject', 'New-IdleAuthSessionBroker', - 'Get-IdleStepMetadataCatalog', 'Invoke-IdleProviderMethod', 'Test-IdleProviderMethodParameter' ) diff --git a/src/IdLE.Core/IdLE.Core.psm1 b/src/IdLE.Core/IdLE.Core.psm1 index 3d38f487..06956a7b 100644 --- a/src/IdLE.Core/IdLE.Core.psm1 +++ b/src/IdLE.Core/IdLE.Core.psm1 @@ -46,7 +46,6 @@ Export-ModuleMember -Function @( 'Invoke-IdlePlanObject', 'Export-IdlePlanObject', 'New-IdleAuthSessionBroker', - 'Get-IdleStepMetadataCatalog', 'Invoke-IdleProviderMethod', 'Test-IdleProviderMethodParameter' ) -Alias @() diff --git a/src/IdLE.Core/Public/Get-IdleStepMetadataCatalog.ps1 b/src/IdLE.Core/Public/Get-IdleStepMetadataCatalog.ps1 deleted file mode 100644 index 2f266676..00000000 --- a/src/IdLE.Core/Public/Get-IdleStepMetadataCatalog.ps1 +++ /dev/null @@ -1,67 +0,0 @@ -function Get-IdleStepMetadataCatalog { - <# - .SYNOPSIS - Returns metadata for built-in IdLE step types. - - .DESCRIPTION - This function provides a metadata catalog mapping Step.Type to metadata objects. - Each metadata object contains RequiredCapabilities (array of capability identifiers). - - The metadata is used during plan building to derive required provider capabilities - for each step, removing the need to declare RequiresCapabilities in workflow definitions. - - .OUTPUTS - Hashtable (case-insensitive) mapping Step.Type (string) to metadata (hashtable). - - .EXAMPLE - $metadata = Get-IdleStepMetadataCatalog - $metadata['IdLE.Step.DisableIdentity'].RequiredCapabilities - # Returns: @('IdLE.Identity.Disable', 'IdLE.Identity.Read') - #> - [CmdletBinding()] - param() - - $catalog = [hashtable]::new([System.StringComparer]::OrdinalIgnoreCase) - - # IdLE.Step.EmitEvent - no provider capabilities required (writes to event sink only) - $catalog['IdLE.Step.EmitEvent'] = @{ - RequiredCapabilities = @() - } - - # IdLE.Step.CreateIdentity - requires identity creation capability - $catalog['IdLE.Step.CreateIdentity'] = @{ - RequiredCapabilities = @('IdLE.Identity.Create') - } - - # IdLE.Step.DisableIdentity - requires identity disable capability - $catalog['IdLE.Step.DisableIdentity'] = @{ - RequiredCapabilities = @('IdLE.Identity.Disable') - } - - # IdLE.Step.EnableIdentity - requires identity enable capability - $catalog['IdLE.Step.EnableIdentity'] = @{ - RequiredCapabilities = @('IdLE.Identity.Enable') - } - - # IdLE.Step.DeleteIdentity - requires identity delete capability - $catalog['IdLE.Step.DeleteIdentity'] = @{ - RequiredCapabilities = @('IdLE.Identity.Delete') - } - - # IdLE.Step.MoveIdentity - requires identity move capability - $catalog['IdLE.Step.MoveIdentity'] = @{ - RequiredCapabilities = @('IdLE.Identity.Move') - } - - # IdLE.Step.EnsureAttribute - requires identity attribute ensure capability - $catalog['IdLE.Step.EnsureAttribute'] = @{ - RequiredCapabilities = @('IdLE.Identity.Attribute.Ensure') - } - - # IdLE.Step.EnsureEntitlement - requires entitlement list and grant/revoke capabilities - $catalog['IdLE.Step.EnsureEntitlement'] = @{ - RequiredCapabilities = @('IdLE.Entitlement.List', 'IdLE.Entitlement.Grant', 'IdLE.Entitlement.Revoke') - } - - return $catalog -} From e5c8f53a939d92d6b56eb5f22c5fbb5af853e44d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Feb 2026 17:32:14 +0000 Subject: [PATCH 6/6] Remove migration guide (not needed for pre-1.0) Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com> --- docs/develop/migration-v0.10.md | 108 -------------------------------- 1 file changed, 108 deletions(-) delete mode 100644 docs/develop/migration-v0.10.md diff --git a/docs/develop/migration-v0.10.md b/docs/develop/migration-v0.10.md deleted file mode 100644 index f742e7d2..00000000 --- a/docs/develop/migration-v0.10.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: Migration Guide v0.10 -sidebar_label: Migration v0.10 ---- - -# Migration Guide: v0.9 → v0.10 - -This guide describes breaking changes introduced in IdLE v0.10 and how to adapt existing code. - -## Step Infrastructure Refactor - -**Summary**: Generic step infrastructure has been moved from `IdLE.Steps.Common` to `IdLE.Core`. - -### What Changed - -In v0.9 and earlier: -- `IdLE.Steps.Common` contained both step infrastructure (helpers, metadata) and step implementations -- Step packs could depend solely on `IdLE.Steps.Common` - -In v0.10+: -- `IdLE.Core` contains all generic step infrastructure: - - `Get-IdleStepMetadataCatalog` (exported from Core) - - `Invoke-IdleProviderMethod` (now public, exported from Core) - - `Test-IdleProviderMethodParameter` (now public, exported from Core) -- `IdLE.Steps.Common` contains only step implementations -- Each step pack (including `IdLE.Steps.Common`) has its own `Get-IdleStepMetadataCatalog` for the steps it implements - -### Impact on Step Pack Authors - -**Before v0.10:** -```powershell -# In MyStepPack.psd1 -@{ - RequiredModules = @('IdLE.Steps.Common') - # ... -} -``` - -**After v0.10:** -```powershell -# In MyStepPack.psd1 -@{ - RequiredModules = @('IdLE.Core', 'IdLE.Steps.Common') # Add IdLE.Core - # ... -} -``` - -**If your step pack uses `Invoke-IdleProviderMethod`:** -- No code changes required -- Function is now exported from `IdLE.Core` and available to all step packs - -**If your step pack provides custom step types:** -- Implement `Get-IdleStepMetadataCatalog` in your step pack -- Return a hashtable mapping your step types to their metadata - -### Impact on Hosts - -**For hosts that import the IdLE meta-module:** -- No changes required -- `IdLE` meta-module automatically loads `IdLE.Core` and `IdLE.Steps.Common` - -**For hosts that directly import individual modules:** -- Ensure `IdLE.Core` is loaded before step packs -- Order: `IdLE.Core` → `IdLE.Steps.Common` → Other step packs - -### New Public API in IdLE.Core - -The following foundational helpers are now **public** and exported from `IdLE.Core`: - -#### `Invoke-IdleProviderMethod` -Foundational helper for invoking provider methods with auth session support. - -**Usage:** -```powershell -$result = Invoke-IdleProviderMethod ` - -Context $Context ` - -With @{ AuthSessionName = 'ProviderName' } ` - -ProviderAlias 'ProviderName' ` - -MethodName 'SomeMethod' ` - -MethodArguments @($arg1, $arg2) -``` - -#### `Test-IdleProviderMethodParameter` -Tests whether a provider method accepts a specific parameter (used for backwards compatibility detection). - -**Usage:** -```powershell -$method = $provider.PSObject.Methods['MyMethod'] -$supportsAuth = Test-IdleProviderMethodParameter -ProviderMethod $method -ParameterName 'AuthSession' -``` - -### Rationale - -This refactor establishes a clearer architectural layering: - -- **IdLE.Core**: Engine foundations and step infrastructure (required by all step packs) -- **IdLE.Steps.Common**: Reusable step implementations (optional, use when needed) -- **Other step packs**: Domain-specific step implementations - -Benefits: -- Clear separation of concerns -- Reduced coupling between step packs -- Third-party step packs can depend solely on `IdLE.Core` -- Easier to reason about module dependencies - -## Questions or Issues? - -If you encounter issues migrating to v0.10, please file an issue on GitHub.