gcf-harness-aif-ext 0.8.7 → 0.8.8

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.
@@ -25,7 +25,7 @@ const firstLines = (text, n) =>
25
25
  .join(' ');
26
26
 
27
27
  // The input field that tells most about a tool call, in this order; with none, the name alone.
28
- const TELLING = ['file_path', 'command', 'pattern', 'url'];
28
+ const TELLING = ['file_path', 'command', 'pattern', 'url', 'description'];
29
29
 
30
30
  function toolLine(use) {
31
31
  const key = TELLING.find((k) => typeof use.input?.[k] === 'string');
@@ -67,8 +67,13 @@ function costOf(e) {
67
67
  };
68
68
  }
69
69
 
70
- function summary(e, c) {
71
- const end = e.is_error ? `ended (${e.subtype ?? 'error'})` : 'done';
70
+ function summary(e, c, limited) {
71
+ // A limit ends with subtype `success`: name the limit, not that.
72
+ const end = limited
73
+ ? 'ended (usage limit)'
74
+ : e.is_error
75
+ ? `ended (${e.subtype ?? 'error'})`
76
+ : 'done';
72
77
  const t = c.tokens;
73
78
 
74
79
  return (
@@ -87,6 +92,8 @@ function summary(e, c) {
87
92
  */
88
93
  function limitIn(text, whole = true) {
89
94
  const s = String(text ?? '').trim();
95
+ // shortcut: any "You've hit your … limit" counts, so an agent's whole-line "You've hit your WIP
96
+ // limit" would pause its item; narrow it once Claude's wordings (Opus, weekly…) are all known.
90
97
  const hit = whole ? /^You['’]ve hit your [^\n]*limit[^\n]*$/i : /hit your .*limit/i;
91
98
  if (!hit.test(s)) return {};
92
99
 
@@ -152,10 +159,12 @@ function ended(e, at) {
152
159
  const cost = costOf(e);
153
160
  const text =
154
161
  typeof e.result === 'string' && e.result.trim() ? [`${at} result:\n${e.result}`] : [];
162
+ // An error result counts the message anywhere in it; any other only as the whole text.
163
+ const limit = limitIn(e.result, !e.is_error);
155
164
 
156
165
  return {
157
- lines: [...text, `${at} ${summary(e, cost)}`],
166
+ lines: [...text, `${at} ${summary(e, cost, Boolean(limit.limit))}`],
158
167
  cost,
159
- ...(e.is_error ? limitIn(e.result, false) : {}),
168
+ ...limit,
160
169
  };
161
170
  }
package/extension.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/lee-to/ai-factory/2.x/schemas/extension.schema.json",
3
3
  "name": "gcf-harness-aif-ext",
4
- "version": "0.8.7",
4
+ "version": "0.8.8",
5
5
  "description": "GCF orchestration harness for Claude Code: one-command card pipeline, readset guard",
6
6
  "skills": [
7
7
  "skills/gcf-run",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gcf-harness-aif-ext",
3
- "version": "0.8.7",
3
+ "version": "0.8.8",
4
4
  "description": "GCF orchestration harness for Claude Code: one-command card pipeline, readset guard",
5
5
  "type": "module",
6
6
  "license": "MIT",