38 lines
1.1 KiB
PowerShell
38 lines
1.1 KiB
PowerShell
$ErrorActionPreference = "Stop"
|
|
|
|
$workspace = if ($env:BOSS_WORKSPACE) { $env:BOSS_WORKSPACE } else { (Get-Location).Path }
|
|
$taskTitle = if ($env:BOSS_TASK_TITLE) { $env:BOSS_TASK_TITLE } else { "Untitled task" }
|
|
$taskKind = if ($env:BOSS_TASK_KIND) { $env:BOSS_TASK_KIND } else { "general" }
|
|
$taskDescription = if ($env:BOSS_TASK_DESCRIPTION) { $env:BOSS_TASK_DESCRIPTION } else { "No description provided." }
|
|
|
|
if (-not (Get-Command claude -ErrorAction SilentlyContinue)) {
|
|
Write-Error "claude CLI not found in PATH"
|
|
}
|
|
|
|
Set-Location $workspace
|
|
|
|
$prompt = @"
|
|
You are the device-side execution worker for Boss.
|
|
|
|
Task title: $taskTitle
|
|
Task kind: $taskKind
|
|
Task description:
|
|
$taskDescription
|
|
|
|
Work only inside this workspace:
|
|
$workspace
|
|
|
|
Expectations:
|
|
- Make the smallest correct change that moves the task forward.
|
|
- If you modify code, mention validation or remaining risks in the final summary.
|
|
- If the task is research-only, summarize findings and next steps instead of forcing edits.
|
|
"@
|
|
|
|
$extraFlags = @()
|
|
if ($env:BOSS_CLAUDE_FLAGS) {
|
|
$extraFlags = $env:BOSS_CLAUDE_FLAGS -split "\s+"
|
|
}
|
|
|
|
& claude --print @extraFlags $prompt
|
|
exit $LASTEXITCODE
|