What's Fixed
node dist/index.mjs crashed on startup after the iii-sdk v0.11 migration (#116) merged:
SyntaxError: The requested module 'iii-sdk' does not provide an export named 'getContext'
iii-sdk v0.11 dropped getContext() entirely. 32 src/functions/*.ts files still imported and called it. The bug was invisible to CI (tests mock iii-sdk) and build (tsdown doesn't type-check).
Changes
src/logger.ts— new thin stderr shim with.info/.warn/.errorreplacinggetContext().logger. Output goes to stderr as[agentmemory] <level> <msg>, forwarded intodocker logsby iii-exec.- 32
src/functions/*.tsfiles — removedgetContextimports, deletedconst ctx = getContext()lines, replacedctx.logger.*withlogger.* src/functions/search.ts— also fixedregisterFunction({ id: '...' })→registerFunction('...')for v0.11 string-ID API- 45 test files — updated
vi.mock("iii-sdk")logger mocks tovi.mock("../src/logger.js")
Verification
node dist/index.mjs— starts cleanly, logs all startup linesnpm test— 731/731 pass