@shanepadgett/tau-agent 0.11.0 → 0.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.
@@ -1,10 +1,12 @@
1
1
  # Attention
2
2
 
3
- Sends a terminal-driven attention notification when Tau is ready for input.
3
+ Sends a terminal-driven attention notification when Tau is ready for input, finishes compacting a session, or summarizes an abandoned branch during tree navigation.
4
4
 
5
5
  ## Behavior
6
6
 
7
7
  - Emits an attention notification on `agent_end`.
8
+ - Emits an attention notification on `session_compact`.
9
+ - Emits an attention notification on `session_tree` when it includes a branch summary.
8
10
  - Listens for shared event `tau:agent.blocked` when Tau is waiting on user input.
9
11
  - Uses the terminal or host OS notification path that best fits the current environment.
10
12
 
@@ -4,6 +4,8 @@ import { onTauEvent } from "../../shared/events.js";
4
4
 
5
5
  const DEFAULT_TITLE = "Tau";
6
6
  const DEFAULT_BODY = "Ready for input";
7
+ const COMPACTION_BODY = "Compaction complete";
8
+ const BRANCH_SUMMARY_BODY = "Branch summary complete";
7
9
  const MACOS_SOUND = "/System/Library/Sounds/Submarine.aiff";
8
10
 
9
11
  function oscText(value: string): string {
@@ -68,4 +70,14 @@ export default function attentionExtension(pi: ExtensionAPI): void {
68
70
  if (ctx.mode === "print") return;
69
71
  notify({ title: DEFAULT_TITLE, body: DEFAULT_BODY });
70
72
  });
73
+
74
+ pi.on("session_compact", (_event, ctx) => {
75
+ if (ctx.mode === "print") return;
76
+ notify({ title: DEFAULT_TITLE, body: COMPACTION_BODY });
77
+ });
78
+
79
+ pi.on("session_tree", (event, ctx) => {
80
+ if (ctx.mode === "print" || !event.summaryEntry) return;
81
+ notify({ title: DEFAULT_TITLE, body: BRANCH_SUMMARY_BODY });
82
+ });
71
83
  }
@@ -271,7 +271,7 @@ export function createExploreReadTool(
271
271
  ) {
272
272
  rowState.watch(context.toolCallId, context.invalidate);
273
273
  const text = (context.lastComponent as Text | undefined) ?? new Text("", 0, 0);
274
- if (context.executionStarted) {
274
+ if (context.executionStarted || !context.isPartial) {
275
275
  text.setText("");
276
276
  return text;
277
277
  }
@@ -9,3 +9,5 @@ Create a tagged Tau release and monitor its GitHub Actions npm publish run.
9
9
  ```
10
10
 
11
11
  `/publish` requires a clean Git working tree, authenticated GitHub CLI, and public approved npm package sources. It recommends a semantic version bump from commits since the previous release tag, asks for confirmation, then pushes a release tag. GitHub Actions publishes the TUI package before the agent package through npm trusted publishing.
12
+
13
+ If publishing fails, the agent runs read-only diagnostics and recommends a solution. It does not apply the fix or retry the release.
@@ -42,7 +42,18 @@ export default function publishExtension(pi: ExtensionAPI): void {
42
42
  try {
43
43
  await publish(pi, ctx);
44
44
  } catch (error) {
45
- ctx.ui.notify(`Publish failed: ${errorText(error)}`, "error");
45
+ pi.sendMessage(
46
+ {
47
+ customType: "tau.publish-failure",
48
+ content: [
49
+ "The /publish command failed with this error:",
50
+ errorText(error),
51
+ "Investigate the failure using read-only diagnostics. Determine the likely cause and recommend a solution to the user. Do not change files, git state, package state, or remote state, and do not retry publishing.",
52
+ ].join("\n\n"),
53
+ display: false,
54
+ },
55
+ { triggerTurn: true },
56
+ );
46
57
  }
47
58
  },
48
59
  });
@@ -2,12 +2,12 @@
2
2
  name: generalist
3
3
  description: Handle focused analysis, review, implementation, or mixed tasks when no narrower agent fits; specify scope and depth
4
4
  tools:
5
- - read
6
- - patch
7
- - grep
8
- - find
9
- - ls
10
- model: openai-codex/gpt-5.5-sol
5
+ - read
6
+ - patch
7
+ - grep
8
+ - find
9
+ - ls
10
+ model: openai-codex/gpt-5.6-sol
11
11
  thinking: high
12
12
  ---
13
13
 
@@ -178,6 +178,7 @@ export default function subagentExtension(pi: ExtensionAPI): void {
178
178
  renderCall(args, theme, context) {
179
179
  return renderSubagentCall(args, theme, {
180
180
  executionStarted: context.executionStarted,
181
+ isPartial: context.isPartial,
181
182
  lastComponent: context.lastComponent,
182
183
  rowState,
183
184
  rowId: context.toolCallId,
@@ -1,29 +1,11 @@
1
1
  import type { Theme } from "@earendil-works/pi-coding-agent";
2
- import { Text, truncateToWidth, type Component } from "@earendil-works/pi-tui";
2
+ import { Text, type Component } from "@earendil-works/pi-tui";
3
3
  import { formatToolRowTitle, type ToolRowStateStore } from "../../shared/tool-row-state.js";
4
4
  import type { SubagentDetails } from "./run.ts";
5
5
 
6
6
  const cap = (text: string | undefined, length = 240) =>
7
7
  !text ? "" : text.length <= length ? text : `${text.slice(0, length - 1)}…`;
8
- class SubagentText implements Component {
9
- private readonly text = new Text("", 0, 0);
10
- private value = "";
11
- private truncate = false;
12
- setText(value: string, truncate = false): void {
13
- this.value = value;
14
- this.text.setText(value);
15
- this.truncate = truncate;
16
- }
17
- render(width: number): string[] {
18
- return this.truncate
19
- ? this.value.split("\n").map((line) => truncateToWidth(line, width))
20
- : this.text.render(width);
21
- }
22
- invalidate(): void {
23
- this.text.invalidate();
24
- }
25
- }
26
- const component = (last: unknown) => (last as SubagentText | undefined) ?? new SubagentText();
8
+ const component = (last: unknown) => (last as Text | undefined) ?? new Text("", 0, 0);
27
9
  const title = (theme: Theme, rowState: ToolRowStateStore, rowId: string, invalidate: () => void) => {
28
10
  rowState.watch(rowId, invalidate);
29
11
  return formatToolRowTitle(rowState, rowId, "subagent", theme);
@@ -34,6 +16,7 @@ export function renderSubagentCall(
34
16
  theme: Theme,
35
17
  context: {
36
18
  executionStarted: boolean;
19
+ isPartial: boolean;
37
20
  lastComponent?: unknown;
38
21
  rowState: ToolRowStateStore;
39
22
  rowId: string;
@@ -41,14 +24,14 @@ export function renderSubagentCall(
41
24
  },
42
25
  ): Component {
43
26
  const text = component(context.lastComponent);
44
- if (context.executionStarted) {
27
+ if (context.executionStarted || !context.isPartial) {
45
28
  text.setText("");
46
29
  return text;
47
30
  }
48
- text.setText(
49
- `${title(theme, context.rowState, context.rowId, context.invalidate)} ${theme.fg("accent", args.agent ?? "")} ${theme.fg("muted", args.task ?? "")}`.trimEnd(),
50
- true,
51
- );
31
+ const prefix =
32
+ `${title(theme, context.rowState, context.rowId, context.invalidate)} ${theme.fg("accent", args.agent ?? "")}`.trimEnd();
33
+ const task = args.task?.replace(/\s+/g, " ").trim();
34
+ text.setText(task ? `${prefix} ${theme.fg("muted", task)}` : prefix);
52
35
  return text;
53
36
  }
54
37
 
@@ -66,7 +49,7 @@ export function renderSubagentResult(
66
49
  }
67
50
  const header = `${title(theme, context.rowState, context.rowId, context.invalidate)} ${theme.fg("accent", details.agent)} ${theme.fg("muted", `$${details.usage.cost.toFixed(4)} · ${(details.durationMs / 1000).toFixed(1)}s · ${details.toolCalls} tools`)}`;
68
51
  if (!expanded) {
69
- text.setText(`${header}\n${theme.fg("muted", details.task)}`, true);
52
+ text.setText(`${header} ${theme.fg("muted", details.task.replace(/\s+/g, " ").trim())}`);
70
53
  return text;
71
54
  }
72
55
  const lines = [header, theme.fg("muted", `Task: ${cap(details.task, 1000)}`)];
@@ -8,7 +8,7 @@ Gives the agent macOS window discovery, screenshots, and app activation tools fo
8
8
 
9
9
  ## attention
10
10
 
11
- Shows attention state when Tau needs the user to look at the chat.
11
+ Shows attention state when Tau needs the user to look at the chat, finishes compacting a session, or summarizes an abandoned branch.
12
12
 
13
13
  ## auto-name
14
14
 
@@ -60,7 +60,7 @@ Replaces separate edit/write operations with one multi-file `patch` tool. It can
60
60
 
61
61
  ## publish
62
62
 
63
- Adds `/publish` to create a tagged release, trigger trusted npm publishing in GitHub Actions, and show its status. It recommends a semantic version bump from commits since the prior release tag, but you must confirm the release type and publish action.
63
+ Adds `/publish` to create a tagged release, trigger trusted npm publishing in GitHub Actions, and show its status. It recommends a semantic version bump from commits since the prior release tag, but you must confirm the release type and publish action. If publishing fails, the agent investigates with read-only diagnostics and recommends a solution without applying it or retrying the release.
64
64
 
65
65
  ## qna
66
66
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shanepadgett/tau-agent",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Tau is a custom agentic harness built with pi extensions",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  "README.md"
29
29
  ],
30
30
  "dependencies": {
31
- "@shanepadgett/tau-tui": "0.11.0",
31
+ "@shanepadgett/tau-tui": "0.12.0",
32
32
  "@toon-format/toon": "2.3.0",
33
33
  "smol-toml": "1.7.0"
34
34
  },