supermemory/packages
Agnik47 b89ed824a6 fix(tools): accept zero-argument OpenAI tool calls and reject non-object args
`getProfile`, `documentList` and `memoryForget` all declare `required: []`,
so a model may legitimately call them with no arguments at all. The OpenAI
API serialises that as `arguments: ""`, and `parseToolArguments` handed the
empty string straight to `JSON.parse`, so every no-argument call came back as

    {"success":false,"error":"Invalid JSON arguments for getProfile"}

Those three tools were unreachable in their documented no-argument form.

The same gate also lets non-object JSON through. `"null"` parses cleanly and
then rejects in the destructuring parameter of every tool function --
`TypeError: Cannot destructure property 'containerTag' of 'object null'` --
which escapes `executeToolCall`, since it has no catch, and fails the whole
request. That is precisely the throw #1488 added this gate to contain. `"5"`
and `"\"text\""` are quieter but worse: they destructure to `undefined` and
call the API with no container tag at all.

Treat blank arguments as `{}`, and require the parsed value to be a non-null,
non-array object. Malformed JSON still returns the tool error #1488 added.

Adds eight regression tests. Six of them fail against the current
implementation -- two on the blank-argument path and four on the non-object
path, one carrying the raw TypeError. The two guard tests, malformed JSON and
an ordinary well-formed call, pass both before and after, so the behaviour
2026-10-02 18:35:07 -07:00
..
agent-framework-python feat(python-sdks): SDK-level cross-source memory deduplication (#1532) 2026-09-01 06:10:36 +00:00
ai-sdk fix(auth): upgrade Better Auth to patched 1.7.6 (#1719) 2026-10-02 17:05:13 -07:00
cartesia-sdk-python feat(python-sdks): SDK-level cross-source memory deduplication (#1532) 2026-09-01 06:10:36 +00:00
docs-test docs: restructure documentation site and update integration UI (#1331) 2026-07-21 20:19:30 -07:00
hooks fix: add type checks for TypeScript workspaces (#1447) 2026-08-13 17:55:50 +05:30
lib fix(auth): upgrade Better Auth to patched 1.7.6 (#1719) 2026-10-02 17:05:13 -07:00
livekit-sdk-python feat(livekit): add persistent memory for LiveKit Agents (#1702) 2026-10-01 15:26:35 -07:00
memory-graph fix(auth): upgrade Better Auth to patched 1.7.6 (#1719) 2026-10-02 17:05:13 -07:00
openai-sdk-python fix(python-sdk): patch vulnerable async and tooling dependencies (#1720) 2026-09-29 15:26:59 -07:00
pipecat-sdk-python feat(python-sdks): SDK-level cross-source memory deduplication (#1532) 2026-09-01 06:10:36 +00:00
tools fix(tools): accept zero-argument OpenAI tool calls and reject non-object args 2026-10-02 18:35:07 -07:00
ui fix(ui): remove the unused, broken AnonymousAuth component (#1555) 2026-08-19 19:22:17 +05:30
validation fix(mcp): bound tool inputs and scope get_document to the active space (#1593) 2026-08-24 21:36:04 +00:00