@aliou/pi-processes 0.7.0 → 0.7.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/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ ![banner](https://assets.aliou.me/pi-extensions/banners/pi-processes.png)
2
+
1
3
  # pi-processes
2
4
 
3
5
  Manage background processes from Pi without blocking the conversation.
@@ -183,4 +185,4 @@ For development, testing, docs generation, and extension internals, see [CONTRIB
183
185
 
184
186
  ## License
185
187
 
186
- MIT
188
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aliou/pi-processes",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "private": false,
@@ -39,16 +39,16 @@
39
39
  "@sinclair/typebox": "^0.34.41"
40
40
  },
41
41
  "peerDependencies": {
42
- "@mariozechner/pi-coding-agent": "0.61.0",
43
- "@mariozechner/pi-tui": "0.61.0"
42
+ "@mariozechner/pi-coding-agent": "0.65.0",
43
+ "@mariozechner/pi-tui": "0.65.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@aliou/biome-plugins": "^0.3.2",
47
47
  "@aliou/pi-evals": "^0.3.0",
48
48
  "@biomejs/biome": "^2.3.13",
49
49
  "@changesets/cli": "^2.27.11",
50
- "@mariozechner/pi-ai": "0.61.0",
51
- "@mariozechner/pi-coding-agent": "0.61.0",
50
+ "@mariozechner/pi-ai": "0.65.0",
51
+ "@mariozechner/pi-coding-agent": "0.65.0",
52
52
  "@types/node": "^25.0.10",
53
53
  "husky": "^9.1.7",
54
54
  "typescript": "^5.9.3",
@@ -147,10 +147,6 @@ export function setupProcessWidget(
147
147
  });
148
148
 
149
149
  pi.on("session_start", async (_event, ctx) => {
150
- latestContext = ctx;
151
- });
152
-
153
- pi.on("session_switch", async (_event, ctx) => {
154
150
  if (logDockComponent) {
155
151
  logDockComponent.dispose();
156
152
  logDockComponent = null;
@@ -80,10 +80,7 @@ export async function executeAction(
80
80
  }
81
81
  }
82
82
 
83
- export function renderActionCall(
84
- args: ActionParams,
85
- theme: Theme,
86
- ): Component | undefined {
83
+ export function renderActionCall(args: ActionParams, theme: Theme): Component {
87
84
  switch (args.action) {
88
85
  case "start":
89
86
  return renderStartCall(args, theme);
@@ -109,11 +106,23 @@ export function renderActionResult(
109
106
  result: AgentToolResult<ProcessesDetails>,
110
107
  options: ToolRenderResultOptions,
111
108
  theme: Theme,
112
- ): Component | undefined {
109
+ ): Component {
113
110
  const { details } = result;
114
111
 
115
112
  if (!details) {
116
- return undefined;
113
+ return new ToolBody(
114
+ {
115
+ fields: [
116
+ {
117
+ label: "Result",
118
+ value: "No result details available.",
119
+ showCollapsed: true,
120
+ },
121
+ ],
122
+ },
123
+ options,
124
+ theme,
125
+ );
117
126
  }
118
127
 
119
128
  switch (details.action) {
@@ -144,6 +153,18 @@ export function renderActionResult(
144
153
  theme,
145
154
  );
146
155
  default:
147
- return undefined;
156
+ return new ToolBody(
157
+ {
158
+ fields: [
159
+ {
160
+ label: "Result",
161
+ value: details.message,
162
+ showCollapsed: true,
163
+ },
164
+ ],
165
+ },
166
+ options,
167
+ theme,
168
+ );
148
169
  }
149
170
  }
@@ -144,7 +144,7 @@ Note: User always sees process updates in the UI. The notify flags control wheth
144
144
  promptSnippet:
145
145
  "Manage background processes without blocking the conversation",
146
146
  promptGuidelines: [
147
- "Use this tool for long-running commands such as dev servers, test watchers, build watchers, and log tails instead of bash.",
147
+ "Use the process tool for long-running commands such as dev servers, test watchers, build watchers, and log tails instead of bash.",
148
148
  "Avoid shell background patterns such as &, nohup, disown, or setsid when the process tool fits.",
149
149
  "After starting a process, continue other work instead of waiting for it.",
150
150
  "Use the pi-processes skill for examples and best practices when a task depends on background processes.",
@@ -156,7 +156,7 @@ Note: User always sees process updates in the UI. The notify flags control wheth
156
156
  return executeAction(params, manager, ctx);
157
157
  },
158
158
 
159
- renderCall(args: ProcessesParamsType, theme: Theme) {
159
+ renderCall(args: ProcessesParamsType, theme: Theme, _context) {
160
160
  return renderActionCall(args, theme);
161
161
  },
162
162
 
@@ -164,6 +164,7 @@ Note: User always sees process updates in the UI. The notify flags control wheth
164
164
  result: AgentToolResult<ProcessesDetails>,
165
165
  options: ToolRenderResultOptions,
166
166
  theme: Theme,
167
+ _context,
167
168
  ) {
168
169
  if (options.isPartial) {
169
170
  return new Text(theme.fg("muted", "Process: running..."), 0, 0);