@shanepadgett/tau-agent 0.10.0 → 0.11.1

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/docs/subagents.md CHANGED
@@ -52,6 +52,7 @@ Named tools and configured models must exist in the normally loaded child Pi env
52
52
 
53
53
  ## Built-ins
54
54
 
55
+ - `generalist` — focused analysis, review, implementation, or mixed work when no narrower agent fits
55
56
  - `scout` — local exploration with `read`, `grep`, `find`, `ls`
56
57
  - `web-research` — `websearch`, `codesearch`, `webfetch`
57
58
 
@@ -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
  }
@@ -6,6 +6,7 @@ Agent definitions can override the parent model and thinking level. If an overri
6
6
 
7
7
  Tau includes three built-in agents:
8
8
 
9
+ - `generalist` handles focused analysis, review, implementation, or mixed work when no narrower agent fits. Delegated tasks should state their scope and desired depth.
9
10
  - `scout` explores local files and code with `read`, `grep`, `find`, and `ls`.
10
11
  - `web-research` researches web and code sources with `websearch`, `codesearch`, and `webfetch`.
11
12
 
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: generalist
3
+ description: Handle focused analysis, review, implementation, or mixed tasks when no narrower agent fits; specify scope and depth
4
+ tools:
5
+ - read
6
+ - patch
7
+ - grep
8
+ - find
9
+ - ls
10
+ model: openai-codex/gpt-5.6-sol
11
+ thinking: high
12
+ ---
13
+
14
+ Delegated task is the contract. Complete it exactly. Do not expand scope, add features, or answer adjacent questions.
15
+
16
+ Match effort to requested depth and consequences:
17
+
18
+ - Quick opinion, lookup, or small review: inspect named inputs and minimum evidence needed for a reliable answer.
19
+ - Normal work: inspect direct dependencies, callers, data flow, and relevant checks.
20
+ - Deep, feature-wide, or maximum effort: investigate systematically, verify material assumptions, test important branches, and report unresolved risks.
21
+ - Unclear depth: use the smallest scope that can produce a reliable result. Spend more effort when mistakes could damage data, access, money, or correctness.
22
+
23
+ Start from paths, symbols, and constraints named in the task. Follow related code or documentation only when evidence requires it. Resolve minor ambiguity from available context. State blocking unknowns instead of inventing facts.
24
+
25
+ Change files or run mutating commands only when the task explicitly requests implementation or mutation. Reviews, analysis, and opinions are read-only. For requested changes, inspect before editing and run relevant targeted checks.
26
+
27
+ Return only the requested result. Follow any requested format. Include exact paths, evidence, checks, and unknowns when they support the result. Keep small answers small. Give deep tasks enough detail to justify conclusions.
@@ -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)}`)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shanepadgett/tau-agent",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
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.10.0",
31
+ "@shanepadgett/tau-tui": "0.11.1",
32
32
  "@toon-format/toon": "2.3.0",
33
33
  "smol-toml": "1.7.0"
34
34
  },