Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Update types to @ag-ui/core 1.0

Open
#1,460 0 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
70/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
nodejs, typescript

Research direction

Start by updating the dependency in packages/ai/package.json and running pnpm install. Then, examine packages/ai/src/types.ts to see how AG-UI event types are imported and extended. Add the three new subagent event types to the AGUIEvent union and update EventType in src/client.ts. Update spec-event-keys.ts to include the new keys. Run pnpm test:types and pnpm test:build to verify changes, and add a unit test for toWireChunk as described. Finally, create a changeset for @tanstack/ai.

Written by the indexing model from the issue text.

Description

has-pr waiting-on: maintainer

Task

Bump @ag-ui/core in packages/ai from 0.1.1-canary.beta.0 to 1.0.0 and source the AG-UI event types from the package instead of hand-written copies.

Why

  • packages/ai/src/types.ts already imports every AG-UI event type from @ag-ui/core and declares the local events with extends. The three subagent events in PR #1438 are the exception because the pinned canary predates them.
  • @ag-ui/core@1.0.0 (published 2026-09-17) ships SubagentStartedEvent, SubagentFinishedEvent, SubagentErrorEvent, SubagentInfo, SubagentRunId, the Attributable (subagentRunId) mixin, and SUBAGENT_* members on EventType.
  • The Zod reason for avoiding the package is gone: 1.0.0 has no dependencies, zod is an optional peer at ^3.25.18 || ^4.0.0, and the main entry does not import zod. Only the /schemas subpath does, and we do not use it. This is the layout PR #1038 adopted via the canary.
  • Renovate will not offer this bump because the pin is a prerelease.

Scope

  1. Bump the pin in packages/ai/package.json and regenerate pnpm-lock.yaml.
  2. Fix any type errors from event shapes that changed between the canary and 1.0.0. Keep the repo's own event interfaces as extends of the imported ones, with the same optionality as the spec (never stricter).
  3. Add SubagentStartedEvent, SubagentFinishedEvent, SubagentErrorEvent to the AGUIEvent union in packages/ai/src/types.ts as extends of the package types, and add the SUBAGENT_* entries to the EventType re-export in packages/ai/src/client.ts.
  4. Add the three event types and their spec keys (subagentRunId, name, description, parentSubagentRunId, parentToolCallId, parentMessageId, result, outcome, message, code) to packages/ai/src/utilities/spec-event-keys.ts, and subagentRunId to every attributable event, so toWireChunk does not move them into metadata.tanstack.
  5. Changeset for @tanstack/ai (patch or minor, your call; the public StreamChunk union gains three members).
  6. pnpm test:pr green.

Out of scope: the subagent runtime (spawn, router, processor, client handles). That stays in #1438, which should rebase onto this once merged and delete its duplicate interfaces in spawn.ts and types.ts.

Verification

  • pnpm test:types and pnpm test:build pass.
  • A unit test pushes a SUBAGENT_STARTED event and an attributed TEXT_MESSAGE_CONTENT through toWireChunk and asserts the fields stay top-level.
  • Confirm pnpm why zod shows no new zod path from packages/ai.

Related: #520 (Zod 3 conflict, resolved by #1038 and can be closed), #1438 (subagents).

Dominant language
TypeScript
Stars
3.1k
Forks
331
Avg merge
1d 10h
Merged PRs (30d)
130

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TanStack/ai

All issues in TanStack/ai

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.