feat(devkit): enforce governed prompt adoption

This commit is contained in:
thanhnv
2026-07-21 23:40:26 +07:00
parent 4d5dca9400
commit 7b2ba60a3a
16 changed files with 622 additions and 12 deletions
@@ -0,0 +1,22 @@
# CASAN_MANAGED_PROMPT_ENTRYPOINT
[CmdletBinding()]
param(
[Parameter(ValueFromRemainingArguments = $true)]
[string[]] $Prompt,
[string] $Distro = 'Ubuntu'
)
$ErrorActionPreference = 'Stop'
$projectRootWindows = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
$projectRootWsl = (& wsl.exe -d $Distro -- wslpath -a $projectRootWindows).Trim()
if (-not $projectRootWsl) {
throw 'CASAN could not resolve the project path in WSL2.'
}
$arguments = @('-d', $Distro, '--cd', $projectRootWsl, './bin/casan-chat')
if ($Prompt) {
$arguments += $Prompt
}
& wsl.exe @arguments
exit $LASTEXITCODE