@themoltnet/agent-daemon 0.2.1 → 0.3.0

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.
Files changed (2) hide show
  1. package/dist/main.js +23 -6
  2. package/package.json +6 -6
package/dist/main.js CHANGED
@@ -7669,7 +7669,9 @@ var reflectDiary = (options) => (options.client ?? client).get({
7669
7669
  ...options
7670
7670
  });
7671
7671
  /**
7672
- * Cluster semantically similar entries and return consolidation suggestions.
7672
+ * [DEPRECATED] Server-side consolidation is obsolete. Compose consolidation suggestions client-side using diary search + clustering. Cluster semantically similar entries and return consolidation suggestions.
7673
+ *
7674
+ * @deprecated
7673
7675
  */
7674
7676
  var consolidateDiary = (options) => (options.client ?? client).post({
7675
7677
  security: [
@@ -7695,7 +7697,9 @@ var consolidateDiary = (options) => (options.client ?? client).post({
7695
7697
  }
7696
7698
  });
7697
7699
  /**
7698
- * Compile a token-budget-fitted context pack from diary entries.
7700
+ * [DEPRECATED] Server-side compilation is obsolete. Use POST /diaries/:id/packs to create custom packs from agent-side entry selection. Compile a token-budget-fitted context pack from diary entries.
7701
+ *
7702
+ * @deprecated
7699
7703
  */
7700
7704
  var compileDiary = (options) => (options.client ?? client).post({
7701
7705
  security: [
@@ -13660,8 +13664,18 @@ var BASE_ALPINE_PACKAGES = [
13660
13664
  /** gh CLI version installed in every snapshot. */
13661
13665
  var GH_VERSION = "2.74.0";
13662
13666
  /** MoltNet CLI version — downloaded as a binary, no Node needed. */
13663
- var MOLTNET_CLI_VERSION = "1.28.0";
13664
- /** Resolve guest architecture from host (Gondolin VMs match host arch). */
13667
+ var MOLTNET_CLI_VERSION = "1.37.0";
13668
+ /**
13669
+ * Resolve guest architecture from host (Gondolin VMs match host arch).
13670
+ *
13671
+ * The two naming conventions are NOT interchangeable:
13672
+ * - `gh` — GitHub release-asset suffix (gh CLI ships `linux_amd64.tar.gz`,
13673
+ * `linux_arm64.tar.gz`).
13674
+ * - `npm` — npm optionalDependencies naming, which mirrors Node's
13675
+ * `process.arch` values (`x64`, `arm64`). The MoltNet CLI is
13676
+ * published as `@themoltnet/cli-linux-x64` and
13677
+ * `@themoltnet/cli-linux-arm64`, NOT `cli-linux-amd64`.
13678
+ */
13665
13679
  function getGuestArch() {
13666
13680
  if (process.arch === "arm64") return {
13667
13681
  gh: "linux_arm64",
@@ -13669,7 +13683,7 @@ function getGuestArch() {
13669
13683
  };
13670
13684
  return {
13671
13685
  gh: "linux_amd64",
13672
- npm: "linux-amd64"
13686
+ npm: "linux-x64"
13673
13687
  };
13674
13688
  }
13675
13689
  /** Hosts reachable during snapshot build. */
@@ -14828,6 +14842,7 @@ async function executePiTask(claimedTask, reporter, opts) {
14828
14842
  return makeFailedOutput("session_setup_failed", message);
14829
14843
  }
14830
14844
  let llmAbort = false;
14845
+ let llmErrorMessage = null;
14831
14846
  let assistantText = "";
14832
14847
  let reporterError = null;
14833
14848
  const usage = finalUsage;
@@ -14870,6 +14885,8 @@ async function executePiTask(claimedTask, reporter, opts) {
14870
14885
  }
14871
14886
  track(emit("turn_end", { stop_reason: msg?.stopReason ?? "end_turn" }));
14872
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;
14873
14890
  }
14874
14891
  });
14875
14892
  let runError = null;
@@ -14946,7 +14963,7 @@ async function executePiTask(claimedTask, reporter, opts) {
14946
14963
  };
14947
14964
  const status = runError || llmAbort || parseError || reporterError ? "failed" : "completed";
14948
14965
  const errorCode = runError?.code ?? parseError?.code ?? reporterError?.code ?? (llmAbort ? "llm_api_error" : void 0);
14949
- 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);
14950
14967
  return {
14951
14968
  taskId: task.id,
14952
14969
  attemptN,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@themoltnet/agent-daemon",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
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.",
@@ -34,18 +34,18 @@
34
34
  "pino": "^10.3.1",
35
35
  "pino-pretty": "^13.1.3",
36
36
  "@themoltnet/agent-runtime": "0.10.0",
37
- "@themoltnet/sdk": "0.98.0",
38
- "@themoltnet/pi-extension": "0.13.1"
37
+ "@themoltnet/pi-extension": "0.13.3",
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/crypto-service": "0.1.0",
46
45
  "@moltnet/bootstrap": "0.1.0",
47
- "@moltnet/tasks": "0.1.0",
48
- "@moltnet/database": "0.1.0"
46
+ "@moltnet/crypto-service": "0.1.0",
47
+ "@moltnet/database": "0.1.0",
48
+ "@moltnet/tasks": "0.1.0"
49
49
  },
50
50
  "nx": {
51
51
  "tags": [