diff --git a/docs/local-models.md b/docs/local-models.md index 08650a02..8e5befa3 100644 --- a/docs/local-models.md +++ b/docs/local-models.md @@ -339,10 +339,12 @@ The codeman skill ([`skills/codeman`](../skills/codeman/SKILL.md#claude-in-the-c lets an agent in a Codeman session hand work to this model, so Claude in the cloud plans and reviews while the model on this Mac does the bulk: summaries, classification, first drafts, and files that should not leave the machine. `local_model` reads `GET /api/local-model` and says what -is installed or why nothing can run; `spawn_worker local` starts the runtime when it was -stopped (as Start does), then starts the default coding agent (`install.cli`) on `local-ollama` through the same +is installed or why nothing can run, with the coding agents the model can be run with and the +models on the Mac; `spawn_worker local` starts the runtime when it was +stopped (as Start does), then starts the default coding agent (`install.cli`), or with +`local:` (`local:pi`, `local:deepseek`) another one that is ready, on `local-ollama` through the same quick-start launch and the same checks as above; `sendmark` gives the worker a task and reads its -answer back from a file it writes in its own folder. The skill never installs a model and never +answer back from a file it writes in its own folder. The skill never installs a model or a coding agent and never answers a confirmation, the runtime still answers one request at a time, and while a worker it opened is live, Stop and Remove are refused until it is closed. diff --git a/plugins/codeman/skills/codeman/SKILL.md b/plugins/codeman/skills/codeman/SKILL.md index 48f1e231..14c525a4 100644 --- a/plugins/codeman/skills/codeman/SKILL.md +++ b/plugins/codeman/skills/codeman/SKILL.md @@ -107,7 +107,7 @@ later call opens with, and your first REAL call performs them anyway: ```bash . "${XDG_CACHE_HOME:-$HOME/.cache}/codeman-agent-$CODEMAN_SESSION_ID.sh" 2>/dev/null -[ "${CODEMAN_PREAMBLE:-}" = 1.50.0 ] || { echo "preamble missing or stale; run the full §0 block"; exit 1; } +[ "${CODEMAN_PREAMBLE:-}" = 1.51.0 ] || { echo "preamble missing or stale; run the full §0 block"; exit 1; } ``` ⚠️ **Never spend a Bash call on this check alone.** §1's block opens with this same @@ -135,8 +135,8 @@ PRE="${XDG_CACHE_HOME:-$HOME/.cache}/codeman-agent-$CODEMAN_SESSION_ID.sh" mkdir -p "$(dirname "$PRE")" # Rewrite unless the file already ends with THIS version's stamp, so a stale or a # half-written file self-heals here instead of costing you a round trip to rm it. -grep -qs '^CODEMAN_PREAMBLE=1.50.0$' "$PRE" || (umask 077; cat > "$PRE" <<'PREAMBLE' -# ---- Codeman agent preamble 1.50.0 (seeded by Codeman at session spawn; the SKILL.md §0 bootstrap rewrites it when missing or stale) ---- +grep -qs '^CODEMAN_PREAMBLE=1.51.0$' "$PRE" || (umask 077; cat > "$PRE" <<'PREAMBLE' +# ---- Codeman agent preamble 1.51.0 (seeded by Codeman at session spawn; the SKILL.md §0 bootstrap rewrites it when missing or stale) ---- # Positional parameters are always written with braces, ${1} and never a bare dollar-digit: Claude Code # replaces a bare one in a skill body with the matching word of the skill's arguments, and §0 is pasted # from that body (test/agent-skill.test.ts pins it). @@ -197,6 +197,17 @@ _dsh_up() { # -> "true"/"false". The DeepSeek Harness T # composer glyph. Override with DSH_READY_MARK for a profile that draws another one. _mark_up "${1}" "${DSH_READY_MARK:-❯}" "${2}" } +_dsh_guide() { # -> 0 when the pane shows dsh-TUI's first-run SETUP GUIDE, not a composer. + # dsh-TUI 0.19.0 opens a guide ("Welcome to dsh-TUI Step 1 of 4") in every session until a + # person has finished it once, and the guide's own cursor is `❯`: the readiness mark matches + # on it (measured, 2 of 2 launches), and an Enter there acts on the highlighted step, which + # is a sign-in. So a worker whose mark matched is still checked for the guide, on the + # RENDERED pane with its whitespace removed, and never handed back while it shows. + "${CURL[@]}" -G "$API/api/v1/sessions/${1}/terminal" --data-urlencode 'full=1' \ + | jq -r '.data.terminalBuffer // empty' \ + | sed -e "s/$(printf '\033')\[[0-9;?]*[a-zA-Z]//g" -e "s/$(printf '\033')[()][AB0]//g" \ + | tr -d ' \t' | grep -qi 'Step[0-9]of[0-9]' +} # ---- the workspace-trust dialog: READ the screen, never press Enter blind ---- # Claude Code 2.1.252 dropped the option numbers, REVERSED them, and highlights # "No, exit" by default: @@ -259,9 +270,18 @@ _accept_trust() { # -> 0 once it has answered the dialog, 1 if it could n # local_model -> ONE compact JSON object on stdout. rc 0 only when a `local` worker can be # spawned now (`running:true`) or once spawn_worker has started the runtime (`running:false`): # {"spawnable":true,"state":"installed","running":true,"cli":"opencode","cliLabel":"OpenCode", -# "endpointId":"local-ollama","modelId":"","modelLabel":"