From 5d31dfa9943f406538e1354b5a92a3118471e049 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 06:48:41 +0000 Subject: [PATCH] chore: version packages --- .../webhooks-2026-09-02-workspace-files.md | 9 --------- ...webhooks-2026-09-06-tool-call-approvals.md | 13 ------------ packages/webhooks/CHANGELOG.md | 20 +++++++++++++++++++ packages/webhooks/package.json | 2 +- 4 files changed, 21 insertions(+), 23 deletions(-) delete mode 100644 .changeset/webhooks-2026-09-02-workspace-files.md delete mode 100644 .changeset/webhooks-2026-09-06-tool-call-approvals.md diff --git a/.changeset/webhooks-2026-09-02-workspace-files.md b/.changeset/webhooks-2026-09-02-workspace-files.md deleted file mode 100644 index b1f124b..0000000 --- a/.changeset/webhooks-2026-09-02-workspace-files.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@team-plain/webhooks": minor ---- - -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`. diff --git a/.changeset/webhooks-2026-09-06-tool-call-approvals.md b/.changeset/webhooks-2026-09-06-tool-call-approvals.md deleted file mode 100644 index 968dd5c..0000000 --- a/.changeset/webhooks-2026-09-06-tool-call-approvals.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@team-plain/webhooks": minor ---- - -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`. diff --git a/packages/webhooks/CHANGELOG.md b/packages/webhooks/CHANGELOG.md index 5016a52..8baeb9d 100644 --- a/packages/webhooks/CHANGELOG.md +++ b/packages/webhooks/CHANGELOG.md @@ -1,5 +1,25 @@ # @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`. + ## 1.8.0 ### Minor Changes diff --git a/packages/webhooks/package.json b/packages/webhooks/package.json index ecfa7e3..c2a0bda 100644 --- a/packages/webhooks/package.json +++ b/packages/webhooks/package.json @@ -1,6 +1,6 @@ { "name": "@team-plain/webhooks", - "version": "1.8.0", + "version": "1.9.0", "description": "Webhook parsing and signature verification for Plain webhooks", "license": "MIT", "author": "Plain (https://plain.com)",