@subshell-ai/plugin-claude-code 3.1.1 → 3.1.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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../plugin-api/dist/types-CW2dMAMW.d.ts
1
+ //#region ../../plugin-api/dist/types-DPriUYLa.d.ts
2
2
  /** How the plugin learns about children: harness lifecycle hooks, or a loaded extension. */
3
3
  type HarnessSubagentDiscovery = "hooks" | "extension";
4
4
  /** Whether the sidebar can move the parent's own view to a child, or the harness keeps that in-app. */
@@ -397,6 +397,19 @@ interface SubshellPlugin {
397
397
  * used as-is, which is right for every harness that prints just a version.
398
398
  */
399
399
  parseVersion?(raw: string): string | null;
400
+ /**
401
+ * Turns the harness's own terminal title into the subshell name the rail
402
+ * shows.
403
+ *
404
+ * The host removes escape sequences and control bytes and trims the result
405
+ * before calling this, so `raw` is safe text. Interpret what the title adds
406
+ * around the session name — a brand, a run-state separator, a cycling
407
+ * status glyph — and return the name behind it. Return "" when the title
408
+ * names nothing, and the caller keeps the name the pane already had. Omit
409
+ * the member when the harness titles its pane with the name the host
410
+ * supplied, which needs no interpretation.
411
+ */
412
+ parsePaneTitle?(raw: string): string;
400
413
  /** Overrides manifest-driven detection. Almost no plugin needs this. */
401
414
  detect?(): Promise<DetectionResult>;
402
415
  /** Restart-resume support. Declare the `resume` capability with it. */
package/dist/index.js CHANGED
@@ -286,7 +286,7 @@ function validateGenericPreset(preset) {
286
286
  const parsed = parseManifest({
287
287
  name: "@subshell-ai/plugin-claude-code",
288
288
  description: "Claude Code harness plugin for Subshell",
289
- version: "3.1.1",
289
+ version: "3.1.2",
290
290
  license: "Apache-2.0",
291
291
  type: "module",
292
292
  main: "dist/index.js",
@@ -316,7 +316,7 @@ const parsed = parseManifest({
316
316
  "@internal/tsconfig": "workspace:*",
317
317
  "@subshell-ai/plugin-api": "workspace:*",
318
318
  "@types/bun": "1.3.14",
319
- "hash-runner": "4.0.0",
319
+ "hash-runner": "5.0.0",
320
320
  "tsdown": "0.22.14",
321
321
  "typescript": "7.0.2"
322
322
  },
@@ -556,6 +556,12 @@ const reporterHook = (host, reporter, ...verb) => [
556
556
  * answered (spec 2026-09-23). `Stop` reports `turn_complete` blind here:
557
557
  * the reporter reads the hook payload and stays silent for a session
558
558
  * parked on background work (`packages/mcp-core/src/report.ts`).
559
+ * `Stop` carries a second command, `report subagents`: the turn-end payload
560
+ * enumerates the harness's live background agents, and the server replaces
561
+ * its roster with that set. Edge events cannot reconcile it alone — a
562
+ * background child killed with `TaskStop` fires no lifecycle hook at all,
563
+ * so its row would pin the rail "running" forever (measured on Claude Code
564
+ * 2.1.296; the rail then only self-heals at the next turn boundary).
559
565
  * - `UserPromptSubmit` / `PreToolUse` (the matcher-less entry) — the waiting
560
566
  * CLEAR (`resumed`). The plane's idle-watcher can only clear what it can
561
567
  * stat, so an agent-node pane — log on the node's disk — stayed "waiting
@@ -592,6 +598,9 @@ const paneHooks = (host, reporter) => ({
592
598
  Stop: [{ hooks: [{
593
599
  type: "command",
594
600
  command: reporterHook(host, reporter, "attention", "turn_complete")
601
+ }, {
602
+ type: "command",
603
+ command: reporterHook(host, reporter, "subagents")
595
604
  }] }],
596
605
  Notification: [{
597
606
  matcher: "permission_prompt|agent_needs_input|elicitation_dialog|elicitation_url_dialog",
@@ -634,6 +643,16 @@ function projectSlug(cwd) {
634
643
  return cwd.replace(/[^a-zA-Z0-9]/g, "-");
635
644
  }
636
645
  /**
646
+ * Claude Code puts a cycling status glyph at the front of its pane title
647
+ * (`✳ Ship the rename feature`, then `✻ …` on the next sweep). The glyph is
648
+ * Claude's run state, not part of the session name, and leaving it in made the
649
+ * mirrored name churn between sweeps. Strip the leading decoration — glyphs,
650
+ * punctuation, and the space after them — so only the task text remains. A
651
+ * title that is nothing but the glyph parses to nothing, and the caller keeps
652
+ * the name it already had.
653
+ */
654
+ const STATUS_GLYPH = /^[^\p{L}\p{N}]+/u;
655
+ /**
637
656
  * Built-in harness: Claude Code.
638
657
  *
639
658
  * Launch shape:
@@ -662,6 +681,8 @@ const createPlugin = (host) => ({
662
681
  "attention",
663
682
  "settings"
664
683
  ],
684
+ /** Claude Code prefixes its pane title with a cycling status glyph. */
685
+ parsePaneTitle: (raw) => raw.replace(STATUS_GLYPH, "").trim(),
665
686
  supportsAttentionHooks: true,
666
687
  /**
667
688
  * Restart-resume: conversations are PINNED at start (`--session-id <uuid>`)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@subshell-ai/plugin-claude-code",
3
3
  "description": "Claude Code harness plugin for Subshell",
4
- "version": "3.1.1",
4
+ "version": "3.1.2",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "@internal/tsconfig": "workspace:*",
36
36
  "@subshell-ai/plugin-api": "workspace:*",
37
37
  "@types/bun": "1.3.14",
38
- "hash-runner": "4.0.0",
38
+ "hash-runner": "5.0.0",
39
39
  "tsdown": "0.22.14",
40
40
  "typescript": "7.0.2"
41
41
  },