@dougbots/avenor-pi 0.3.6 → 0.3.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.d.ts +2 -1
- package/dist/index.js +7 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
|
|
3
3
|
//#region src/index.d.ts
|
|
4
|
+
declare function statusSupervisorId(requestedSupervisorId: string | undefined, spawnedSupervisorId: string): string | undefined;
|
|
4
5
|
declare function export_default(pi: ExtensionAPI): Promise<void>;
|
|
5
6
|
//#endregion
|
|
6
|
-
export { export_default as default };
|
|
7
|
+
export { export_default as default, statusSupervisorId };
|
package/dist/index.js
CHANGED
|
@@ -80,6 +80,9 @@ function formatRunLine(entry) {
|
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/index.ts
|
|
82
82
|
const POLL_INTERVAL_MS = 3e3;
|
|
83
|
+
function statusSupervisorId(requestedSupervisorId, spawnedSupervisorId) {
|
|
84
|
+
return requestedSupervisorId ? spawnedSupervisorId : void 0;
|
|
85
|
+
}
|
|
83
86
|
function sleep(ms) {
|
|
84
87
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
85
88
|
}
|
|
@@ -350,11 +353,12 @@ async function src_default(pi) {
|
|
|
350
353
|
serverUrl: params.server_url,
|
|
351
354
|
supervisorId: params.supervisor_id
|
|
352
355
|
});
|
|
356
|
+
const supervisorId = statusSupervisorId(params.supervisor_id, result.supervisor_id);
|
|
353
357
|
trackedRuns.set(result.run_id, {
|
|
354
358
|
runId: result.run_id,
|
|
355
359
|
agent: params.agent,
|
|
356
360
|
label,
|
|
357
|
-
supervisorId
|
|
361
|
+
supervisorId,
|
|
358
362
|
runtimeId: result.runtime_id,
|
|
359
363
|
startTime: Date.now(),
|
|
360
364
|
blocking: wait
|
|
@@ -388,7 +392,7 @@ async function src_default(pi) {
|
|
|
388
392
|
try {
|
|
389
393
|
raw = await statusTool({
|
|
390
394
|
runId: result.run_id,
|
|
391
|
-
supervisorId
|
|
395
|
+
supervisorId
|
|
392
396
|
});
|
|
393
397
|
} catch (err) {
|
|
394
398
|
console.error("avenor spawn poll: statusTool failed", err);
|
|
@@ -740,4 +744,4 @@ async function src_default(pi) {
|
|
|
740
744
|
});
|
|
741
745
|
}
|
|
742
746
|
//#endregion
|
|
743
|
-
export { src_default as default };
|
|
747
|
+
export { src_default as default, statusSupervisorId };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dougbots/avenor-pi",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dev": "tsdown --watch"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@dougbots/avenor-core": "^0.3.
|
|
38
|
+
"@dougbots/avenor-core": "^0.3.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@earendil-works/pi-coding-agent": "*",
|