Skip to content

fix(agent): handle nullable JSON Schema type unions in skeletons - #748

Open
kutluhaneth46 wants to merge 1 commit into
sapiom:mainfrom
kutluhaneth46:fix/introspection-nullable-type-union-614
Open

fix(agent): handle nullable JSON Schema type unions in skeletons#748
kutluhaneth46 wants to merge 1 commit into
sapiom:mainfrom
kutluhaneth46:fix/introspection-nullable-type-union-614

Conversation

@kutluhaneth46

Copy link
Copy Markdown

Summary

  • skeletonFromJsonSchema now normalizes JSON Schema type arrays (e.g. ["string", "null"] from Zod .nullable()) before choosing a placeholder value.
  • Fixes workflow input prefills showing null instead of type-appropriate placeholders for nullable fields.
  • Adds introspection.spec.ts regression coverage (7 cases).

Closes #614.

Test plan

  • pnpm test in packages/agent (143/143 pass, including new introspection.spec.ts)
  • pnpm lint in packages/agent
  • CI test + examples workflows

@github-actions github-actions Bot added contribution: incomplete Required pull request information is incomplete or ambiguous contributor: external Pull request author does not have write, maintain, or admin access to sapiom-js needs-triage Awaiting maintainer review and classification review: manual External pull request requires maintainer review before automation size: small Review size is at most 100 changed lines area: agents Changes to agent authoring, core, or runtime labels Aug 31, 2026
Normalize array-form type before building workflow input skeletons. Adds regression tests. Fixes sapiom#614.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kutluhaneth46
kutluhaneth46 force-pushed the fix/introspection-nullable-type-union-614 branch from 2faf1c8 to da7538e Compare August 31, 2026 22:05
@kutluhaneth46

Copy link
Copy Markdown
Author

Deployed a small agent that tracks this PR (and other ecosystem contributions) with daily reports: https://app.sapiom.ai/agents/748 — source: https://github.com/kutluhaneth46/ecosystem-monitor-agent

No change needed for merge; just linking the downstream use case for nullable schema skeletons in workflow prefills.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: agents Changes to agent authoring, core, or runtime contribution: incomplete Required pull request information is incomplete or ambiguous contributor: external Pull request author does not have write, maintain, or admin access to sapiom-js needs-triage Awaiting maintainer review and classification review: manual External pull request requires maintainer review before automation size: small Review size is at most 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: agent: skeletonFromJsonSchema ignores array form type (nullable types always return null)

1 participant