pi-landstrip 0.20.6 → 0.20.7
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.ts +11 -9
- package/package.json +2 -2
package/dist/index.ts
CHANGED
|
@@ -5027,7 +5027,7 @@ ${outputText}` }
|
|
|
5027
5027
|
this.runPromises.delete(taskId);
|
|
5028
5028
|
this.persist(task);
|
|
5029
5029
|
const durationSec = taskDuration(taskDetails(task)) ?? "";
|
|
5030
|
-
const exitMsg = task.exitCode !== undefined && task.exitCode !== null ? task.exitCode === 0 ? "completed" : `failed (exit ${task.exitCode})` :
|
|
5030
|
+
const exitMsg = task.state === "cancelled" ? "cancelled" : task.exitCode !== undefined && task.exitCode !== null ? task.exitCode === 0 ? "completed" : `failed (exit ${task.exitCode})` : "error";
|
|
5031
5031
|
this.recentCompletions.set(taskId, {
|
|
5032
5032
|
label: task.description,
|
|
5033
5033
|
status: task.state === "completed" ? "completed" : task.state === "cancelled" ? "cancelled" : "error",
|
|
@@ -5879,19 +5879,21 @@ ${renderTaskResult(task.id, "completed", output)}`);
|
|
|
5879
5879
|
if (this.shuttingDown || task.delivered || this.foregroundClaims.has(task.id))
|
|
5880
5880
|
return;
|
|
5881
5881
|
const message = formatError(error);
|
|
5882
|
+
const cancelled = task.state === "cancelled";
|
|
5883
|
+
const status = cancelled ? "cancelled" : "failed";
|
|
5882
5884
|
const durationSec = taskDuration(taskDetails(task)) ?? "";
|
|
5883
5885
|
this.recentCompletions.set(task.id, {
|
|
5884
5886
|
label: task.description,
|
|
5885
|
-
status:
|
|
5886
|
-
text: `@${task.agent}: ${task.description}
|
|
5887
|
+
status: cancelled ? "cancelled" : "error",
|
|
5888
|
+
text: `@${task.agent}: ${task.description} ${status} (${durationSec})`,
|
|
5887
5889
|
finishedAt: Date.now()
|
|
5888
5890
|
});
|
|
5889
|
-
const delivered = await this.deliverBackground(task, `Background task
|
|
5891
|
+
const delivered = await this.deliverBackground(task, `Background task ${status}: ${task.description}
|
|
5890
5892
|
|
|
5891
|
-
${renderTaskResult(task.id,
|
|
5893
|
+
${renderTaskResult(task.id, task.state, message)}`);
|
|
5892
5894
|
if (!delivered)
|
|
5893
5895
|
return;
|
|
5894
|
-
ctx.ui.notify(`Background task
|
|
5896
|
+
ctx.ui.notify(`Background task ${status}: ${task.description}`, cancelled ? "info" : "error");
|
|
5895
5897
|
task.delivered = true;
|
|
5896
5898
|
this.persist(task);
|
|
5897
5899
|
this.notifyTaskUpdate();
|
|
@@ -5988,9 +5990,9 @@ ${renderTaskResult(task.id, "error", message)}`);
|
|
|
5988
5990
|
abortTaskProcess(taskId) {
|
|
5989
5991
|
const running = this.running.get(taskId);
|
|
5990
5992
|
if (running) {
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
}
|
|
5993
|
+
running.rpc.abort().catch(() => {
|
|
5994
|
+
return;
|
|
5995
|
+
});
|
|
5994
5996
|
}
|
|
5995
5997
|
const controller = this.controllers.get(taskId);
|
|
5996
5998
|
if (controller) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-landstrip",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.7",
|
|
4
4
|
"description": "Sandboxed Bash and process-backed agents for Pi",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"landstrip",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"ci:test": "npm run test"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@landstrip/landstrip-api": "^0.20.
|
|
42
|
+
"@landstrip/landstrip-api": "^0.20.7",
|
|
43
43
|
"jsonc-parser": "^3.3.1",
|
|
44
44
|
"minimatch": "^10.2.5",
|
|
45
45
|
"undici": "^8.9.0",
|