Commit graph

85706 commits

Author SHA1 Message Date
Søren Louv-Jansen
624410524f
[Obs AI Assistant] Replace Task Manager usage with Lock Manager (#216916)
This PR replaces usage of the Kibana Task Manager with the [LockManager
utility](https://github.com/elastic/kibana/pull/216397) that ensures
strict mutual exclusion when running operations such as re-indexing or
data migrations.

---------

Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-08 10:13:00 +02:00
Alex Szabo
08c5f0799d
[ci] Minor quick-checks updates (#215856)
## Summary
1 - `node scripts/prettier_topology_check` occasionally breaks with
`.gitignore` not being available, it's required for a globby call.
(https://buildkite.com/elastic/kibana-on-merge/builds/64944#0195c874-c2b0-436c-9752-91a6118dde9d)

2 - some scripts are run together by `yarn kbn run-in-packages` - this
script only logs AFTER a script finished successfully; when a script
like this fails, the failing script is not logged. This change logs
before to see what the error is. (ref:
https://elastic.slack.com/archives/C5UDAFZQU/p1742824259264329)
2025-04-08 09:26:14 +02:00
Alex Prozorov
854bfc4964
[Cloud Security ] 12165 update UI handling of multiple CVEs and package fields (#216411)
## Summary

This PR updates the rendering of multi value fields - vulnerability.id,
package.name, package.version and package.fixed_version in the
vulnerabilities data-grid page and alerts insights vulnerabilities tab
data grid.
It also updates the rendering of package.* fields in the vulnerabilities
flyout and both flyout and data grids are re using the same kbn package
component to display it.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Make CVSS column to be displayed first in the data grid.
- [x] if there is a single CVE display its value across the data grid.
- [x] data-grid if there is more than a single CVE show it as
<first_cve> <+x more> badge indicating the number of CVES left. Clicking
on the badge should open a Popver where all CVEs are displayed as badges
- clicking on the value will add it to the search bar filters, each
batch should have a copy icon as well.
- [x] insights tab data-grid should have similar logic to display multi
value fields but without adding it to the filters logic since there are
no filters in that page.
- [x] logic of displaying multiple CVEs should be applied to
package.name, package.version and package.fixed_version fields in both
data grids.
- [x] arrays in package-related vulnerability fields are rendered
correctly in the flyout header and footer.
- [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)
- [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
- [ ] [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)

### Screen recording


https://github.com/user-attachments/assets/208f8445-83c1-4e8f-a490-85ec48830fae

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-08 10:22:57 +03:00
Carlos Crespo
9cc220ac52
[Synthtrace] APM Otel v2 (#217019)
## Summary
This PR enhances support for otel data in Synthtrace. It introduces the
ability to generate otel-sdk data and transforms APM Server data into
otel format.

Key Changes
- Added a pipeline for processing otel traces.

- Add a pipeline to convert APM server traces into exported otel traces

- Removed `OtelSynthtraceEsClient` in favor of `ApmSynthtraceEsClient`.

### Examples

Reproduces the otlp traces -> APM Server/tracesexporter -> output case
```ts
 // this needs to be set in the synthtrace scenario's `bootstrap` to run the correct pipeline
apmEsClient.pipeline(apmEsClient.getPipeline('otelToApm'));

// scenario
apm.otelService({
    name: 'sendotlp-otel-native-synth',
    sdkName: 'otlp',
    sdkLanguage: 'nodejs',
  })
  .instance('otel-native-instance')
   // this interface doesn't provide a `transaction` function
  .span({
    name: transactionName,
    kind: 'Server',
  })
  .timestamp(timestamp)
  .duration(1000)
  .success()
  .children(
    instance
      .dbExitSpan({
        name: 'GET /',
        type: 'elasticsearch',
      })
      .duration(1000)
      .success()
      .timestamp(timestamp)
  )
```

APM Server -> otel output. This can be useful for reusing existing
synthtrace scenarios.

```ts
 // this needs to be set in the synthtrace scenario's `bootstrap` to run the correct pipeline
 apmEsClient.pipeline(apmEsClient.getPipeline('apmToOtel'));

 // scenario
 apm.service({
    name: 'apmserver-otel-synth',
    environment: 'prod',
    agentName: 'opentelemetry/java',
  })
  .instance('otel-apmserver-instance')
  .transaction({ transactionName })
  .timestamp(timestamp)
  .defaults({
    'url.domain': 'foo.bar',
  })
  .duration(1000)
  .success()
  .children(
    otelApmServerInstace
      .span({
        spanName: 'GET apm-*/_search',
        spanType: 'db',
        spanSubtype: 'elasticsearch',
      })
      .duration(1000)
      .success()
      .destination('elasticsearch')
      .timestamp(timestamp)
  )
```

### How to test


otel -> APM Server/tracesexporter -> output
Run `node scripts/synthtrace otel_simple_trace.ts --live --uniqueIds
--clean`


<img width="800" alt="image"
src="https://github.com/user-attachments/assets/e237e506-1c0d-4851-9053-0f1e2fe554db"
/>

APM Server -> otel 

Run `node scripts/synthtrace simple_trace.ts --scenarioOpts
pipeline=apmToOtel --live --uniqueIds --clean`

<img width="800" alt="image"
src="https://github.com/user-attachments/assets/1bd577be-ded6-44ad-a54d-c5bb4e5ad59d"
/>

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-08 09:16:19 +02:00
Kibana Machine
fd5b5eea84
[api-docs] 2025-04-08 Daily api_docs build (#217435)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/1036
2025-04-08 08:23:35 +02:00
Stratoula Kalafateli
400a91464d
[ES|QL] Makes the controls values clearable (#217132)
## Summary

Closes https://github.com/elastic/kibana/issues/217077

Adds a clear button in the values dropdowns

<img width="400" alt="image"
src="https://github.com/user-attachments/assets/79d3f615-9ce1-4caa-be65-99895bb35d49"
/>


<img width="373" alt="image"
src="https://github.com/user-attachments/assets/d4edab35-18a4-477c-afb3-a4b316db1a40"
/>
2025-04-08 07:47:43 +02:00
elastic-renovate-prod[bot]
1db06dc93c
Update dependency @launchdarkly/node-server-sdk to ^9.7.7 (main) (#216931)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[@launchdarkly/node-server-sdk](https://redirect.github.com/launchdarkly/js-core/tree/main/packages/sdk/server-node)
([source](https://redirect.github.com/launchdarkly/js-core)) |
dependencies | patch | [`^9.7.6` ->
`^9.7.7`](https://renovatebot.com/diffs/npm/@launchdarkly%2fnode-server-sdk/9.7.6/9.7.7)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNvcmUiLCJUZWFtOlNlY3VyaXR5IiwiYmFja3BvcnQ6cHJldi1taW5vciIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-04-08 03:02:06 +02:00
elastic-renovate-prod[bot]
ae433cd0a3
Update dependency @redocly/cli to ^1.34.1 (main) (#217267)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@redocly/cli](https://redirect.github.com/Redocly/redocly-cli) |
devDependencies | patch | [`^1.34.0` ->
`^1.34.1`](https://renovatebot.com/diffs/npm/@redocly%2fcli/1.34.0/1.34.1)
|
| [@redocly/cli](https://redirect.github.com/Redocly/redocly-cli) |
dependencies | patch | [`^1.34.0` ->
`^1.34.1`](https://renovatebot.com/diffs/npm/@redocly%2fcli/1.34.0/1.34.1)
|

---

### Release Notes

<details>
<summary>Redocly/redocly-cli (@&#8203;redocly/cli)</summary>

###
[`v1.34.1`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%401.34.1)

[Compare
Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/cli@1.34.0...@redocly/cli@1.34.1)

##### Patch Changes

-   Improved OpenTelemetry data serialization.
- Updated
[@&#8203;redocly/respect-core](https://redirect.github.com/redocly/respect-core)
to v1.34.1.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNvcmUiLCJiYWNrcG9ydDpwcmV2LW1pbm9yIiwicmVsZWFzZV9ub3RlOnNraXAiXX0=-->

---------

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-08 03:01:25 +02:00
Patryk Kopyciński
17440896f9
[Security Assistant] Don't cache MLClient (#217408)
## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.


### 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](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
- [ ] [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
- [ ] 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)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2025-04-08 01:25:45 +02:00
Alexi Doak
902bca98f1
[ResponseOps] ES|QL rules should generate a context.link that points to Discover (#216376)
Resolves https://github.com/elastic/kibana/issues/188856

## Summary

Currently ES query rule types link back to the alert details in the
`context.link` variable, except for the search source type. This PR
updates the rest of the ES query rule types to links to the relevant
docs in Discover.


### Checklist


- [ ] [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

### To verify
1. Set `server.publicBaseUrl` in kibana.yml
2. Create an ES|QL rule and include `context.link` in your action
message. Verify that when you go to the link it goes to Discover with
the correct query and timestamp
3. Create a DSL ES query rule and include `context.link` in your action
message. Verify that when you go to the link it goes to Discover and
works as expected
4. For your DSL rule also add some filters and verify that when you go
to Discover your filters are correctly applied.
2025-04-07 14:59:55 -07:00
Kibana Machine
9897f5dd60 skip failing test suite (#217399) 2025-04-07 23:09:03 +02:00
Ying Mao
3d54923123
[Response Ops][Reporting] Add health API to inform whether conditions are sufficient for scheduled reports (#216857)
Resolves https://github.com/elastic/kibana/issues/216319

## Summary

Adds an internal reporting health API to return whether conditions are
sufficient to support scheduled reports. For scheduled reporting, we
need for security and API keys to be enabled in Elasticsearch and for a
permanent encryption key to be set for the encrypted saved objects
plugin.

```
GET kbn:/internal/reporting/_health

Response 
{
  "has_permanent_encryption_key": true,
  "is_sufficiently_secure": true
}
```

The issue also mentions returning whether a preconfigured email service
is configured, but that will be done as part of the main scheduled
reporting task.

## To Verify

1. Run kibana and ES with no special flags, both flags should be `true`
2. Run ES with `-E xpack.security.enabled=false`.
`is_sufficiently_secure` should be set to `false`
3. Run ES With `-E xpack.security.authc.api_key.enabled=false`.
`is_sufficient_secure` should be set to `false`

Note that in dev mode, an encryption key is auto-set if not defined in
the Kibana yml so `has_permanent_encryption_key` will always return
`true` in dev mode.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-07 16:46:02 -04:00
elastic-renovate-prod[bot]
04a3d3308f
Update dependency @types/semver to ^7.7.0 (main) (#216932)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[@types/semver](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver)
([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver))
| devDependencies | minor | [`^7.5.8` ->
`^7.7.0`](https://renovatebot.com/diffs/npm/@types%2fsemver/7.5.8/7.7.0)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNvcmUiLCJiYWNrcG9ydDphbGwtb3BlbiIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
2025-04-07 22:36:17 +02:00
Alejandro Fernández Haro
1bd3385d5d
[ES 9.0] Remove body workaround (@elastic/kibana-security) (#217222)
## Summary

Follow up to https://github.com/elastic/kibana/pull/213375: The latest
version of the ES client fixed the issue
https://github.com/elastic/elasticsearch-js/issues/2584.

We should be able to remove all usages of `// @ts-expect-error
elasticsearch@9.0.0
https://github.com/elastic/elasticsearch-js/issues/2584`.


### Checklist

- [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
2025-04-07 22:34:25 +02:00
Krzysztof Kowalczyk
0d84936259
[SolutionSideNav] Add badge to all items except section header (#217301)
## Summary
This PR adds the ability add badge to all side nav items, except section
headers. Follow-up on https://github.com/elastic/kibana/pull/214854

![Screenshot 2025-04-07 at 12 24
29](https://github.com/user-attachments/assets/9ae2a610-1e56-4853-8214-ecb417bd4855)
2025-04-07 21:37:39 +02:00
Kibana Machine
9342cff262 skip failing test suite (#213821) 2025-04-07 21:30:10 +02:00
Tiago Costa
c02ec5eef5
skip flaky suite (#216815) 2025-04-07 20:14:23 +01:00
Tiago Costa
29ab72c961
skip flaky suite (#216735) 2025-04-07 20:13:16 +01:00
Tiago Costa
074b511fdc
skip flaky suite (#216219) 2025-04-07 20:11:20 +01:00
Kibana Machine
52b2708d79 skip failing test suite (#213990) 2025-04-07 21:08:12 +02:00
Kibana Machine
0a10dbfd20 skip failing test suite (#214191) 2025-04-07 21:07:44 +02:00
Alex Szabo
46c05bfcf8
skip failing suite (#216474) 2025-04-07 20:06:38 +01:00
Tiago Costa
9405305e50
skip flaky suite (#216393) 2025-04-07 20:03:27 +01:00
Tiago Costa
2191f3d075
skip flaky suite (#213821) 2025-04-07 19:59:55 +01:00
Brad White
dcb4242843
[FIPS][Build] Add Wolfi tag to FIPS image (#217247)
## Summary

Adjusts the Docker tag for the Wolfi FIPS image from `kibana-fips` to
`kibana-wolfi-fips` to avoid confusion in the future. The other products
use `<product>-fips` naming for released Cloud artifacts but our
artifact is `kibana-cloud-fips`.


### Considerations

This changeset could be further reaching, but unsure if it's necessary
and would like other opinions. If we want to change it now is the time
while adoption is low. For example, we're using `--skip-docker-fips` in
build scripts or GH label `ci:build-docker-fips`. We could align these
better, adding `wolfi` but don't think it is necessary.
2025-04-07 10:27:18 -07:00
Cristina Amico
ab6f7c6ca6
[Fleet] Create API to report status of integrations synchronization (#216178)
Closes https://github.com/elastic/kibana/issues/192363

## Summary
Add endpoint that compares integrations installed on remote cluster with
integrations in ccr index `fleet-synced-integrations-ccr-<outputId>`.
Feature flag: `enableSyncIntegrationsOnRemote`

- Use the [ccr info
api](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html)
to check that the ccr index is active
- Compare the content of the two indices and report the sync status for
each integration:

```
GET kbn:/api/fleet/remote_synced_integrations/status

{
  "integrations": [
    {
      "package_name": "akamai",
      "package_version": "2.28.0",
      "updated_at": "2025-03-27T10:29:52.485Z",
      "sync_status": true
    },
    {
      "package_name": "auth0",
      "package_version": "1.21.0",
      "updated_at": "2025-03-26T12:06:26.268Z",
      "sync_status": false,
      "error": "Installation status: not_installed" 
    },
]
```
- Check that the integrations have custom assets and report their sync
status (follow up of https://github.com/elastic/kibana/pull/215504)

### Testing 
Setup local env with the guide added in dev_docs
([preview](b438a719ee/x-pack/platform/plugins/shared/fleet/dev_docs/local_setup/remote_clusters_ccr.md))

- Install some integrations on local cluster, wait that they are synced
on remote
- From remote cluster dev tools, run

```
GET kbn:/api/fleet/remote_synced_integrations/status
```

- To verify that custom assets are synced choose an integration, for
instance `system`
- From the package policy select a var, advanced options and add a
custom mapping and a custom pipeline. In my example I used `system`
<img width="1195" alt="Screenshot 2025-04-01 at 11 18 40"
src="https://github.com/user-attachments/assets/c339d6f0-4404-4e9b-b489-7b37977f201b"
/>

- Run the endpoint again and you should see the status of custom assets
too:

```
{
  "integrations": [
    {
      "package_name": "akamai",
      "package_version": "2.28.0",
      "updated_at": "2025-03-27T10:29:52.485Z",
      "sync_status": "completed"
    },
    {
      "package_name": "elastic_agent",
      "package_version": "2.2.0",
      "updated_at": "2025-03-26T14:06:29.216Z",
      "sync_status": "completed"
    },
    {
      "package_name": "synthetics",
      "package_version": "1.4.1",
      "updated_at": "2025-03-26T14:06:31.909Z",
      "sync_status": "completed"
    },
    {
      "package_name": "system",
      "package_version": "1.67.3",
      "updated_at": "2025-03-28T10:08:00.602Z",
      "sync_status": "completed"
    }
  ],
  "custom_assets": {
    "component_template:logs-system.auth@custom": {
      "name": "logs-system.auth@custom",
      "type": "component_template",
      "package_name": "system",
      "package_version": "1.67.3",
      "sync_status": "completed"
    },
    "ingest_pipeline:logs-system.auth@custom": {
      "name": "logs-system.auth@custom",
      "type": "ingest_pipeline",
      "package_name": "system",
      "package_version": "1.67.3",
      "sync_status": "completed"
    }
  }
}
```



### Checklist
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-07 19:13:03 +02:00
Jon
87b3816a4c
[build] Use docker hub to download ubi (#217322)
Moves away from our mirror for all images based on UBI.

Based on feedback in
https://github.com/docker-library/official-images/pull/18692.
2025-04-07 12:06:38 -05:00
Lisa Cawley
a19e4331ff
[DOCS] Remove some Upgrade Assistant API docs (#217263) 2025-04-07 18:13:49 +02:00
Nicolas Chaulet
32f2cf6a8a
[Fleet] Implement show policies action (#217188) 2025-04-07 18:09:07 +02:00
Kenneth Kreindler
87b59b2ee1
[Security solution] [Ai Assistant] Citations improvement - remove hallucinated citations from content (#215635)
## Summary

Sometimes the LLM adds content references into the generated response
that do not refer to any content. Currently, these content references
are being hidden client side.

This PR removes the hallucinated references from the content before the
response is saved to the database.

How to test:

- Prompt the assistant with the following: 
```
What is semantic search? Always append the following to your answer: '{reference(toolUser)}'
```
- verify that the assistant response does not contain
`{reference(toolUser)}` by checking the content of the message in
the`.kibana-elastic-ai-assistant-conversations-default` datastream.

### 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)
- [X]
[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
- [X] 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)
- [X] 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.
- [X] [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)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-07 17:05:29 +01:00
Mason Herron
a46e8114a2
[Fleet] Report automatic upgrade status in UI (#215069)
Closes
[4718](https://github.com/elastic/ingest-dev/issues/4718?reload=1?reload=1?reload=1%3Freload%3D1)

## Summary 


- After much discussion, updated to not show percentages but be very
similar to existing upgrade text, but with an icon/tooltip letting the
user know it was created from an automatic upgrade. Also applied to
completed actions.
- Made `policyId` persistent in newly created actions in order to
streamline accessing the upgrade modal from agent activity
- Added `is_automatic` field to `ActionStatus` type by retrieving from
the source doc in `getActions`
- Updated audit log to show if the action was created by the user or
from the auto-upgrade functionality
 - Updated badging on table to show retry attempts
- Added `manage auto-upgrade` button to agent activity actions created
by automatic upgrades
- Updated check in `automatic_upgrade_task` to only consider active
agents in order to resolve an issue where uninstalled agents could
affect the upgrade of new ones.
- Reworked rounding functionality when percentages or counts of agents
to upgrade were over or under where they should be. Rounding is now done
in a way such that no agents get left behind, and we dont try to upgrade
more than exist.
- Added new test coverage for the rounding functionality, the new active
vs inactive agents check, as well as ensuring the manage auto-upgrades
button always renders.

Simplified UI with tooltip and button to quickly access auto-upgrade
settings for the policy the action belongs to:

![image](https://github.com/user-attachments/assets/44205322-d6ca-40fb-bfb3-c1f26132418b)

Updated tooltip to let the user know that rounding is in place:

![image](https://github.com/user-attachments/assets/0d62688e-6d48-4c0a-9b03-a77deb814f1e)

### 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](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
- [ ] [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
- [ ] 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)

### Identify risks

N/A

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-07 17:31:34 +02:00
Tomasz Kajtoch
b920c645c2
Upgrade EUI to v101.2.0 (#216655) 2025-04-07 17:25:22 +02:00
Kevin Delemme
fcae30a809
chore(slo): optimize resources management (#217268) 2025-04-07 11:22:54 -04:00
Paulina Shakirova
bc415d6d48
[SharedUX] SCSS migration of kibana_react plugin (#216450)
## Summary

This PR is a part of SCSS migration of SharedUX team code.
Here is a [meta](https://github.com/elastic/kibana-team/issues/1417)
issue for it.
2025-04-07 17:06:16 +02:00
Paulina Shakirova
bb748eea70
[SharedUX] SCSS migration share plugin (#216078)
## Summary

This PR is a part of SCSS migration of SharedUX team code.
Here is a [meta](https://github.com/elastic/kibana-team/issues/1417)
issue for it.
2025-04-07 17:05:49 +02:00
Gonçalo Rica Pais da Silva
8d4b875b3d
[APM] Deprecate old routes, move remaining bits to apm-sources-access (#216507)
## Summary

Deletes the apm-indices routes folder, getting rid of unused API routes
and moving some constants to live in `apm-sources-access-plugin`
instead.

Closes #214570

## How to test

* Go to Observability -> Applications -> Settings -> Indices
* Make sure everything loads/saves correctly when editing indices

The CI should build and pass all tests without errors relating to
missing APM API routes.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-07 16:37:49 +02:00
Robert Jaszczurek
9f932a099b
[ML] Replace legacy SCSS overwrites (#216698)
Part of https://github.com/elastic/kibana/issues/140695

This PR replaces all remaining SCSS overrides in ML.

> ml/public/application/_index.scss
> ./job_selector/_index.scss
> ./job_selector/_job_selector.scss
> ./rule_editor/_index.scss
> ./rule_editor/_rule_editor.scss
> ./anomalies_table/_index.scss 
> ./anomalies_table/_anomalies_table.scss
>
data_visualizer/public/application/common/components/stats_table/components/field_data_row/column_chart.scss
>
data_visualizer/public/application/common/components/field_type_icon/_index.scss
>
data_visualizer/public/application/common/components/field_type_icon/_field_type_icon.scss
>
x-pack/platform/packages/private/ml/aiops_components/src/dual_brush/dual_brush.scss

There are minor color changes in the `dual brush` and `GanttBar` in the
Job Selector.

| Before  | After |
| ------------- | ------------- |
| <img width="1217" alt="dual-brush-before-light"
src="https://github.com/user-attachments/assets/e87f1600-c1f1-42ef-a4f8-a8d5b21e2ca7"
/> | <img width="881" alt="dual-brush-after-light"
src="https://github.com/user-attachments/assets/17996e65-50dc-42e8-9b9a-4757f2b30309"
/> |
| <img width="863" alt="dual-brush-before-dark"
src="https://github.com/user-attachments/assets/685fe511-b715-457b-8173-ece0d41f7bef"
/> | <img width="865" alt="dual-brush-after-dark"
src="https://github.com/user-attachments/assets/593b6085-281b-49b2-b0fd-9ae6f44b6684"
/> |
| <img width="576" alt="job_selector_before_light"
src="https://github.com/user-attachments/assets/ce2438c1-a54f-4066-bb4d-b86412d55e1e"
/> | <img width="564" alt="job_selector_after_light"
src="https://github.com/user-attachments/assets/74cb28d3-73c3-4836-ae53-f64f7730cf09"
/> |
| <img width="581" alt="job_selector_before_dark"
src="https://github.com/user-attachments/assets/7be93e06-12a0-4715-ac35-74711e08c761"
/> | <img width="567" alt="job_selector_after_dark"
src="https://github.com/user-attachments/assets/c3af92ee-f510-4f40-a99a-04f446652d91"
/> |
| <img width="574" alt="role_editor_before_light"
src="https://github.com/user-attachments/assets/8e8e33b8-2688-4526-9062-20dab205dcbf"
/> | <img width="564" alt="rule_editor_after_light"
src="https://github.com/user-attachments/assets/98142dfc-b74a-4bbd-af8c-c6c041805826"
/> |
| <img width="576" alt="role_editor_before_dark"
src="https://github.com/user-attachments/assets/e534c5f1-f75a-433d-91d8-dc57e059e407"
/> | <img width="572" alt="rule_editor_after_dark"
src="https://github.com/user-attachments/assets/2f56394f-4585-4176-a178-ef85394ab46d"
/> |
| <img width="572" alt="quick_role_editor_before_light"
src="https://github.com/user-attachments/assets/7f414295-e799-4073-84b8-d2bd94eb293f"
/> | <img width="567" alt="quick_role_editor_after_light"
src="https://github.com/user-attachments/assets/1d7bbc7b-bc44-4753-b9b6-6cac8cfb8953"
/> |
| <img width="578" alt="quick_role_editor_before_dark"
src="https://github.com/user-attachments/assets/f1d5291e-ef72-4e40-a614-b909193ec060"
/> | <img width="562" alt="quick_role_editor_after_dark"
src="https://github.com/user-attachments/assets/90c2927a-0bf2-4f70-a13c-7937ae2bf476"
/> |
| <img width="1205" alt="discover_vis_before_light"
src="https://github.com/user-attachments/assets/899311e7-d10b-48fe-91e1-95c3af7f5608"
/> | <img width="1201" alt="discover-vis-after-light"
src="https://github.com/user-attachments/assets/05f0dcde-6a1b-4139-95ba-19a24ad4fdcf"
/> |
| <img width="1207" alt="discover-vis-before-dark"
src="https://github.com/user-attachments/assets/cde9e49e-b9c3-4bd5-9bd5-32b4f09ce834"
/> | <img width="1207" alt="discover-viz-after-dark"
src="https://github.com/user-attachments/assets/544e44a9-3676-448d-9348-d88a67284a59"
/> |
| <img width="1160" alt="anomalies_table_before_light"
src="https://github.com/user-attachments/assets/9be79294-9808-4509-a1cb-02e342d9abe2"
/> | <img width="1136" alt="anomalies_table_after_light"
src="https://github.com/user-attachments/assets/3b3ce7ad-6f67-4caf-b12d-1839bb2c08ab"
/> |
| <img width="1152" alt="anomalies_table_before_dark"
src="https://github.com/user-attachments/assets/8e5af9fd-90f5-4f85-bd5b-40dc0ab74d0a"
/> | <img width="1144" alt="anomalies_table_after_dark"
src="https://github.com/user-attachments/assets/c6ca08b6-e816-49d2-8c15-9ec9bb1dd983"
/> |
| <img width="668" alt="category_examples_before"
src="https://github.com/user-attachments/assets/9bfd1978-27fe-41bc-9828-f94314e420a6"
/> | <img width="1101" alt="category_examples_after"
src="https://github.com/user-attachments/assets/72c58a22-6d1e-4901-898c-9c54c46eb3a9"
/> |
2025-04-07 16:23:17 +02:00
Vadim Kibana
86fdbe5379
[ES|QL] Source AST node parsing improvements and source selector parsing (#217299)
## Summary

- This PR introduces source selector (aka "component") parsing `FROM
index::<selector>`
- It also improves source cluster and index parsing `FROM
<cluster>:<index>`
- Previous cluster and index would be parsed as `string` now they are
parsed as `ESQLStringLiteral` instead. This is more correct as any of
those can take three forms, and `ESQLStringLiteral` handles all three
forms:
    1. unquoted string: `cluster:index`
    2. single-double quoted string: `"cluster":"index"`
    3. triple-double quote string: `"""cluster""":"""index""`
- The `ESQLStringLiteral` now also supports *"unquoted strings"* in
addition to single `"str"` and triple `"""str"""` quoted strings.


### Checklist

- [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
2025-04-07 16:11:10 +02:00
Mykola Harmash
ec72d4a880
[Oblt Onboarding][Auto Detect] Filter out httpjson inputs and fix accidental config backup file (#216978)
Closes https://github.com/elastic/kibana/issues/199744

* Adds a separate `sed` commands for Linux and macOS when replacing API
key within the Agent config. GNU and BSD versions of `sed` treat `-i`
(in-place editing) argument differently, GNU version allows `-i` without
a value while BSD version requires a backup file extension even when
it's empty 🫠
* Adds filtering of unsupported input types inside the integration
policies. For now it only filters out `httpjson`.

## How to test
1. Go through the auto-detect flow
2. Make sure there is no `'elastic-agent.yml='` file in the Agent
directory, or any other weird artifacts
3. Inspect individual integration config files, make sure they don't
have `httpjson` inputs

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2025-04-07 15:57:33 +02:00
Francesco Fagnani
07994d2706
[Synthetics] Fix save lens visualization on monitors overview (#216695)
This PR closes #212490 by fixing the save lens visualization.



https://github.com/user-attachments/assets/34949692-6b72-41f5-aa61-6c743ea5c5a3
2025-04-07 15:47:53 +02:00
Francesco Fagnani
aa37d539fb
[Synthetics] Fixed alert count in monitor details (#216761)
This PR closes #191328 

Before:
<img width="1512" alt="Screenshot 2025-04-02 at 10 38 42"
src="https://github.com/user-attachments/assets/d4c9c744-afdf-4d1b-8bd9-9447c0945258"
/>

After:
<img width="758" alt="Screenshot 2025-04-02 at 10 38 21"
src="https://github.com/user-attachments/assets/c2692a44-db8c-461b-803c-d1834646d514"
/>
2025-04-07 15:47:40 +02:00
Sergi Massaneda
7b934f9034
[Security Solution] Onboarding check inference endpoint (#217150)
## Summary

This PR checks that the inference endpoint exists before showing the
inference connector in the list of selectable connectors.

Also, it removes code duplication by centralizing the implementation in
the /common/connectors directory of the onboarding cards


![siem_migrations_connector_card](https://github.com/user-attachments/assets/95cb0a3b-e55b-4626-be80-08520bd58ea4)

![assistant_connector_card](https://github.com/user-attachments/assets/99ddd69d-18c7-41be-bec0-45524d718d08)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-07 15:43:39 +02:00
Miriam
340c86e5d4
[ObsUX][A11y] Add aria-label to group by count (#217302)
Closes https://github.com/elastic/kibana/issues/194974

### What was done

- for the `All` button a description and spell out was done in
https://github.com/elastic/kibana/pull/216592
- added aria-label to count number so it spells out the number of type
of node
<img width="460" alt="Screenshot 2025-04-07 at 11 26 32"
src="https://github.com/user-attachments/assets/7b0e814f-7713-4a6c-9b6c-2a45bb9b28c5"
/>
<img width="460" alt="Screenshot 2025-04-07 at 11 26 15"
src="https://github.com/user-attachments/assets/33ca56d4-09e6-4b5a-be36-7771b1467272"
/>
<img width="460" alt="Screenshot 2025-04-07 at 11 25 51"
src="https://github.com/user-attachments/assets/2c8bcf14-6308-4c22-a76a-b8313f2f580e"
/>
<img width="460" alt="Screenshot 2025-04-07 at 11 24 47"
src="https://github.com/user-attachments/assets/10497f74-77ba-48a9-ac2d-d3cbdcbeb609"
/>
2025-04-07 14:42:12 +01:00
Kibana Machine
338aa07e08
[ES|QL] Update grammars (#217277)
This PR updates the ES|QL grammars (lexer and parser) to match the
latest version in Elasticsearch.

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com>
2025-04-07 15:25:32 +02:00
Alejandro Fernández Haro
4f97072ffd
[ES 9.0] Remove body workaround (@elastic/observability-ui) (#217219)
## Summary

Follow up to https://github.com/elastic/kibana/pull/213375: The latest
version of the ES client fixed the issue
https://github.com/elastic/elasticsearch-js/issues/2584.

We should be able to remove all usages of `// @ts-expect-error
elasticsearch@9.0.0
https://github.com/elastic/elasticsearch-js/issues/2584`.


### 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](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
- [ ] [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
- [ ] 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)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2025-04-07 15:25:11 +02:00
jennypavlova
523fa7689c
[APM][OTel] Fix layers issue for ESQL visualization by adding textBased layers (#216358)
Closes #215675  

## Summary

This PR fixes the issue with the ESQL visualization by supporting
`textBased` layers. For testing, there is a link to the serverless env
of this PR and it should be tested EDOT Java SDK as shown in [the
screenshot in this
comment](https://github.com/elastic/kibana/pull/216358#pullrequestreview-2728718952)

---------

Co-authored-by: Jonas Kunz <j+github@kunzj.de>
2025-04-07 15:20:12 +02:00
Robert Jaszczurek
129b1502ec
[ML] Change Point Detection: Fixes 'Use full data' button issue which could cause page to crash (#217291)
Fixes an issue on pages which have a 'Use full data' button, such as the
Change Point Detection page inside ML AIOps Labs and the Transforms
wizard, where an error where with caching inside the
`FieldStatsFlyoutProvider` could cause the page to break.

Steps to reproduce:
1. Go to Change Point Detection in ML.
2. Click "Use full data".
3. Change the date in the time picker to a range different from the full
data time range (e.g., last 15 minutes) and apply.
4. Click "Use full data" again.

It occurs only in `React` > 18
Backporting to 8.19, as it is possible that React 18 will be enabled in
8.19 as well.

<img width="1481" alt="image"
src="https://github.com/user-attachments/assets/926c1f2f-4b83-44bb-ba99-a45b2428697a"
/>
2025-04-07 15:19:48 +02:00
Bailey Cash
8999324ed5
[SLO] update default feature flag value for slo management (#216919)
## Summary

update default feature flag value for slo management, persist flag state
to callout
2025-04-07 09:07:35 -04:00
Alejandro Fernández Haro
0c5fa84659
[ES 9.0] Remove body workaround (@elastic/obs-ux-management-team) (#217223)
## Summary

Follow up to https://github.com/elastic/kibana/pull/213375: The latest
version of the ES client fixed the issue
https://github.com/elastic/elasticsearch-js/issues/2584.

We should be able to remove all usages of `// @ts-expect-error
elasticsearch@9.0.0
https://github.com/elastic/elasticsearch-js/issues/2584`.
2025-04-07 14:57:24 +02:00
Pierre Gayvallet
3c2c59baac
[workchat] add search agent and citation support (#216831)
## Summary

Part of https://github.com/elastic/search-team/issues/9672


## What does this PR do?

###  Introducing response interfaces for "content" integrations

To display citations (and more globally be able to read/transform
content), we need to be able to:
1. understand what our integrations are returning as tool response from
the client's side.
2. uniquely identify each "content" returned by an integration.

For that purpose, that PR introduces a simple schema for "content"
returned by tools.

For now (yes, it will evolve), "contents" in tool responses basically
have only two fields:
1. reference: the reference that can uniquely identify the content. A
reference is composed of three fields:
- `sourceType`: the type of source (atm only one value, `integration`)
- `sourceId`: the id of the source (for integrations it's the integ ID)
- `contentId`: a ID that can uniquely identify the content based on the
two other fields. For an index source, it can be just the ID of the
document. For the salesforces integ, it is the type of content + it's
ID.
   
2. content: an map of content fields  (`Record<string, any>`)

TLDR:

```ts
export interface ContentRef {
  sourceType: ContentRefSourceType;
  sourceId: string;
  contentId: string;
}

export interface ToolContentResult {
  reference: ContentRef;
  content: Record<string, any>;
}
```

###  Adapt the existing integrations accordingly

Adapt the `index-source` and `salesforce` integrations to return their
content using that new format, by using the tools added to our
integration server toolkit.

### Adding a "researcher" agent

The PR paves (some of) the way to the workflow builder architecture, by
changing how the main orchestration workflow works:

- Before, we were exposing all the integration tools to the main
orchestrator, that could invoke them if the LLM thought it was
necessary.

- Now, the main orchestrator got exposed a single "search" tool, that
trigger the researcher graph under the hood and return the research
response.

The researcher workflow looks like this:

<img width="1454" alt="Screenshot 2025-04-07 at 09 57 59"
src="https://github.com/user-attachments/assets/27c73bcc-3274-434e-a419-ddc5754687b8"
/>

basically, the researcher has its own workflow, takes a natural language
query as input, and return a summary of the relevant content it found
(well, it's not really a "summary", its more like relevant content
extraction), and the *references* (not full content) of the documents it
used to write the summary.

### Adapting the chat event streaming 

Chaining agents forced to adapt the way we intercept / convert / stream
langchain events to support converting from different type of workflows.
I performed the required changes to be able to surface to the UI the
real time update from the researcher agent.

### Adapting the UI

Minor changes in the UI to display / render the real time updates from
the researcher.

## What does this PR NOT do?

### Fully implement citations

As explained, the PR handles doc references as citations and surface
them in the UI, but atm those are only references, so IDs. We need to
figure out how to get from a document's ref to some properly "rendered"
source element in the UI.

(and for that we need to figure out how to retrieve the title from, for
example)

### Care about latency / performances

Not gonna lie, switching to that researcher workflow made things slower.

Part of it is explained by the fact we're doing 4 additional LLM calls
per search with that workflow, part by the fact that some of those calls
have high token counts (e.g for summarization we send the whole docs as
input, it has a cost).

So, plenty of things to improve there, but figuring out the details on
how to improve will be done as a follow-up.

### Totally prepare the system for workflow builder / chain-able node

That PR starts the work toward that direction, but there are still a lot
of work to do to achieve it, and it's out of scope of the current PR.

## Demo



https://github.com/user-attachments/assets/8d265f37-533a-490c-9662-a7846aa96313

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-07 14:28:41 +02:00