Extract SchemaStream v4 into dedicated repository#13
Conversation
This reverts commit 7a45aca63e0488aa290f7fa22a1054d945c0c19e.
Releases: schema-stream@2.1.0 [skip ci]
…aking sure we just send back the default value right away if available
Releases: schema-stream@3.0.0 zod-stream@0.0.8 island-next-demos@1.0.11 stream-hooks@0.0.4 [skip ci]
…rotecting against thecae where we have complete json but stream is still going for whtever reason - in this case ts becaUSE WE RETURN FULL OBJECTS FROM THE XML PARSING BUT COULD ALSO BE A CASE WHERE WE PARSE JSON AND HAVE ADDT CONTENT STREAM
Releases: schema-stream@3.1.0 llm-polyglot@0.0.1 [skip ci]
Releases: evalz@0.2.0 stream-hooks@2.0.0 llm-polyglot@2.1.0 schema-stream@3.2.0 zod-stream@2.0.0 island-next-demos@1.0.17 [skip ci]
Releases: llm-polyglot@2.3.0 evalz@0.2.1 schema-stream@3.2.1 zod-stream@2.0.1 island-next-demos@1.0.18 [skip ci]
Releases: schema-stream@3.2.2 llm-polyglot@2.3.1 zod-stream@2.0.2 evalz@0.2.2 stream-hooks@2.0.2 [skip ci]
Releases: llm-polyglot@3.0.0 evalz@1.0.0 schema-stream@4.0.0 zod-stream@4.0.0 stream-hooks@4.0.0 [skip ci]
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c39f17d45
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba4e8d5dbb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Add opt-in snapshot policies
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6592a0dbe4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (alreadyPresent) { | ||
| return false | ||
| } |
There was a problem hiding this comment.
Record empty-container completions even when stub matches
When the JSON completes an empty array/object at a path whose schema stub is already [] or {} (for example z.object({ items: z.array(z.string()) }) receiving {"items":[]}), this early return skips recordCompletedPath() and emitCompletion(). The final snapshot still looks correct, but consumers relying on onKeyComplete.completedPaths never learn that items actually completed; the current guard is fresh evidence separate from the earlier missing-container data-loss issue because it only drops the completion event when the parsed empty value equals the placeholder.
Useful? React with 👍 / 👎.
Summary
Make this repository the canonical home of
schema-streamafterschema-stream@4.0.0shipped fromisland-ai, then carry the reviewed opt-in snapshot-policy work on top of that published v4 baseline.
public-packages/schemaStreamhistory at the published v4.0.0 tagiterate()API, and OpenAI Agents SDK/ Vercel AI SDK compatibility fixtures to a focused root package
chunk, completed-value, byte-threshold, andfinalsnapshot policies while keepingper-input-chunk emission as the unchanged default
empty-source behavior, and nested empty objects/arrays
tooling
hack-dance/schema-streamlarge-payload benchmarks, packed consumer checks, and workflow-security regressions
read-only publish repository access, and non-persisted checkout credentials where safe
This is intentionally a two-parent extraction merge. Parent one is the existing
schema-streamv2history; parent two is a subtree-filtered history ending at island-ai's published
schema-stream@4.0.0tag. Unrelated island-ai packages are not included.Release sequencing
schema-stream@4.0.0is already published from island-ai. The package remains at4.0.0in thisbranch. The repository-migration patch changeset and additive snapshot-policy minor changeset combine
into the next minor release. Merging this PR does not publish immediately: the
mainpush opens orupdates the Changesets release PR, and npm publication occurs only after that exact same-repository
changeset-release/mainPR is separately reviewed and merged.Security and performance review
The extraction and follow-up review found and fixed the following before merging to
main:__proto__paths could traverse into and mutateObject.prototype; dynamicpaths now use own-property traversal and safe property definition, with regression coverage
quadratic path while preserving progressive semantics
content is rejected
emits without a completed JSON value
empty containers now update snapshots safely without changing existing value-policy emission counts
a reviewed full commit SHA and the publish job now uses least-privilege repository access
The production dependency audit reports zero vulnerabilities. GitHub's current Dependabot warning
refers to the old default-branch monorepo/docs dependency graph that this PR removes.
Validation
bun x ultracite doctor— 4 passed, 0 warnings, 0 failedbun run lint— 28 files checked, zero diagnosticsbun run check— Ultracite, TypeScript 7, 44 tests / 389 assertions, build, and packed consumersbun run test:coverage— all source 90.53% line coverage; streaming parser 96.34%bun run test:packed— Node ESM/CommonJS, Zod 4/Mini, Zod 3, TypeScript 5.9 declarations,OpenAI Agents SDK, and Vercel AI SDK
bun run benchmark:snapshots 1— deterministic 1.25 MB policy matrix with correct snapshot countsbun audit --production --audit-level=high— no vulnerabilitiesbun run changeset status— nextschema-streamminor release recognizedFollow-ups outside this PR
public-packages/schemaStreamin a separate island-ai branch usingdocs/island-ai-follow-up.mdNPM_TOKENwith OIDCPUBLISHenvironmentmain