agent-harness-kit 0.11.1 → 0.11.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.
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"source": {
|
|
12
12
|
"source": "github",
|
|
13
13
|
"repo": "tuanle96/agent-harness-kit",
|
|
14
|
-
"ref": "v0.11.
|
|
14
|
+
"ref": "v0.11.2"
|
|
15
15
|
},
|
|
16
|
-
"version": "0.11.
|
|
16
|
+
"version": "0.11.2",
|
|
17
17
|
"description": "Solo-dev harness engineering kit — layered architecture, GC ritual, structural tests, review subagents.",
|
|
18
18
|
"category": "development",
|
|
19
19
|
"keywords": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-harness-kit",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Solo-dev harness engineering kit — layered architecture, garbage-collection ritual, structural tests, review subagents. Optimized for Claude Code 2.1+.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Tuan Le"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-harness-kit",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Solo-dev harness engineering kit for Claude Code. Layered architecture, structural tests, garbage-collection ritual, review subagents — without the enterprise overhead.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// statusLine — "
|
|
2
|
+
// statusLine — "Dashboard Style" (Variant 4).
|
|
3
3
|
//
|
|
4
|
-
// LINE 1 — vitals (always emitted when any segment resolves):
|
|
5
|
-
// ▶ Opus│terse
|
|
4
|
+
// LINE 1 — vitals with rich icons (always emitted when any segment resolves):
|
|
5
|
+
// ▶ Opus 4.7 │ 📝 terse │ ⏱ 1h12m │ ⎇ main(±3) │ ✓ clean │ ▓▓▓▓░ 42% │ $0.83 │ +156/-23
|
|
6
6
|
//
|
|
7
|
-
// LINE 2 — alerts (only when ≥1 trigger fires
|
|
8
|
-
// ⚠ >200K — auto-compact next msg
|
|
7
|
+
// LINE 2 — alerts with clear segmentation (only when ≥1 trigger fires):
|
|
8
|
+
// ⚠ >200K — auto-compact next msg │ ⏳ 5h limit 78%, resets in 1h12m │ 🚫 last-block: <title>
|
|
9
9
|
//
|
|
10
10
|
// Payload (Claude Code v2.1.132+ schema):
|
|
11
11
|
// model.display_name, output_style.name, session_id, version,
|
|
@@ -236,61 +236,72 @@ function bar(pct, width = 10) {
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
// ---------------------------------------------------------------------------
|
|
239
|
-
// Line 1 — vitals.
|
|
239
|
+
// Line 1 — vitals (Dashboard Style with rich icons).
|
|
240
240
|
// ---------------------------------------------------------------------------
|
|
241
241
|
function renderLine1(payload, git, feat, config) {
|
|
242
|
-
const
|
|
243
|
-
const mid = []; // workspace group: branch, feat
|
|
244
|
-
const right = []; // burn group: ctx, cost, lines
|
|
242
|
+
const segments = [];
|
|
245
243
|
|
|
244
|
+
// Segment 1: Model with play icon
|
|
246
245
|
const modelName = payload?.model?.display_name;
|
|
247
|
-
if (modelName)
|
|
246
|
+
if (modelName) {
|
|
247
|
+
segments.push(`${green("▶")} ${cyan(modelName)}`);
|
|
248
|
+
}
|
|
248
249
|
|
|
250
|
+
// Segment 2: Output style with document icon
|
|
249
251
|
const styleName = payload?.output_style?.name;
|
|
250
|
-
if (styleName && styleName !== "default")
|
|
252
|
+
if (styleName && styleName !== "default") {
|
|
253
|
+
segments.push(`${dim("📝")} ${dim(styleName)}`);
|
|
254
|
+
}
|
|
251
255
|
|
|
256
|
+
// Segment 3: Duration with timer icon
|
|
252
257
|
const durMs = payload?.cost?.total_duration_ms;
|
|
253
|
-
if (durMs && durMs >= 1000)
|
|
258
|
+
if (durMs && durMs >= 1000) {
|
|
259
|
+
segments.push(`${dim("⏱")} ${dim(fmtDuration(durMs))}`);
|
|
260
|
+
}
|
|
254
261
|
|
|
262
|
+
// Segment 4: Branch with git icon
|
|
255
263
|
if (git?.branch) {
|
|
256
|
-
const
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
264
|
+
const branchIcon = dim("⎇");
|
|
265
|
+
const branchText = git.conflict ? red(`${git.branch}!CONFLICT`)
|
|
266
|
+
: git.dirty > 0 ? `${yellow(git.branch)}${dim("(")}${yellow(`±${git.dirty}`)}${dim(")")}`
|
|
267
|
+
: yellow(git.branch);
|
|
268
|
+
segments.push(`${branchIcon} ${branchText}`);
|
|
260
269
|
}
|
|
261
270
|
|
|
271
|
+
// Segment 5: Feature status with checkmark/cross icon
|
|
262
272
|
if (feat) {
|
|
263
|
-
|
|
273
|
+
const featIcon = feat.open ? red("✗") : green("✓");
|
|
274
|
+
const featText = feat.open ? magenta(feat.open) : green("clean");
|
|
275
|
+
segments.push(`${featIcon} ${featText}`);
|
|
264
276
|
}
|
|
265
277
|
|
|
278
|
+
// Segment 6: Context usage (bar + percentage)
|
|
266
279
|
const pct = payload?.context_window?.used_percentage;
|
|
267
280
|
if (typeof pct === "number") {
|
|
268
281
|
const col = ctxColor(pct);
|
|
269
|
-
|
|
282
|
+
segments.push(`${col(bar(pct))} ${col(`${Math.round(pct)}%`)}`);
|
|
270
283
|
}
|
|
271
284
|
|
|
285
|
+
// Segment 7: Cost
|
|
272
286
|
const cost = payload?.cost?.total_cost_usd;
|
|
273
287
|
if (typeof cost === "number" && cost > 0) {
|
|
274
|
-
|
|
288
|
+
segments.push(costStr(cost));
|
|
275
289
|
}
|
|
276
290
|
|
|
291
|
+
// Segment 8: Lines changed
|
|
277
292
|
if (config.showLines) {
|
|
278
293
|
const add = num(payload?.cost?.total_lines_added, 0);
|
|
279
294
|
const rem = num(payload?.cost?.total_lines_removed, 0);
|
|
280
295
|
if (add > 0 || rem > 0) {
|
|
281
|
-
|
|
296
|
+
segments.push(`${green("+" + add)}/${dimRed("-" + rem)}`);
|
|
282
297
|
}
|
|
283
298
|
}
|
|
284
299
|
|
|
285
|
-
|
|
286
|
-
if (left.length) parts.push(left.join(dim("│")));
|
|
287
|
-
if (mid.length) parts.push(mid.join(" "));
|
|
288
|
-
if (right.length) parts.push(right.join(" "));
|
|
289
|
-
return parts.join(" ");
|
|
300
|
+
return segments.join(` ${dim("│")} `);
|
|
290
301
|
}
|
|
291
302
|
|
|
292
303
|
// ---------------------------------------------------------------------------
|
|
293
|
-
// Line 2 — alerts.
|
|
304
|
+
// Line 2 — alerts (Dashboard Style with rich icons and clear segmentation).
|
|
294
305
|
// ---------------------------------------------------------------------------
|
|
295
306
|
function renderLine2(payload, sessionId, config, lang) {
|
|
296
307
|
if (config.compact) return "";
|
|
@@ -299,19 +310,19 @@ function renderLine2(payload, sessionId, config, lang) {
|
|
|
299
310
|
|
|
300
311
|
// Order by severity: hardest stop first.
|
|
301
312
|
if (payload?.exceeds_200k_tokens === true) {
|
|
302
|
-
alerts.push(red(
|
|
313
|
+
alerts.push(`${red("⚠")} ${red(t.over_200k)}`);
|
|
303
314
|
}
|
|
304
315
|
|
|
305
316
|
const pct = payload?.context_window?.used_percentage;
|
|
306
317
|
if (typeof pct === "number" && pct >= 80 && payload?.exceeds_200k_tokens !== true) {
|
|
307
|
-
alerts.push(red(
|
|
318
|
+
alerts.push(`${red("⚠")} ${red(`ctx ${Math.round(pct)}%${t.compact_soon}`)}`);
|
|
308
319
|
}
|
|
309
320
|
|
|
310
321
|
if (config.showRateLimit) {
|
|
311
322
|
const five = payload?.rate_limits?.five_hour;
|
|
312
323
|
if (five && typeof five.used_percentage === "number" && five.used_percentage >= 75) {
|
|
313
324
|
const resetTxt = five.resets_at ? `${t.rate_resets}${fmtCountdown(five.resets_at)}` : "";
|
|
314
|
-
alerts.push(yellow(
|
|
325
|
+
alerts.push(`${yellow("⏳")} ${yellow(`5h limit ${Math.round(five.used_percentage)}%${resetTxt}`)}`);
|
|
315
326
|
}
|
|
316
327
|
}
|
|
317
328
|
|
|
@@ -319,11 +330,11 @@ function renderLine2(payload, sessionId, config, lang) {
|
|
|
319
330
|
const lb = fetchLastBlock(sessionId);
|
|
320
331
|
if (lb) {
|
|
321
332
|
const title = String(lb.title || "").slice(0, 40);
|
|
322
|
-
alerts.push(red(
|
|
333
|
+
alerts.push(`${red("🚫")} ${red(`${t.last_block}${title}`)}`);
|
|
323
334
|
}
|
|
324
335
|
}
|
|
325
336
|
|
|
326
|
-
return alerts.join("
|
|
337
|
+
return alerts.join(` ${dim("│")} `);
|
|
327
338
|
}
|
|
328
339
|
|
|
329
340
|
// ---------------------------------------------------------------------------
|