@f5-sales-demo/xcsh 21.11.9 → 21.12.0

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,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@f5-sales-demo/xcsh",
4
- "version": "21.11.9",
4
+ "version": "21.12.0",
5
5
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://github.com/f5-sales-demo/xcsh",
7
7
  "author": "Can Boluk",
@@ -61,13 +61,13 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@agentclientprotocol/sdk": "1.3.0",
64
- "@f5-sales-demo/pi-agent-core": "21.11.9",
65
- "@f5-sales-demo/pi-ai": "21.11.9",
66
- "@f5-sales-demo/pi-natives": "21.11.9",
67
- "@f5-sales-demo/pi-resource-management": "21.11.9",
68
- "@f5-sales-demo/pi-tui": "21.11.9",
69
- "@f5-sales-demo/pi-utils": "21.11.9",
70
- "@f5-sales-demo/xcsh-stats": "21.11.9",
64
+ "@f5-sales-demo/pi-agent-core": "21.12.0",
65
+ "@f5-sales-demo/pi-ai": "21.12.0",
66
+ "@f5-sales-demo/pi-natives": "21.12.0",
67
+ "@f5-sales-demo/pi-resource-management": "21.12.0",
68
+ "@f5-sales-demo/pi-tui": "21.12.0",
69
+ "@f5-sales-demo/pi-utils": "21.12.0",
70
+ "@f5-sales-demo/xcsh-stats": "21.12.0",
71
71
  "@mozilla/readability": "^0.6",
72
72
  "@sinclair/typebox": "^0.34",
73
73
  "@xterm/headless": "^6.0",
@@ -56,10 +56,13 @@ const HERDR_AGENT_LABEL = "xcsh";
56
56
  // herdr keys its official lifecycle-authority and session-resume plumbing on the
57
57
  // `herdr:<agent>` source convention, so report as "herdr:xcsh" (not bare "xcsh").
58
58
  const HERDR_SOURCE = "herdr:xcsh";
59
+ const PHASE_SOURCE = "xcsh:phase";
59
60
  const REPORT_METHOD = "pane.report_agent";
61
+ const METADATA_METHOD = "pane.report_metadata";
60
62
  const SESSION_METHOD = "pane.report_agent_session";
61
63
  const RELEASE_METHOD = "pane.release_agent";
62
64
  const SOCKET_TIMEOUT_MS = 2000;
65
+ const PHASE_LABEL_TTL_MS = 60_000;
63
66
  const SETTLED_TURN_RECONCILE_DELAY_MS = 25;
64
67
  const PROMPT_BLOCKED_REASONS = {
65
68
  select: "selection required",
@@ -140,6 +143,8 @@ export default function herdrReporter(pi: ExtensionAPI): void {
140
143
  // process in a pane always starts above whatever the previous process reached.
141
144
  // Matches the pi/omp reporters and stays well inside Number.MAX_SAFE_INTEGER.
142
145
  let seq = Date.now() * 1000;
146
+ // Separate monotonic sequence for metadata frames (keyed by source in Herdr).
147
+ let phaseSeq = Date.now() * 1000;
143
148
  // Retains the fixed reason while an interactive prompt awaits the user, so an
144
149
  // agent_end duplicate cannot erase herdr's stored blocked message.
145
150
  let promptBlockedReason: string | undefined;
@@ -197,6 +202,32 @@ export default function herdrReporter(pi: ExtensionAPI): void {
197
202
  seq: seq++,
198
203
  });
199
204
 
205
+ const reportMetadata = (params: Record<string, unknown>): Promise<void> => {
206
+ const socketPath = process.env.HERDR_SOCKET_PATH;
207
+ if (!socketPath) {
208
+ return Promise.resolve();
209
+ }
210
+ const frame = {
211
+ pane_id: paneId,
212
+ source: PHASE_SOURCE,
213
+ applies_to_source: HERDR_SOURCE,
214
+ seq: phaseSeq++,
215
+ ...params,
216
+ };
217
+ return enqueue(() => sendToHerdrSocket(socketPath, METADATA_METHOD, frame, onError));
218
+ };
219
+
220
+ const setPhaseLabel = (label: string): Promise<void> =>
221
+ reportMetadata({
222
+ state_labels: { working: label },
223
+ ttl_ms: PHASE_LABEL_TTL_MS,
224
+ });
225
+
226
+ const clearPhaseLabel = (): Promise<void> =>
227
+ reportMetadata({
228
+ clear_state_labels: true,
229
+ });
230
+
200
231
  // Report the current session's identity so herdr can resume this pane
201
232
  // (`xcsh --resume=<session>`) after a server restart. This is sent only over
202
233
  // the socket; if herdr did not inject a socket path we skip it (state still
@@ -306,6 +337,39 @@ export default function herdrReporter(pi: ExtensionAPI): void {
306
337
  await reportSession(ctx);
307
338
  });
308
339
 
340
+ // Transient phase-label metadata (thinking / tool / retry / cleanup):
341
+ pi.on("message_update", async event => {
342
+ if (event.assistantMessageEvent.type === "thinking_start") {
343
+ await setPhaseLabel("thinking");
344
+ } else if (event.assistantMessageEvent.type === "thinking_end") {
345
+ await clearPhaseLabel();
346
+ }
347
+ });
348
+
349
+ pi.on("tool_execution_start", async () => {
350
+ await setPhaseLabel("tool");
351
+ });
352
+
353
+ pi.on("tool_execution_end", async () => {
354
+ await clearPhaseLabel();
355
+ });
356
+
357
+ pi.on("auto_retry_start", async () => {
358
+ await setPhaseLabel("retry");
359
+ });
360
+
361
+ pi.on("auto_retry_end", async () => {
362
+ await clearPhaseLabel();
363
+ });
364
+
365
+ pi.on("auto_compaction_start", async () => {
366
+ await setPhaseLabel("cleanup");
367
+ });
368
+
369
+ pi.on("auto_compaction_end", async () => {
370
+ await clearPhaseLabel();
371
+ });
372
+
309
373
  // Relinquish pane authority so herdr stops showing xcsh once we exit.
310
374
  pi.on("session_shutdown", () => {
311
375
  void send(RELEASE_METHOD, {
@@ -17,17 +17,17 @@ export interface BuildInfo {
17
17
  }
18
18
 
19
19
  export const BUILD_INFO: BuildInfo = {
20
- "version": "21.11.9",
21
- "commit": "20e49669529f750518c58c8317ad68537d492f00",
22
- "shortCommit": "20e4966",
20
+ "version": "21.12.0",
21
+ "commit": "08e999ba3cd4ca2872fe2306da72923558b62b63",
22
+ "shortCommit": "08e999b",
23
23
  "branch": "main",
24
- "tag": "v21.11.9",
25
- "commitDate": "2026-09-05T19:00:06+00:00",
26
- "buildDate": "2026-09-05T19:45:34.397Z",
24
+ "tag": "v21.12.0",
25
+ "commitDate": "2026-09-05T23:05:01+00:00",
26
+ "buildDate": "2026-09-06T00:07:00.377Z",
27
27
  "dirty": true,
28
28
  "prNumber": "",
29
29
  "repoUrl": "https://github.com/f5-sales-demo/xcsh",
30
30
  "repoSlug": "f5-sales-demo/xcsh",
31
- "commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/20e49669529f750518c58c8317ad68537d492f00",
32
- "releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v21.11.9"
31
+ "commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/08e999ba3cd4ca2872fe2306da72923558b62b63",
32
+ "releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v21.12.0"
33
33
  };