mastracode 0.10.1-alpha.0 → 0.10.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/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # mastracode
2
2
 
3
+ ## 0.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed /subagents to show configured subagents from the harness config. ([#14804](https://github.com/mastra-ai/mastra/pull/14804))
8
+
9
+ - Tools that return objects with circular references no longer crash the agent with "Converting circular structure to JSON". Circular parts are replaced with `"[Circular]"` and the conversation continues normally. ([#14535](https://github.com/mastra-ai/mastra/pull/14535))
10
+
11
+ - Updated dependencies [[`180aaaf`](https://github.com/mastra-ai/mastra/commit/180aaaf4d0903d33a49bc72de2d40ca69a5bc599), [`25bbff6`](https://github.com/mastra-ai/mastra/commit/25bbff67dadc01d5a18095574421f6266f610b17), [`9140989`](https://github.com/mastra-ai/mastra/commit/91409890e83f4f1d9c1b39223f1af91a6a53b549), [`542977f`](https://github.com/mastra-ai/mastra/commit/542977fe5043678df071ad3982b6bcbc78d95f02), [`d7c98cf`](https://github.com/mastra-ai/mastra/commit/d7c98cfc9d75baba9ecbf1a8835b5183d0a0aec8), [`acf5fbc`](https://github.com/mastra-ai/mastra/commit/acf5fbcb890dc7ca7167bec386ce5874dfadb997), [`24ca2ae`](https://github.com/mastra-ai/mastra/commit/24ca2ae57538ec189fabb9daee6175ad27035853), [`0762516`](https://github.com/mastra-ai/mastra/commit/07625167e029a8268ea7aaf0402416e6d8832874), [`9c57f2f`](https://github.com/mastra-ai/mastra/commit/9c57f2f7241e9f94769aa99fc86c531e8207d0f9), [`5bfc691`](https://github.com/mastra-ai/mastra/commit/5bfc69104c07ba7a9b55c2f8536422c0878b9c57), [`e91c011`](https://github.com/mastra-ai/mastra/commit/e91c0119878d956fdaab9b60ac721f93f3221335), [`d2d0bea`](https://github.com/mastra-ai/mastra/commit/d2d0beaafba2e25b9ad368015ce91312c372f6a5), [`2de3d36`](https://github.com/mastra-ai/mastra/commit/2de3d36932b7f73ad26bc403f7da26cfe89e903e), [`d3736cb`](https://github.com/mastra-ai/mastra/commit/d3736cb9ce074d2b8e8b00218a01f790fe81a1b4), [`c627366`](https://github.com/mastra-ai/mastra/commit/c6273666f9ef4c8c617c68b7d07fe878a322f85c), [`66a7412`](https://github.com/mastra-ai/mastra/commit/66a7412ec0550f3dfa01cd05b057d8c6e5b062bc)]:
12
+ - @mastra/core@1.19.0
13
+ - @mastra/memory@1.12.0
14
+ - @mastra/pg@1.8.5
15
+ - @mastra/mcp@1.4.0
16
+
17
+ ## 0.10.1-alpha.2
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [[`542977f`](https://github.com/mastra-ai/mastra/commit/542977fe5043678df071ad3982b6bcbc78d95f02), [`9c57f2f`](https://github.com/mastra-ai/mastra/commit/9c57f2f7241e9f94769aa99fc86c531e8207d0f9), [`5bfc691`](https://github.com/mastra-ai/mastra/commit/5bfc69104c07ba7a9b55c2f8536422c0878b9c57), [`d2d0bea`](https://github.com/mastra-ai/mastra/commit/d2d0beaafba2e25b9ad368015ce91312c372f6a5)]:
22
+ - @mastra/memory@1.12.0-alpha.1
23
+ - @mastra/core@1.19.0-alpha.2
24
+
25
+ ## 0.10.1-alpha.1
26
+
27
+ ### Patch Changes
28
+
29
+ - Fixed /subagents to show configured subagents from the harness config. ([#14804](https://github.com/mastra-ai/mastra/pull/14804))
30
+
31
+ - Tools that return objects with circular references no longer crash the agent with "Converting circular structure to JSON". Circular parts are replaced with `"[Circular]"` and the conversation continues normally. ([#14535](https://github.com/mastra-ai/mastra/pull/14535))
32
+
33
+ - Updated dependencies [[`9140989`](https://github.com/mastra-ai/mastra/commit/91409890e83f4f1d9c1b39223f1af91a6a53b549), [`d7c98cf`](https://github.com/mastra-ai/mastra/commit/d7c98cfc9d75baba9ecbf1a8835b5183d0a0aec8), [`acf5fbc`](https://github.com/mastra-ai/mastra/commit/acf5fbcb890dc7ca7167bec386ce5874dfadb997), [`24ca2ae`](https://github.com/mastra-ai/mastra/commit/24ca2ae57538ec189fabb9daee6175ad27035853), [`0762516`](https://github.com/mastra-ai/mastra/commit/07625167e029a8268ea7aaf0402416e6d8832874), [`e91c011`](https://github.com/mastra-ai/mastra/commit/e91c0119878d956fdaab9b60ac721f93f3221335), [`2de3d36`](https://github.com/mastra-ai/mastra/commit/2de3d36932b7f73ad26bc403f7da26cfe89e903e), [`d3736cb`](https://github.com/mastra-ai/mastra/commit/d3736cb9ce074d2b8e8b00218a01f790fe81a1b4), [`c627366`](https://github.com/mastra-ai/mastra/commit/c6273666f9ef4c8c617c68b7d07fe878a322f85c), [`66a7412`](https://github.com/mastra-ai/mastra/commit/66a7412ec0550f3dfa01cd05b057d8c6e5b062bc)]:
34
+ - @mastra/core@1.18.1-alpha.1
35
+ - @mastra/pg@1.8.5-alpha.0
36
+ - @mastra/mcp@1.4.0-alpha.0
37
+
3
38
  ## 0.10.1-alpha.0
4
39
 
5
40
  ### Patch Changes
@@ -14,6 +14,7 @@ import stripAnsi from 'strip-ansi';
14
14
  import * as os from 'os';
15
15
  import { tmpdir } from 'os';
16
16
  import { highlight } from 'cli-highlight';
17
+ import { safeStringify } from '@mastra/core/utils';
17
18
  import fs4 from 'fs/promises';
18
19
  import { parse } from 'partial-json';
19
20
  import { parse as parse$1 } from 'yaml';
@@ -876,7 +877,7 @@ function getInstallCommand(pm, version) {
876
877
  }
877
878
  function getCurrentVersion() {
878
879
  {
879
- return "0.10.1-alpha.0";
880
+ return "0.10.1";
880
881
  }
881
882
  }
882
883
  async function fetchLatestVersion() {
@@ -4704,7 +4705,12 @@ async function showSubagentScopeThenList(ctx, agentType, agentTypeLabel) {
4704
4705
  });
4705
4706
  }
4706
4707
  async function handleSubagentsCommand(ctx) {
4707
- const agentTypes = [
4708
+ const configuredSubagents = ctx.state.harness.config?.subagents;
4709
+ const agentTypes = configuredSubagents?.length ? configuredSubagents.map((subagent) => ({
4710
+ id: subagent.id,
4711
+ label: subagent.name,
4712
+ description: subagent.description
4713
+ })) : [
4708
4714
  {
4709
4715
  id: "explore",
4710
4716
  label: "Explore",
@@ -6855,7 +6861,7 @@ function formatArgs(args) {
6855
6861
  } else if (typeof value === "string") {
6856
6862
  valueStr = value.length > 50 ? `"${value.slice(0, 47)}..."` : `"${value}"`;
6857
6863
  } else if (typeof value === "object") {
6858
- valueStr = JSON.stringify(value);
6864
+ valueStr = safeStringify(value);
6859
6865
  if (valueStr.length > 50) {
6860
6866
  valueStr = valueStr.slice(0, 47) + "...";
6861
6867
  }
@@ -9324,7 +9330,7 @@ var SubagentExecutionComponent = class extends Container {
9324
9330
  if (toolCall.name === name && !toolCall.done) {
9325
9331
  toolCall.done = true;
9326
9332
  toolCall.isError = isError;
9327
- toolCall.result = typeof result === "string" ? result : JSON.stringify(result ?? "");
9333
+ toolCall.result = typeof result === "string" ? result : safeStringify(result ?? "");
9328
9334
  break;
9329
9335
  }
9330
9336
  }
@@ -9579,7 +9585,12 @@ var ToolApprovalDialogComponent = class extends Box {
9579
9585
  if (entries.length === 0) return "(none)";
9580
9586
  const lines = [];
9581
9587
  for (const [key, value] of entries) {
9582
- const str = typeof value === "string" ? value : JSON.stringify(value);
9588
+ let str;
9589
+ if (typeof value === "string") {
9590
+ str = value;
9591
+ } else {
9592
+ str = safeStringify(value);
9593
+ }
9583
9594
  const maxLen = 120;
9584
9595
  const firstLine = str.split("\n")[0] ?? "";
9585
9596
  const lineCount = typeof value === "string" ? str.split("\n").length : 0;
@@ -9632,7 +9643,7 @@ function formatToolResult(result) {
9632
9643
  }
9633
9644
  }
9634
9645
  try {
9635
- return JSON.stringify(result, null, 2);
9646
+ return safeStringify(result, 2);
9636
9647
  } catch {
9637
9648
  return String(result);
9638
9649
  }
@@ -12606,5 +12617,5 @@ var LoginSelectorComponent = class extends Box {
12606
12617
  };
12607
12618
 
12608
12619
  export { AssistantMessageComponent, LoginDialogComponent, LoginSelectorComponent, MastraTUI, ModelSelectorComponent, OMProgressComponent, ToolExecutionComponentEnhanced, UserMessageComponent, createTUIState, detectTerminalTheme, formatOMStatus, getCurrentVersion };
12609
- //# sourceMappingURL=chunk-EVZW4IPX.js.map
12610
- //# sourceMappingURL=chunk-EVZW4IPX.js.map
12620
+ //# sourceMappingURL=chunk-IBZQZT6E.js.map
12621
+ //# sourceMappingURL=chunk-IBZQZT6E.js.map