Skip to content

chore: version packages - #64

Merged
presmihaylov merged 1 commit into
mainfrom
changeset-release/main
Sep 7, 2026
Merged

chore: version packages#64
presmihaylov merged 1 commit into
mainfrom
changeset-release/main

Conversation

@gh-workflow-token-generator

@gh-workflow-token-generator gh-workflow-token-generator Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@team-plain/webhooks@1.9.0

Minor Changes

  • 1f854d5: Update the webhook schema to 2026-09-02. Adds workspaceFiles to the message on discussion.message_created, so a handler can see the files a custom agent attached to the message it just sent.

    Each entry carries id, fileName, fileExtension, fileMimeType and fileSizeBytes, all required on an entry. The array itself is optional and the parser does not fill it in. The schema declares default: [], but parsePlainWebhook builds Ajv without useDefaults, so an absent array stays absent and the generated type is workspaceFiles?. Read it as message.workspaceFiles ?? [].

    The package bundles one schema version at a time, so this release only parses payloads whose webhookMetadata.webhookTargetVersion is the version below. Move your webhook target forward when you upgrade, or parsePlainWebhook returns PlainWebhookVersionMismatchError.

  • 1f854d5: Update the webhook schema to 2026-09-06, which carries the custom-agent tool call approval flow. Two new events, and one new field on the discussion that every discussion event already reports. Nothing was removed.

    discussion.tool_call_approval_requested fires when an agent asks a human to gate a tool call: approvalId, toolCallId, justification, requestedAt, requestedBy, plus the discussion. discussion.tool_call_approval_resolved fires on the decision and adds status, resolvedAt, resolvedBy and reviewerNote. status is APPROVED, DENIED or the forward-compatible UNKNOWN_APPROVAL_STATUS. reviewerNote is required but nullable, so the key is always present and is null when the reviewer left no note; do not test for its absence. Their types are exported as DiscussionToolCallApprovalRequestedPublicEventPayload and DiscussionToolCallApprovalResolvedPublicEventPayload.

    The field worth reading carefully is discussion.agentStatus, because all four discussion events carry it, not only the new two. It is UNKNOWN, IDLE, IN_PROGRESS, TOOL_CALL_APPROVAL_PENDING or UNKNOWN_DISCUSSION_AGENT_STATUS. It is optional and the parser does not fill it in: the schema declares default: "UNKNOWN", but Ajv is built without useDefaults, so treat an absent value as UNKNOWN yourself rather than expecting the string.

    On the resolved event agentStatus reports the status after the decision settled, so an approved call reads IN_PROGRESS and not the pending state that the decision just cleared.

    The package bundles one schema version at a time, so this release only parses payloads whose webhookMetadata.webhookTargetVersion is 2026-09-06. Move your webhook target to 2026-09-06 when you upgrade, or parsePlainWebhook returns PlainWebhookVersionMismatchError.


Note

Low Risk
Release-only metadata (version, changelog, changeset cleanup); no code changes in the diff.

Overview
Automated Changesets release that publishes @team-plain/webhooks 1.9.0: bumps package.json, folds two consumed changesets into CHANGELOG.md, and deletes the .changeset entries. No runtime or schema files change in this diff.

What 1.9.0 documents for integrators (already implemented on main): webhook target 2026-09-06 with optional message.workspaceFiles on discussion.message_created (use message.workspaceFiles ?? [] because Ajv does not apply defaults), plus discussion.tool_call_approval_requested / discussion.tool_call_approval_resolved and optional discussion.agentStatus on discussion events (treat missing agentStatus as UNKNOWN). Upgrading the package without moving the Plain webhook target forward yields PlainWebhookVersionMismatchError.

Reviewed by Cursor Bugbot for commit 5d31dfa. Bugbot is set up for automated code reviews on this repo. Configure here.

@presmihaylov
presmihaylov merged commit e202f82 into main Sep 7, 2026
4 checks passed
@presmihaylov
presmihaylov deleted the changeset-release/main branch September 7, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant