chore: archive AgentDock v1 implementation

This commit is contained in:
leefer
2026-08-24 17:14:08 +08:00
commit f512bd58ec
66 changed files with 10663 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
param(
[Parameter(Mandatory = $true)]
[string]$Server,
[Parameter(Mandatory = $true)]
[ValidateSet("codex", "claude", "codebuddy", "kimi", "opencode", "qwen", "dsh")]
[string]$Tool,
[string]$Project = ".",
[string]$Container = "ai-tools",
[string[]]$ToolArguments
)
function ConvertTo-PosixArgument {
param([string]$Value)
return "'" + $Value.Replace("'", "'`"'`"'") + "'"
}
if ($Project.StartsWith("/") -or $Project -match "(^|[\\/])\.\.([\\/]|$)") {
throw "Project must be a path below /workspace."
}
$remoteArguments = @(
"docker", "exec", "-it",
"--workdir", "/workspace/$Project",
$Container,
$Tool
) + $ToolArguments
$remoteCommand = ($remoteArguments | ForEach-Object { ConvertTo-PosixArgument $_ }) -join " "
& ssh -tt $Server $remoteCommand
exit $LASTEXITCODE