diff --git a/CHANGELOG.md b/CHANGELOG.md index 93a2d4b..e7edf67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ _If you are upgrading from 1.x: please see [Migrating from 1.x](MIGRATING.md)._ - Reduce every tool response with no fact lost: `apexlog_list_slow_operations` by 33% ([#86], [#108]) and `apexlog_execute_anonymous` by 30% ([#86], [#109]). `apexlog_get_summary` costs 16% more on a log that uses its limits, for the two tables it gained ([#62]) - **Breaking:** move to the MCP TypeScript SDK v2 packages, so the server speaks the 2026-07-28 protocol revision. Clients on the 2025 revisions keep working through the SDK's compatibility layer ([#103]) - Reduce the standing cost of having the server connected by 29%: `apexlog_execute_anonymous` by 50%, `apexlog_list_limit_risks` by 28% and `apexlog_get_summary` by 5% ([#87], [#108], [#103]). `apexlog_list_slow_operations` costs 28% more, for the five parameters that select what it ranks ([#108]) +- Encode responses with TOON v4. No response changed: v4 removes key folding and path expansion, and this server used neither ([#121]) - Parse a log once rather than once per tool, cached by path, inode, size, modification time and change time, so a summary followed by a deeper tool no longer reads and parses the file again. The parse is dropped after five minutes unused, so a large log is not held for the life of the session ([#88]) ### Added @@ -69,3 +70,4 @@ _If you are upgrading from 1.x: please see [Migrating from 1.x](MIGRATING.md)._ [#108]: https://github.com/certinia/debug-log-analyzer-mcp/issues/108 [#103]: https://github.com/certinia/debug-log-analyzer-mcp/issues/103 [#109]: https://github.com/certinia/debug-log-analyzer-mcp/issues/109 +[#121]: https://github.com/certinia/debug-log-analyzer-mcp/issues/121 diff --git a/DEVELOPING.md b/DEVELOPING.md index 33763db..b38ad4e 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -222,6 +222,11 @@ one-liners. ".gitignore" sentence it replaced was ~15, and it answers the question either way. - **Say in the tool description what is omitted and when.** Currently that is one sentence per tool, because there is one omission per tool. +- **Encode with the TOON defaults.** Measured, none of the alternatives pay: + - `indentSize: 1` — saves 2.4%, but `decode` rejects it without a matching `indentSize`. + - keyed tabular (`[n:]`) — costs one character per row, `,` becoming `: `. + - `delimiter` tab or pipe — 2 tokens on a 9,365-token response. Quoting comes from `:` in a name. + - nested field groups — nothing left to fold; every table is already flat. ### The gate diff --git a/package.json b/package.json index 6e8f930..96e8cf1 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@modelcontextprotocol/client": "^2.0.0", "@modelcontextprotocol/server": "^2.0.0", "@salesforce/core": "^8.32.3", - "@toon-format/toon": "^2.3.0", + "@toon-format/toon": "^4.1.1", "zod": "^4.4.3" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f4c25e6..212f201 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: ^8.32.3 version: 8.32.6 '@toon-format/toon': - specifier: ^2.3.0 - version: 2.3.0 + specifier: ^4.1.1 + version: 4.1.1 zod: specifier: ^4.4.3 version: 4.4.3 @@ -637,8 +637,8 @@ packages: '@swc/types@0.1.28': resolution: {integrity: sha512-V6Mnml8v09QALx6K0elJ7o9K/MkVDtW3t6L+7Ou/JcWtb3xwId2AH4FeOceySd2JaO87IMw4+6vSZxLm34LPbw==} - '@toon-format/toon@2.3.0': - resolution: {integrity: sha512-/Ew9etdRQKVMnm9fDaCG0JjyAOK/O7T0M97oum1aW4W+UR8ZhVVPBanIV7oWgHBiGlnVxV9M55PWQCHofDV07w==} + '@toon-format/toon@4.1.1': + resolution: {integrity: sha512-SGCkS7IjVpwRmGPgnY8ENKpAf0EdAnZDOQkvFW0d2cgOpdn9FEFl7sTgryESyypXrWr0YajHGpwsAUX4zw9ZvA==} '@tsconfig/node10@1.0.12': resolution: {integrity: sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==} @@ -3285,7 +3285,7 @@ snapshots: dependencies: '@swc/counter': 0.1.3 - '@toon-format/toon@2.3.0': {} + '@toon-format/toon@4.1.1': {} '@tsconfig/node10@1.0.12': optional: true