writeSkillVersion records `v` as the version of the binary that installed the current skill content. Errors are non-fatal — failing to write the sidecar should never block a successful skill install.
(v string)
| 42 | // injects a tiny drift/close-out anchor; unbound sessions no-op. Stable |
| 43 | // — changing it would orphan existing installations. |
| 44 | const userPromptSubmitHookCommand = "flow hook user-prompt-submit" |
| 45 | |
| 46 | // readSkillVersion returns the version string recorded in the |
| 47 | // harness's skill-version sidecar, or "" if missing/unreadable. |
| 48 | func readSkillVersion() string { |
| 49 | p, err := defaultHarness().SkillVersionPath() |
| 50 | if err != nil { |
| 51 | return "" |
| 52 | } |
| 53 | b, err := os.ReadFile(p) |
| 54 | if err != nil { |
| 55 | return "" |
| 56 | } |
no test coverage detected