fix(sdk): replace removed triggerVoid with trigger + TriggerAction.Void#773
Conversation
iii-sdk 0.11.2 removed sdk.triggerVoid in favor of
sdk.trigger({ function_id, payload, action: TriggerAction.Void() }).
Nine call sites were still using the removed API:
src/triggers/api.ts 1 site (try/catch wrapped)
src/triggers/events.ts 2 sites (try/catch wrapped)
src/functions/observe.ts 3 sites
src/functions/image-quota-cleanup.ts 1 site
src/functions/image-refs.ts 1 site
src/functions/disk-size-manager.ts 1 site
Six of the nine ran without try/catch and threw TypeError on every
call, breaking image lifecycle, disk-quota cleanup, vision embeddings,
and observation write paths.
Tests updated to spy on sdk.trigger with TriggerAction.Void payloads
instead of the removed triggerVoid spy.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR updates the agentmemory codebase to be compatible with iii-sdk v0.11.2, which removed the ChangesTrigger API Migration to iii-sdk v0.11.2
🎯 2 (Simple) | ⏱️ ~12 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bump to 0.9.25 across 9 files + CHANGELOG. Closes #778 #775 #783 (PR #791), #758 #726 (PR #773), #759 (PR #772), #752 (PR #774), #729 (PR #780), #781 (PR #782), #753 (PR #789), #771 (PR #786), #762 (PR #764). Files bumped: - package.json - packages/mcp/package.json - plugin/.claude-plugin/plugin.json - plugin/.codex-plugin/plugin.json - plugin/plugin.json - src/version.ts - src/types.ts (ExportData.version union) - src/functions/export-import.ts (supportedVersions Set) - test/export-import.test.ts (assertion) 125 test files / 1379 tests pass. npm audit (root + website): 0 vulns.
Problem
Reported in #758. iii-sdk 0.11.2 (the pinned version) removed
sdk.triggerVoidin favor ofsdk.trigger({ function_id, payload, action: TriggerAction.Void() }). Nine call sites in agentmemory still used the removed API, producing:Three sites were wrapped in try/catch and logged warnings. The other six threw
TypeErrorand broke their pipelines (image write, disk-quota cleanup, vision embeddings, session-stopped fan-out).Sites fixed
src/triggers/api.tssrc/triggers/events.tssrc/functions/observe.tssrc/functions/image-quota-cleanup.tssrc/functions/image-refs.tssrc/functions/disk-size-manager.tsEach
sdk.triggerVoid(name, payload)is replaced with:Added
TriggerActionto the iii-sdk import in files that didn't already use it.Tests
Tests that spied on
triggerVoidupdated to spy ontriggerand filter calls byfunction_idandTriggerAction.Void()shape.Full suite passes: 120 files / 1292 tests.
Pin
iii-sdk pin stays at 0.11.2 per current engine compatibility constraints. The migration is forward-compatible with later iii-sdk releases.
Closes #758.
Summary by CodeRabbit
Refactor
Tests