@arthovlabs/liber 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arthovlabs/liber",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "LiBER — autonomous agent orchestrator with a machine-enforced grounding gate and a skill library",
5
5
  "bin": {
6
6
  "liber": "bin/liber",
@@ -26,8 +26,11 @@ function isGitRepo() {
26
26
  }
27
27
 
28
28
  function branch() {
29
+ // `rev-parse --abbrev-ref HEAD` prints the literal string "HEAD" on a detached
30
+ // checkout (CI tag builds do this), which is not a branch name — reporting it
31
+ // as one made the UI show a branch called HEAD and marked nothing current.
29
32
  const b = sh('git', ['rev-parse', '--abbrev-ref', 'HEAD']);
30
- if (b && b.trim()) return b.trim();
33
+ if (b && b.trim() && b.trim() !== 'HEAD') return b.trim();
31
34
  const detached = sh('git', ['rev-parse', '--short', 'HEAD']);
32
35
  return detached ? `detached@${detached.trim()}` : null;
33
36
  }