pi-goal-list-loop-audit 0.21.0 → 0.21.1

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.
@@ -127,34 +127,36 @@ export function buildWidgetLines(state: State, audit?: AuditDisplayProgress | nu
127
127
  return goalLines(g, state, audit, now, theme);
128
128
  }
129
129
 
130
- // Branch lines indent one space (pi-tasks convention): the tree sits under
131
- // the head glyph, text column consistent across widgets.
130
+ // Branch lines sit flush-left (pi-tasks convention): pi's widget renderer
131
+ // adds its own one-space gutter, so any indent here doubles up.
132
132
  function goalLines(g: Goal, state: State, audit: AuditDisplayProgress | null | undefined, now: number, theme?: DisplayTheme): string[] {
133
+ // Head glyph is ● (not ◆): U+25C6 renders as a color-emoji diamond in some
134
+ // terminal fonts and ignores ANSI color; ● takes the paint everywhere.
133
135
  const icon =
134
136
  g.status === "paused"
135
137
  ? paint(theme, pauseIsError(g) ? "error" : "warning", "⏸")
136
138
  : g.status === "auditing"
137
139
  ? paint(theme, "accent", "⟡")
138
- : paint(theme, "success", "");
140
+ : paint(theme, "success", "");
139
141
  const head = `${icon} ${truncate(g.objective.replace(/\s+/g, " "), 64)}`;
140
142
  const statusWord = g.status === "active" ? paint(theme, "success", "active") : g.status;
141
143
  const tokens = paint(theme, "dim", `${fmtTokens(g.usage?.tokensUsed ?? 0)}/${fmtTokens(g.usage?.tokensLimit ?? 10_000_000)} tok`);
142
- const lines = [head, ` ├─ ${statusWord} · ${fmtElapsed(now - Date.parse(g.createdAt))} · ${tokens}`];
144
+ const lines = [head, `├─ ${statusWord} · ${fmtElapsed(now - Date.parse(g.createdAt))} · ${tokens}`];
143
145
  if (g.status === "auditing") {
144
- lines.push(` ├─ auditor: ${audit?.label ?? "running"}${audit?.currentTool ? ` · ${truncate(audit.currentTool, 30)}` : ""}`);
145
- if (audit?.elapsedMs) lines.push(` └─ ${paint(theme, "dim", `${fmtElapsed(audit.elapsedMs)} in isolated session`)}`);
146
- else lines.push(` └─ ${paint(theme, "dim", "isolated session, read-only tools")}`);
146
+ lines.push(`├─ auditor: ${audit?.label ?? "running"}${audit?.currentTool ? ` · ${truncate(audit.currentTool, 30)}` : ""}`);
147
+ if (audit?.elapsedMs) lines.push(`└─ ${paint(theme, "dim", `${fmtElapsed(audit.elapsedMs)} in isolated session`)}`);
148
+ else lines.push(`└─ ${paint(theme, "dim", "isolated session, read-only tools")}`);
147
149
  return lines;
148
150
  }
149
151
  if (g.status === "paused" && g.pauseReason) {
150
- lines.push(` ├─ ${paint(theme, pauseIsError(g) ? "error" : "warning", truncate(g.pauseReason, 60))}`);
151
- if (g.pauseSuggestedAction) lines.push(` └─ ${paint(theme, "dim", truncate(g.pauseSuggestedAction, 60))}`);
152
+ lines.push(`├─ ${paint(theme, pauseIsError(g) ? "error" : "warning", truncate(g.pauseReason, 60))}`);
153
+ if (g.pauseSuggestedAction) lines.push(`└─ ${paint(theme, "dim", truncate(g.pauseSuggestedAction, 60))}`);
152
154
  return lines;
153
155
  }
154
156
  const next = nextPending(g);
155
- if (next) lines.push(` ├─ next: ${truncate(next, 56)}`);
157
+ if (next) lines.push(`├─ next: ${truncate(next, 56)}`);
156
158
  const queue = state.list?.length ?? 0;
157
- lines.push(` └─ ${paint(theme, "dim", `${queue > 0 ? `list ${queue} · ` : ""}/goal status · /glla`)}`);
159
+ lines.push(`└─ ${paint(theme, "dim", `${queue > 0 ? `list ${queue} · ` : ""}/goal status · /glla`)}`);
158
160
  return lines;
159
161
  }
160
162
 
@@ -164,12 +166,12 @@ function loopLines(l: LoopState, now: number, theme?: DisplayTheme): string[] {
164
166
  const stallText = `stall ${l.stallCount}/${l.plateauWindow}`;
165
167
  const stall = l.stallCount >= l.plateauWindow - 1 ? paint(theme, "warning", stallText) : stallText;
166
168
  const lines = [
167
- `${paint(theme, "accent", "")} ${truncate(l.target, 64)}`,
168
- ` ├─ loop ${arrow} iter ${l.iteration}/${l.maxIterations} · ${fmtElapsed(now - Date.parse(l.startedAt))}`,
169
- ` ├─ best ${best} · last ${l.lastValue ?? "n/a"} · ${stall}`,
170
- ` └─ ${paint(theme, "dim", truncate(l.measureCmd, 56))}`,
169
+ `${paint(theme, "accent", "")} ${truncate(l.target, 64)}`,
170
+ `├─ loop ${arrow} iter ${l.iteration}/${l.maxIterations} · ${fmtElapsed(now - Date.parse(l.startedAt))}`,
171
+ `├─ best ${best} · last ${l.lastValue ?? "n/a"} · ${stall}`,
172
+ `└─ ${paint(theme, "dim", truncate(l.measureCmd, 56))}`,
171
173
  ];
172
- if (l.branchName) lines.push(` ⎇ ${paint(theme, "muted", truncate(l.branchName, 50))}`);
174
+ if (l.branchName) lines.push(`⎇ ${paint(theme, "muted", truncate(l.branchName, 50))}`);
173
175
  return lines;
174
176
  }
175
177
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-goal-list-loop-audit",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "description": "Goal. Loop. Audit. Done. — a pi-coding-agent extension that supervises long-running work, with isolated auditor on each completion. Beat bamboozling by design: the auditor runs in a fresh session with no extensions, no skills, no editor — only the read tools needed to verify your goal.",
5
5
  "license": "MIT",
6
6
  "author": "dracon",