Skip to content

[Agent Builder] Add attachment origin to Converse API#259043

Merged
machadoum merged 5 commits intoelastic:mainfrom
machadoum:ab-12887-attachment-add-origin-to-converse-api
Mar 31, 2026
Merged

[Agent Builder] Add attachment origin to Converse API#259043
machadoum merged 5 commits intoelastic:mainfrom
machadoum:ab-12887-attachment-add-origin-to-converse-api

Conversation

@machadoum
Copy link
Copy Markdown
Member

@machadoum machadoum commented Mar 23, 2026

Closes https://github.com/elastic/search-team/issues/13477

Summary

Agent Builder Converse (and related client surfaces) now accept attachments with optional data, optional origin, or both—so by-reference payloads match conversation APIs and are no longer rejected when the UI sends only origin.

Types: AttachInput and VersionedAttachmentInput are merged into a single attachment-input shape used consistently across HTTP, plugin APIs, and the browser.

Architecture

  • Contract: one versioned attachment input type end-to-end; each attachment must include at least one of data or origin.
  • Server: converse (and step) validation resolves origin when data is omitted, using request-scoped context where types implement resolve; validated payloads become full Attachment objects before execution and conversation merge.
  • Client: optimistic UI and display paths tolerate origin-only pending rows using stable keys.

Breaking changes: none—this extends accepted shapes.

How to test

Exercise Converse (sync/async) and in-product attachment flows with by-value, by-reference, and combined payloads; confirm errors when neither data nor origin is present.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Release notes

Converse accepts optional origin on attachments for by-reference flows; rejects attachments with neither data nor origin. Attachment input types are unified so HTTP and UI use the same shape.

@machadoum machadoum force-pushed the ab-12887-attachment-add-origin-to-converse-api branch from 5988cc9 to 8f93465 Compare March 23, 2026 10:29
@machadoum machadoum self-assigned this Mar 23, 2026
@machadoum machadoum changed the title [Agetn Builder ] Add attachment origin to converse api [Agent Builder] Add attachment origin to Converse API Mar 23, 2026
@machadoum machadoum added backport:skip This PR does not require backporting release_note:fix labels Mar 30, 2026
@machadoum machadoum force-pushed the ab-12887-attachment-add-origin-to-converse-api branch from 9170a03 to acb0b94 Compare March 30, 2026 08:32
* Unify AttachInput and VersionedAttachmentInput types
@machadoum machadoum force-pushed the ab-12887-attachment-add-origin-to-converse-api branch from acb0b94 to ad4aedd Compare March 30, 2026 11:30
@machadoum machadoum force-pushed the ab-12887-attachment-add-origin-to-converse-api branch from 1cd21ad to 8e351a9 Compare March 30, 2026 12:20
@machadoum machadoum marked this pull request as ready for review March 31, 2026 06:24
@machadoum machadoum requested review from a team as code owners March 31, 2026 06:24
@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

cc @machadoum

@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod bot requested a review from a team as a code owner March 31, 2026 07:07
@chrisbmar chrisbmar requested a review from ppisljar March 31, 2026 07:08
Copy link
Copy Markdown
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me. a few nits and one question (last comment)

Comment on lines +318 to +326
export const getContentKey = (input: AttachmentInput, fallback: string): string => {
if (input.data !== undefined) {
return `${input.type}:${hashContent(input.data)}`;
}
if (input.origin !== undefined) {
return `${input.type}:origin:${input.origin}`;
}
return `${input.type}:${fallback}`;
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hashContent is potentially resource intensive for large attachment contents. Wherever we use getContentKey in the ui, we should make sure that everything is properly memo-ed to avoid calling those on each render cycles (I didn't check all usages so probably it's a non issue but still wanted to mention it)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is only used in one place in the UI inside a onMutate action. So it shouldn't execute when a components re-renders. It is also not a new logic, I introduce the origin content key and extracted to a function because we also need it in the server side. Here is where it was previously called https://github.com/elastic/kibana/pull/259043/changes#diff-e7fef969144ffae71dcca4f5afb88766fd631aedf8e0dd5944d85c1b68fd5211L105-L106

Comment on lines +178 to +185
const resolveContext: AttachmentResolveContext | undefined =
context.savedObjectsClient !== undefined
? {
request: context.request,
spaceId: context.spaceId,
savedObjectsClient: context.savedObjectsClient,
}
: undefined;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope of the current PR, but AgentHandlerContext.savedObjectsClient being optional seems like a code smell, and I don't like it forcing that kind of conditional logic / optional parameters.

I think I gonna have to open a tech debt PR about that - https://github.com/elastic/search-team/issues/13625

Copy link
Copy Markdown
Member

@florent-leborgne florent-leborgne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for docs

Copy link
Copy Markdown
Contributor

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -17,31 +20,66 @@ export type ValidateAttachmentResult<Type extends string, Data> =
export const validateAttachment = async <Type extends string, Data>({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this does more than validate

github-actions bot pushed a commit that referenced this pull request Mar 31, 2026
Closes elastic/search-team#13477

## Summary

Agent Builder **Converse** (and related client surfaces) now accept
attachments with optional **`data`**, optional **`origin`**, or
**both**—so by-reference payloads match conversation APIs and are no
longer rejected when the UI sends only `origin`.

**Types:** **`AttachInput` and `VersionedAttachmentInput` are merged**
into a single attachment-input shape used consistently across HTTP,
plugin APIs, and the browser.

## Architecture

- **Contract:** one versioned attachment input type end-to-end; each
attachment must include **at least one** of `data` or `origin`.
- **Server:** converse (and step) validation resolves **`origin`** when
`data` is omitted, using request-scoped context where types implement
`resolve`; validated payloads become full **`Attachment`** objects
before execution and conversation merge.
- **Client:** optimistic UI and display paths tolerate **`origin`-only**
pending rows using stable keys.

**Breaking changes:** none—this extends accepted shapes.

### How to test

Exercise Converse (sync/async) and in-product attachment flows with
by-value, by-reference, and combined payloads; confirm errors when
neither `data` nor `origin` is present.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Release notes

Converse accepts optional **`origin`** on attachments for by-reference
flows; rejects attachments with neither **`data`** nor **`origin`**.
Attachment input types are unified so HTTP and UI use the same shape.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@machadoum machadoum merged commit 7cf2d86 into elastic:main Mar 31, 2026
19 checks passed
mbondyra added a commit to mbondyra/kibana that referenced this pull request Mar 31, 2026
…hanges

* commit 'd0e62a657916e84694a93983e513ce9e34e0b635': (27 commits)
  [Agent Builder] Agent overview page design updates (elastic#260468)
  [Inference UI] Add model detail flyout with endpoint management (elastic#260307)
  [Fleet] Update doc links in agent policy settings (elastic#260245)
  [Security Solution] show risk score in new flyout header (elastic#260187)
  Replace deprecated EUI icons in files owned by @elastic/kibana-security (elastic#255636)
  [Cases][Templates] Add DATE_PICKER field control type (elastic#260209)
  [SharedUX] Get spaces callout on each solution nav (elastic#259723)
  [SharedUX] Preserve feature visibility on solution change (elastic#259316)
  [CI] Increase investigations cypress disks to 110G (elastic#260423)
  [Agent Builder] Expose read-only conversations on plugin start contract (elastic#260435)
  [dasboards as code] drop panels with server errors (elastic#260073)
  [One Workflow] Add force-delete (hard delete) option for workflows (elastic#260391)
  [Agent Builder] Fix sidebar error handling error (elastic#260446)
  [Agent Builder] Add attachment origin to Converse API (elastic#259043)
  [Alerting v2] Fix rule results preview chart responsiveness (elastic#260444)
  [Streams] Processing error panel UI improvements (elastic#260028)
  fix flaky test: alert details error page timeout (elastic#260302)
  [Agent Builder] Add attachment origin to Converse API (elastic#259043)
  [One Workflow] Add more unit tests to workflows_extensions plugin (elastic#260384)
  [ResponseOps] Split alerting security_and_spaces group8 FTR config to fix CI timeout (elastic#260029)
  ...
jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Apr 1, 2026
Closes elastic/search-team#13477

## Summary

Agent Builder **Converse** (and related client surfaces) now accept
attachments with optional **`data`**, optional **`origin`**, or
**both**—so by-reference payloads match conversation APIs and are no
longer rejected when the UI sends only `origin`.

**Types:** **`AttachInput` and `VersionedAttachmentInput` are merged**
into a single attachment-input shape used consistently across HTTP,
plugin APIs, and the browser.

## Architecture

- **Contract:** one versioned attachment input type end-to-end; each
attachment must include **at least one** of `data` or `origin`.
- **Server:** converse (and step) validation resolves **`origin`** when
`data` is omitted, using request-scoped context where types implement
`resolve`; validated payloads become full **`Attachment`** objects
before execution and conversation merge.
- **Client:** optimistic UI and display paths tolerate **`origin`-only**
pending rows using stable keys.

**Breaking changes:** none—this extends accepted shapes.

### How to test

Exercise Converse (sync/async) and in-product attachment flows with
by-value, by-reference, and combined payloads; confirm errors when
neither `data` nor `origin` is present.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Release notes

Converse accepts optional **`origin`** on attachments for by-reference
flows; rejects attachments with neither **`data`** nor **`origin`**.
Attachment input types are unified so HTTP and UI use the same shape.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Apr 1, 2026
Closes elastic/search-team#13477

## Summary

Agent Builder **Converse** (and related client surfaces) now accept
attachments with optional **`data`**, optional **`origin`**, or
**both**—so by-reference payloads match conversation APIs and are no
longer rejected when the UI sends only `origin`.

**Types:** **`AttachInput` and `VersionedAttachmentInput` are merged**
into a single attachment-input shape used consistently across HTTP,
plugin APIs, and the browser.

## Architecture

- **Contract:** one versioned attachment input type end-to-end; each
attachment must include **at least one** of `data` or `origin`.
- **Server:** converse (and step) validation resolves **`origin`** when
`data` is omitted, using request-scoped context where types implement
`resolve`; validated payloads become full **`Attachment`** objects
before execution and conversation merge.
- **Client:** optimistic UI and display paths tolerate **`origin`-only**
pending rows using stable keys.

**Breaking changes:** none—this extends accepted shapes.

### How to test

Exercise Converse (sync/async) and in-product attachment flows with
by-value, by-reference, and combined payloads; confirm errors when
neither `data` nor `origin` is present.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Release notes

Converse accepts optional **`origin`** on attachments for by-reference
flows; rejects attachments with neither **`data`** nor **`origin`**.
Attachment input types are unified so HTTP and UI use the same shape.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Apr 1, 2026
Closes elastic/search-team#13477

## Summary

Agent Builder **Converse** (and related client surfaces) now accept
attachments with optional **`data`**, optional **`origin`**, or
**both**—so by-reference payloads match conversation APIs and are no
longer rejected when the UI sends only `origin`.

**Types:** **`AttachInput` and `VersionedAttachmentInput` are merged**
into a single attachment-input shape used consistently across HTTP,
plugin APIs, and the browser.

## Architecture

- **Contract:** one versioned attachment input type end-to-end; each
attachment must include **at least one** of `data` or `origin`.
- **Server:** converse (and step) validation resolves **`origin`** when
`data` is omitted, using request-scoped context where types implement
`resolve`; validated payloads become full **`Attachment`** objects
before execution and conversation merge.
- **Client:** optimistic UI and display paths tolerate **`origin`-only**
pending rows using stable keys.

**Breaking changes:** none—this extends accepted shapes.

### How to test

Exercise Converse (sync/async) and in-product attachment flows with
by-value, by-reference, and combined payloads; confirm errors when
neither `data` nor `origin` is present.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Release notes

Converse accepts optional **`origin`** on attachments for by-reference
flows; rejects attachments with neither **`data`** nor **`origin`**.
Attachment input types are unified so HTTP and UI use the same shape.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Apr 2, 2026
Closes elastic/search-team#13477

## Summary

Agent Builder **Converse** (and related client surfaces) now accept
attachments with optional **`data`**, optional **`origin`**, or
**both**—so by-reference payloads match conversation APIs and are no
longer rejected when the UI sends only `origin`.

**Types:** **`AttachInput` and `VersionedAttachmentInput` are merged**
into a single attachment-input shape used consistently across HTTP,
plugin APIs, and the browser.

## Architecture

- **Contract:** one versioned attachment input type end-to-end; each
attachment must include **at least one** of `data` or `origin`.
- **Server:** converse (and step) validation resolves **`origin`** when
`data` is omitted, using request-scoped context where types implement
`resolve`; validated payloads become full **`Attachment`** objects
before execution and conversation merge.
- **Client:** optimistic UI and display paths tolerate **`origin`-only**
pending rows using stable keys.

**Breaking changes:** none—this extends accepted shapes.

### How to test

Exercise Converse (sync/async) and in-product attachment flows with
by-value, by-reference, and combined payloads; confirm errors when
neither `data` nor `origin` is present.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Release notes

Converse accepts optional **`origin`** on attachments for by-reference
flows; rejects attachments with neither **`data`** nor **`origin`**.
Attachment input types are unified so HTTP and UI use the same shape.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Apr 2, 2026
Closes elastic/search-team#13477

## Summary

Agent Builder **Converse** (and related client surfaces) now accept
attachments with optional **`data`**, optional **`origin`**, or
**both**—so by-reference payloads match conversation APIs and are no
longer rejected when the UI sends only `origin`.

**Types:** **`AttachInput` and `VersionedAttachmentInput` are merged**
into a single attachment-input shape used consistently across HTTP,
plugin APIs, and the browser.

## Architecture

- **Contract:** one versioned attachment input type end-to-end; each
attachment must include **at least one** of `data` or `origin`.
- **Server:** converse (and step) validation resolves **`origin`** when
`data` is omitted, using request-scoped context where types implement
`resolve`; validated payloads become full **`Attachment`** objects
before execution and conversation merge.
- **Client:** optimistic UI and display paths tolerate **`origin`-only**
pending rows using stable keys.

**Breaking changes:** none—this extends accepted shapes.

### How to test

Exercise Converse (sync/async) and in-product attachment flows with
by-value, by-reference, and combined payloads; confirm errors when
neither `data` nor `origin` is present.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Release notes

Converse accepts optional **`origin`** on attachments for by-reference
flows; rejects attachments with neither **`data`** nor **`origin`**.
Attachment input types are unified so HTTP and UI use the same shape.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:fix v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants