@themoltnet/agent-daemon 0.2.2 → 0.3.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/dist/main.js +5 -2
- package/package.json +8 -8
package/dist/main.js
CHANGED
|
@@ -14792,7 +14792,7 @@ async function executePiTask(claimedTask, reporter, opts) {
|
|
|
14792
14792
|
correlationId: task.correlationId ?? null
|
|
14793
14793
|
})
|
|
14794
14794
|
});
|
|
14795
|
-
const piAuthDir = join(homedir(), ".pi", "agent");
|
|
14795
|
+
const piAuthDir = process.env.PI_CODING_AGENT_DIR ?? join(homedir(), ".pi", "agent");
|
|
14796
14796
|
const modelHandle = getModel(opts.provider, opts.model);
|
|
14797
14797
|
const piOtelExtension = createPiOtelExtension({
|
|
14798
14798
|
agentName: opts.agentName,
|
|
@@ -14842,6 +14842,7 @@ async function executePiTask(claimedTask, reporter, opts) {
|
|
|
14842
14842
|
return makeFailedOutput("session_setup_failed", message);
|
|
14843
14843
|
}
|
|
14844
14844
|
let llmAbort = false;
|
|
14845
|
+
let llmErrorMessage = null;
|
|
14845
14846
|
let assistantText = "";
|
|
14846
14847
|
let reporterError = null;
|
|
14847
14848
|
const usage = finalUsage;
|
|
@@ -14884,6 +14885,8 @@ async function executePiTask(claimedTask, reporter, opts) {
|
|
|
14884
14885
|
}
|
|
14885
14886
|
track(emit("turn_end", { stop_reason: msg?.stopReason ?? "end_turn" }));
|
|
14886
14887
|
llmAbort = msg?.stopReason === "error";
|
|
14888
|
+
if (msg?.stopReason === "error") llmErrorMessage = typeof msg.errorMessage === "string" && msg.errorMessage.length > 0 ? msg.errorMessage : null;
|
|
14889
|
+
else llmErrorMessage = null;
|
|
14887
14890
|
}
|
|
14888
14891
|
});
|
|
14889
14892
|
let runError = null;
|
|
@@ -14960,7 +14963,7 @@ async function executePiTask(claimedTask, reporter, opts) {
|
|
|
14960
14963
|
};
|
|
14961
14964
|
const status = runError || llmAbort || parseError || reporterError ? "failed" : "completed";
|
|
14962
14965
|
const errorCode = runError?.code ?? parseError?.code ?? reporterError?.code ?? (llmAbort ? "llm_api_error" : void 0);
|
|
14963
|
-
const errorMessage = runError?.message ?? parseError?.message ?? reporterError?.message ?? (llmAbort ? "LLM API error during turn" : void 0);
|
|
14966
|
+
const errorMessage = runError?.message ?? parseError?.message ?? reporterError?.message ?? (llmAbort ? llmErrorMessage ?? "LLM API error during turn" : void 0);
|
|
14964
14967
|
return {
|
|
14965
14968
|
taskId: task.id,
|
|
14966
14969
|
attemptN,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@themoltnet/agent-daemon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "MoltNet agent daemon — claims and executes tasks (fulfill_brief, assess_brief) from the MoltNet task-service via Pi-headless. CLI: moltnet-agent.",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"node": ">=22"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@earendil-works/gondolin": "^0.
|
|
25
|
+
"@earendil-works/gondolin": "^0.9.1",
|
|
26
26
|
"@earendil-works/pi-ai": "^0.74.0",
|
|
27
27
|
"@earendil-works/pi-coding-agent": "^0.74.0",
|
|
28
28
|
"@opentelemetry/api": "^1.9.0",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"@opentelemetry/semantic-conventions": "^1.39.0",
|
|
34
34
|
"pino": "^10.3.1",
|
|
35
35
|
"pino-pretty": "^13.1.3",
|
|
36
|
-
"@themoltnet/pi-extension": "0.13.
|
|
37
|
-
"@themoltnet/
|
|
38
|
-
"@themoltnet/
|
|
36
|
+
"@themoltnet/pi-extension": "0.13.4",
|
|
37
|
+
"@themoltnet/agent-runtime": "0.10.0",
|
|
38
|
+
"@themoltnet/sdk": "0.99.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"tsx": "^4.7.0",
|
|
42
42
|
"typescript": "^5.3.3",
|
|
43
43
|
"vite": "^8.0.0",
|
|
44
44
|
"vitest": "^3.0.0",
|
|
45
|
-
"@moltnet/database": "0.1.0",
|
|
46
|
-
"@moltnet/bootstrap": "0.1.0",
|
|
47
45
|
"@moltnet/crypto-service": "0.1.0",
|
|
48
|
-
"@moltnet/
|
|
46
|
+
"@moltnet/database": "0.1.0",
|
|
47
|
+
"@moltnet/tasks": "0.1.0",
|
|
48
|
+
"@moltnet/bootstrap": "0.1.0"
|
|
49
49
|
},
|
|
50
50
|
"nx": {
|
|
51
51
|
"tags": [
|