@plainconceptsplatform/loop-task 2.8.2 → 2.9.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/README.md CHANGED
@@ -9,10 +9,10 @@
9
9
 
10
10
  **[plainconceptsplatform.github.io/loop-task](https://plainconceptsplatform.github.io/loop-task)**
11
11
 
12
- [![npm version](https://img.shields.io/npm/v/loop-task?style=flat-square&color=black)](https://www.npmjs.com/package/loop-task)
13
- [![npm downloads](https://img.shields.io/npm/dm/loop-task?style=flat-square&color=black)](https://www.npmjs.com/package/loop-task)
14
- [![license](https://img.shields.io/npm/l/loop-task?style=flat-square&color=black)](./LICENSE)
15
- [![node](https://img.shields.io/node/v/loop-task?style=flat-square&color=black)](https://nodejs.org)
12
+ [![npm version](https://img.shields.io/npm/v/@plainconceptsplatform/loop-task?style=flat-square&color=black)](https://www.npmjs.com/package/@plainconceptsplatform/loop-task)
13
+ [![npm downloads](https://img.shields.io/npm/dm/@plainconceptsplatform/loop-task?style=flat-square&color=black)](https://www.npmjs.com/package/@plainconceptsplatform/loop-task)
14
+ [![license](https://img.shields.io/npm/l/@plainconceptsplatform/loop-task?style=flat-square&color=black)](./LICENSE)
15
+ [![node](https://img.shields.io/node/v/@plainconceptsplatform/loop-task?style=flat-square&color=black)](https://nodejs.org)
16
16
 
17
17
  </div>
18
18
 
@@ -47,7 +47,7 @@ No cron files to maintain and no daemon to babysit: loops persist across reboots
47
47
  ## Quick start
48
48
 
49
49
  ```bash
50
- npm install -g loop-task
50
+ npm install -g @plainconceptsplatform/loop-task
51
51
  loop-task # open the board
52
52
  loop-task start # start the daemon, restore persisted loops
53
53
  loop-task new 30m -- npm test # create a background loop
@@ -60,8 +60,8 @@ loop-task api # show HTTP API endpoints (Swagger, OpenAPI)
60
60
  Or run it directly:
61
61
 
62
62
  ```bash
63
- npx loop-task
64
- npx loop-task new 30m -- npm test
63
+ npx @plainconceptsplatform/loop-task
64
+ npx @plainconceptsplatform/loop-task new 30m -- npm test
65
65
  ```
66
66
 
67
67
  ## Agent skills
@@ -81,7 +81,7 @@ not intended for installation by Loop Task users.
81
81
  - **Node.js >= 20** - required for all commands including the board
82
82
 
83
83
  ```bash
84
- npm install -g loop-task
84
+ npm install -g @plainconceptsplatform/loop-task
85
85
  ```
86
86
 
87
87
  All commands (`start`, `new`, `run`, `board`) work with Node alone.
@@ -259,7 +259,7 @@ export async function executeCommand(command, commandArgs, cwd, logStream, signa
259
259
  commandSpan.setAttribute("loop_task.command.stdout", truncateForSpan(stdoutCapture.getCaptured(), MAX_SPAN_OUTPUT_BYTES));
260
260
  }
261
261
  }
262
- if (detectedIntegrationId && stdoutCapture) {
262
+ if (detectedIntegrationId && stdoutCapture && telemetryCtx) {
263
263
  tryParseAgentUsage(telemetryCtx.telemetry, detectedIntegrationId, { exitCode: result.exitCode ?? 0, stdout: stdoutCapture.getCaptured(), duration }, commandSpan);
264
264
  }
265
265
  let opencodeResult = undefined;
@@ -38,16 +38,41 @@ export class StdoutCaptureTransform extends Transform {
38
38
  const trimmed = line.trim();
39
39
  if (!trimmed)
40
40
  continue;
41
+ let pushed = false;
41
42
  try {
42
43
  const parsed = JSON.parse(trimmed);
43
44
  if (typeof parsed === "object" && parsed !== null && "type" in parsed) {
44
- continue;
45
+ const t = parsed.type;
46
+ if (t === "text" && parsed.part?.text) {
47
+ this.push(parsed.part.text + "\n");
48
+ pushed = true;
49
+ }
50
+ else if (t === "tool_use" && parsed.part?.state?.title) {
51
+ this.push(`→ ${parsed.part.state.title} (${parsed.part.tool})\n`);
52
+ pushed = true;
53
+ }
54
+ else if (t === "step_finish" && parsed.part?.reason === "stop") {
55
+ const tok = parsed.part.tokens;
56
+ if (tok) {
57
+ this.push(`[tokens: ${tok.input} in / ${tok.output} out]\n`);
58
+ }
59
+ pushed = true;
60
+ }
61
+ else if (t === "error" && parsed.error?.data?.message) {
62
+ this.push(`[error: ${parsed.error.data.message}]\n`);
63
+ pushed = true;
64
+ }
65
+ else {
66
+ pushed = true;
67
+ }
45
68
  }
46
69
  }
47
70
  catch {
48
- // not JSON, pass through
71
+ // not JSON
72
+ }
73
+ if (!pushed) {
74
+ this.push(line + "\n");
49
75
  }
50
- this.push(line + "\n");
51
76
  }
52
77
  callback();
53
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plainconceptsplatform/loop-task",
3
- "version": "2.8.2",
3
+ "version": "2.9.1",
4
4
  "description": "Loop engineering toolkit. Run any command on a cadence, in the background, managed from a terminal board. Schedule tests, builds, syncs, or agent prompts.",
5
5
  "type": "module",
6
6
  "bin": {