Added to Git

This commit is contained in:
Vadim Flowed
2026-05-10 19:01:57 +03:00
parent d08c2c4d8a
commit 1c7f9161f1
44 changed files with 2902 additions and 0 deletions
@@ -0,0 +1,53 @@
param(
[Parameter(Mandatory = $false)]
[string]$RegistryPath = ".agents/skills/_shared/references/ux-research-registry.json",
[Parameter(Mandatory = $true)]
[string]$Id,
[Parameter(Mandatory = $true)]
[string]$Title,
[Parameter(Mandatory = $true)]
[string]$Url,
[Parameter(Mandatory = $false)]
[string]$Publisher = "",
[Parameter(Mandatory = $false)]
[string[]]$Domains = @(),
[Parameter(Mandatory = $false)]
[string[]]$Claims = @()
)
$ErrorActionPreference = "Stop"
if (-not (Test-Path -LiteralPath $RegistryPath)) {
throw "Registry not found: $RegistryPath"
}
$registry = Get-Content -LiteralPath $RegistryPath -Raw -Encoding UTF8 | ConvertFrom-Json
$sources = @($registry.sources)
$existing = $sources | Where-Object { $_.id -eq $Id } | Select-Object -First 1
$entry = [ordered]@{
id = $Id
title = $Title
url = $Url
publisher = $Publisher
domains = @($Domains)
claims = @($Claims)
last_checked = (Get-Date).ToString("yyyy-MM-dd")
}
if ($null -ne $existing) {
$sources = $sources | Where-Object { $_.id -ne $Id }
}
$sources += [pscustomobject]$entry
$registry.last_updated = (Get-Date).ToString("yyyy-MM-dd")
$registry.sources = @($sources | Sort-Object id)
$registry | ConvertTo-Json -Depth 10 | Set-Content -LiteralPath $RegistryPath -Encoding UTF8
Write-Output "Updated registry entry: $Id"