[GH-ISSUE #1726] fix(slurp2): 0.4.2 still fails to start on zod 4 Engines (ZodEffects instanceof) #1694

Closed
opened 2026-10-27 06:05:48 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Gunterlie on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1726

Originally assigned to: @Gunterlie on GitHub.

Problem

Slurp2 0.4.2 still fails to activate on current Engine builds (zod ^4.6.7, Engine commit 0dddb04dc). Reported on Discord:

TypeError: Right-hand side of 'instanceof' is not an object
    at .../capability-runtime-snapshots/slurp2-0.4.2-…/server.mjs:378:1013
Failed to activate capability package slurp2@0.4.2

Cause

#1721 fixed the settings path, but two module-level checks still use x instanceof z.ZodEffects. Zod 4 has no ZodEffects, so instanceof undefined throws while the module loads:

  • packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-feed-post-routes.ts:52
  • packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-feed-publishing-routes.ts:44

Fix

Extend the plain object schemas directly (slpCreatorPostCreateWithMediaSchema is already a plain object; split the refined generation schema into an exported object + refinement). Works on zod 3 and zod 4. Ship as 0.4.3.

Originally created by @Gunterlie on GitHub (Oct 26, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1726 Originally assigned to: @Gunterlie on GitHub. ## Problem Slurp2 0.4.2 still fails to activate on current Engine builds (`zod ^4.6.7`, Engine commit `0dddb04dc`). Reported on Discord: ``` TypeError: Right-hand side of 'instanceof' is not an object at .../capability-runtime-snapshots/slurp2-0.4.2-…/server.mjs:378:1013 Failed to activate capability package slurp2@0.4.2 ``` ## Cause #1721 fixed the settings path, but two module-level checks still use `x instanceof z.ZodEffects`. Zod 4 has no `ZodEffects`, so `instanceof undefined` throws while the module loads: - `packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-feed-post-routes.ts:52` - `packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-feed-publishing-routes.ts:44` ## Fix Extend the plain object schemas directly (`slpCreatorPostCreateWithMediaSchema` is already a plain object; split the refined generation schema into an exported object + refinement). Works on zod 3 and zod 4. Ship as 0.4.3.
bsakaguchi 2026-10-27 06:05:48 +07:00
Author
Owner

@Gunterlie commented on GitHub (Oct 26, 2026):

Fixed in #1727 (Slurp2 0.4.3), merged as f1ad76c01.

<!-- gh-comment-id:6418109435 --> @Gunterlie commented on GitHub (Oct 26, 2026): Fixed in #1727 (Slurp2 0.4.3), merged as f1ad76c01.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1694
No description provided.