CHANGELOG.md

# Changelog

## Master

### Changes

## 5.4.10

### Changes

- Upgrade Runbox to 21.0

## 5.4.9

### Changes

- Upgrade Runbox to 20.0

## 5.4.8

### Changes

- Upgrade Runbox to 19.0

## 5.4.7

### Changes

- Fixing release of 5.4.6, no other changes

## 5.4.6

### Changes

- Bump Runbox to 18.0

## 5.4.5

### Changes

- Bump Runbox to 17.0

## 5.4.4

### Changes

- Bump Runbox dependency to 16.2.0

## 5.4.3

### Changes

- Bump Runbox to 16.0.0

## 5.4.2

### Changes

- Improve moduledoc and new_instance/7 doc in Toolbox.Incident module
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/31),
   [#6118](https://altworx.plan.io/issues/6118))
- Bump Runbox to 15.0.0

## 5.4.1

### Changes

- Bump Runbox to 14.1.0

## 5.4.0

### Changes

- Upgrade Elixir to 1.18.1, OTP to 27.2 and Runbox to 14.0.0
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/30),
   [#6782](https://altworx.plan.io/issues/6782))

## 5.3.6

### Changes

- Bump Runbox to 13.0.0 and adapt to the struct renames in Runbox

## 5.3.5

### Changes

- Bump Runbox to 12.1.0

## 5.3.4

### Changes

- Bump Runbox to 12.0.0

## 5.3.3

### Changes

- Bump Runbox to 11.0.0

## 5.3.2

### Changes

- Improve the documentation
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/27),
   [#6195](https://altworx.plan.io/issues/6195))
- Bump runbox version to 10.0.0
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/28),
   [#5918](https://altworx.plan.io/issues/5918))

## 5.3.1

### Changes

- Wider support for incident type in incident workflows
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/23),
   [#6193](https://altworx.plan.io/issues/6193))
- Improve documentation for `Toolbox.Workflow` and `Toolbox.Incident`
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/23))
- Bump runbox version to 9.0.0
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/26))

## 5.3.0

### Changes

- Support additional event parameters in Incident workflow
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/24),
   [#6592](https://altworx.plan.io/issues/6592))

## 5.2.0

### Changes

- Add new function to generate incident ID and deprecate the old one.
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/21),
   [#6391](https://altworx.plan.io/issues/6391))

## 5.1.1

### Changes

- Fix Incident ID Generator on new OTP
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/20))

## 5.1.0

### Changes

- Depend on Runbox v7 and upgrade Elixir and OTP
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/19),
   [#6285](https://altworx.plan.io/issues/6285))

## 5.0.1

### Changes

- Improved documentation of `Toolbox.Incident.add_transition/2`
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/18),
   [#6117](https://altworx.plan.io/issues/6117))

### Changes

## 5.0.0

### Breaking changes

- Expected return value has changed for callback `:side_effects` in
  `Toolbox.Incident` and `Toolbox.Workflow`. When returning an output action,
  it should be of type `Runbox.Scenario.OutputAction.oa_params()` (previously
  `Runbox.Scenario.OutputAction.t()`). See runbox changelog for the version
  6.0.0.

### Changes

- Bump runbox to 6.0.0. Adapt to new output actions.
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/16),
   [#6177](https://altworx.plan.io/issues/6177))

## 4.0.1

### Breaking changes
- `Toolbox.Incident.new_instance/7` and `Toolbox.Workflow.new_instance/7` replaced `Toolbox.Incident.new_instance/6` and `Toolbox.Workflow.new_instance/6`. Update scenarios to use the new functions with `type` as an extra argument (which is placed before `id`).

  **Before**:
  ```elixir
  Incident.new_instance(
    incident_def,
    "status",
    "/incident/high_temperature/189d359b-686e-36e3-a529-b253706a40df",
    %{},
    msg,
    severity: 12
  )
  ```

  **After**:
  ```elixir
  Incident.new_instance(
    incident_def,
    "status",
    "high_temperature",
    "189d359b-686e-36e3-a529-b253706a40df",
    %{},
    msg,
    severity: 12
  )
  ```

  `id` was `/incident/high_temperature/189d359b-686e-36e3-a529-b253706a40df`, is now split to `type` as `high_temperature` and `id` as `189d359b-686e-36e3-a529-b253706a40df`, prefix `/incident/` is omitted because is no longer needed.

- `Toolbox.Incident.new_instance/7`'s parameter `edges` changed to `actors`. In scenarios use `actors` with new format.

  **Before**:
  ```elixir
  [%{type: "actor", actor_id: "/assets/security_tools/pam"}]
  ```
  or
  ```elixir
  [%{actor_id: "/assets/security_tools/pam"}]
  ```

  **After**:
  ```elixir
  [%{type: "/assets/security_tools", id: "pam"}]
  ```

  Note the `actor_id` was split into `type` and `id`.

- Interpolation of `{{id}}` in `Toolbox.Incident` attributes has changed.
  Previously it resolved to the full id, such as
  `/incident/high_temperature/189d359b-686e-36e3-a529-b253706a40df`. Now it
  resolves only to the id, such as `189d359b-686e-36e3-a529-b253706a40df`.


### Changes

- Change param edges to actors
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/12)
   [#6069](https://altworx.plan.io/issues/6069))
- Split asset ID in Toolbox.Workflow and Toolbox.Incident
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/13)
   [#6069](https://altworx.plan.io/issues/6067))

## 3.1.0

### Changes

- Use incident output actions in Incident.
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/10)
   [#5999](https://altworx.plan.io/issues/5999))
- Default Incident subject and description.
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/11)
   [#6026](https://altworx.plan.io/issues/6026))
- Fix passing incident history to output action.
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/11)
   [#6026](https://altworx.plan.io/issues/6026))

## 3.0.0

### Changes

- Move certain modules from Toolbox to Runbox
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/9),
   [#5848](https://altworx.plan.io/issues/5848))

#### Breaking changes
- Many modules were moved from Toolbox to Runbox (some kept their name, but the majority
  of them was also renamed to be under the Runbox "namespace"); here are the ones that
  affect scenario authors or deployment maintainers (for a complete list, see the task):
  - Modules that will require changes in aliases (just replace `Toolbox` with `Runbox`)
    - `Toolbox.Notifications.TemplateHelper` → `Runbox.Notifications.TemplateHelper`
    - `Toolbox.Runtime.RuntimeInstruction` → `Runbox.Runtime.RuntimeInstruction`
    - `Toolbox.Utils.Path` → `Runbox.Utils.Path`
    - `Toolbox.Scenario.Config` → `Runbox.Scenario.Config`
    - `Toolbox.Scenario.Helper` → `Runbox.Scenario.Helper`
    - `Toolbox.Scenario.Manifest` → `Runbox.Scenario.Manifest`
  - A module that requires change of `@behaviour` (just replace `Toolbox` with `Runbox`)
    - `Toolbox.Scenario.Template.StageBased`→ `Runbox.Scenario.Template.StageBased`
  - Configuration key move
    - `:scenario_config_dir` config key was moved from `:toolbox` to `:runbox`,
      you may have to change this in your `config/test.exs`
  - A module that will require change in pipeline definitions inside `config.ini`
    - `Toolbox.Normalizer.LoadTopic.Pipeline.parse_msg` → `Normalizer.LoadTopic.Pipeline.parse_msg`

## 2.0.0

### Changes

- Remove serialization vector from output actions
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/6),
   [#3788](https://altworx.plan.io/issues/3788))

#### Breaking changes
- Field `svector` was removed from `Toolbox.Scenario.OutputAction`
- Function `Toolbox.Scenario.OutputAction.new_create_edge_action/5`
  was removed, scenarios should be updated to use `Toolbox.Scenario.OutputAction.new_create_edge_action/4`
- Function `Toolbox.Scenario.OutputAction.new_upsert_edge_action/5`
  was removed, scenarios should be updated to use `Toolbox.Scenario.OutputAction.new_upsert_edge_action/4`
- Function `Toolbox.Scenario.OutputAction.new_delete_edge_action/5`
  was removed, scenarios should be updated to use `Toolbox.Scenario.OutputAction.new_delete_edge_action/4`

## 1.1.0

### Changes

- Remove redundant API for registering timeouts with both timeout timestamp and timeout message.
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/5),
   [#5827](https://altworx.plan.io/issues/5827))

#### Breaking changes
- API function to register timeouts `Toolbox.Runtime.RuntimeInstruction.register_timeout/2`
  was removed, update scenarios to use `Toolbox.Runtime.RuntimeInstruction.register_timeout/1`
  instead.
- Field `timeout` was removed from `Toolbox.Runtime.RuntimeInstruction.Timeout`

## 1.0.2

### Changes

- Remove unused dependency and update others
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/4),
   [#5661](https://altworx.plan.io/issues/5661))

## 1.0.1

### Changes

- Explicitly load modules when checking if a function is exported
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/3),
   [#5784](https://altworx.plan.io/issues/5784))

## 1.0.0

### Changes

- Add required topics to Scenario Manifest
  ([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/2),
   [#5725](https://altworx.plan.io/issues/5725))

## 0.1.0

### Changes

The initial release, moved Toolbox to separate repository.
([PR](https://gitlab.dev.altworx.com/erlang/product/toolbox/-/merge_requests/1),
 [#5712](https://altworx.plan.io/issues/5712))