MCPcopy Create free account
hub / github.com/Facets-cloud/flow / writeSkillVersion

Function writeSkillVersion

internal/app/skill.go:44–53  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

42// injects a tiny drift/close-out anchor; unbound sessions no-op. Stable
43// — changing it would orphan existing installations.
44const 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.
48func 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 }

Callers 3

maybeAutoUpgradeSkillFunction · 0.85
skillInstallFunction · 0.85
cmdInitFunction · 0.85

Calls 2

defaultHarnessFunction · 0.85
SkillVersionPathMethod · 0.65

Tested by

no test coverage detected