apps 0.0.1-beta.121 → 0.0.1-beta.122

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.
@@ -219,6 +219,16 @@ function callBudget(timeoutMs) {
219
219
  };
220
220
  });
221
221
  }
222
+ var decodeJsonText = Schema_exports.decodeUnknownOption(Schema_exports.fromJsonString(Schema_exports.Json));
223
+ var withoutStructuredCopy = (result) => {
224
+ const { structuredContent } = result;
225
+ if (structuredContent === void 0) return result;
226
+ const structured = JSON.stringify(structuredContent);
227
+ const content = result.content.filter(
228
+ (block) => !(block.type === "text" && typeof block.text === "string" && Option_exports.exists(decodeJsonText(block.text), (value) => JSON.stringify(value) === structured))
229
+ );
230
+ return content.length === result.content.length ? result : { ...result, content };
231
+ };
222
232
  var mcpCall = (client, name, input, context, timeoutMs, failure2) => Effect_exports.scoped(
223
233
  Effect_exports.gen(function* () {
224
234
  const budget = yield* callBudget(timeoutMs);
@@ -290,7 +300,8 @@ var mcpCall = (client, name, input, context, timeoutMs, failure2) => Effect_expo
290
300
  Effect_exports.raceFirst(budget.expired),
291
301
  Effect_exports.flatMap(
292
302
  (result) => Schema_exports.decodeUnknownEffect(McpToolResult)(result).pipe(
293
- Effect_exports.mapError(() => new McpError({ phase: "call", reason: "invalid_response" }))
303
+ Effect_exports.mapError(() => new McpError({ phase: "call", reason: "invalid_response" })),
304
+ Effect_exports.map(withoutStructuredCopy)
294
305
  )
295
306
  ),
296
307
  Effect_exports.tap(
package/js/mcp/effect.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  mcpClientEffect,
3
3
  mcpHealthEffect,
4
4
  mcpToolsEffect
5
- } from "../chunk-DONRL25A.js";
5
+ } from "../chunk-RR44Z4RU.js";
6
6
  import "../chunk-BCSNKUAC.js";
7
7
  import "../chunk-GU25DFBC.js";
8
8
  import "../chunk-KY4KYPUZ.js";
package/js/mcp.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  adaptMcpTool,
10
10
  mcpClientEffect,
11
11
  mcpHealthEffect
12
- } from "./chunk-DONRL25A.js";
12
+ } from "./chunk-RR44Z4RU.js";
13
13
  import "./chunk-BCSNKUAC.js";
14
14
  import "./chunk-GU25DFBC.js";
15
15
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps",
3
- "version": "0.0.1-beta.121",
3
+ "version": "0.0.1-beta.122",
4
4
  "description": "TypeScript apps with typed tools, accounts, storage, and UI.",
5
5
  "type": "module",
6
6
  "sideEffects": false,