diff --git a/.github/actions/run-examples/action.yml b/.github/actions/run-examples/action.yml index 9dc8205bb..02c4ef19d 100644 --- a/.github/actions/run-examples/action.yml +++ b/.github/actions/run-examples/action.yml @@ -32,7 +32,7 @@ runs: - uses: ./.github/actions/ollama # Configure Run Examples environment - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: token: ${{ inputs.token }} ref: ${{ inputs.head-ref }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16f72fe40..17f9eb2cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: python-version: ['3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: diff --git a/.github/workflows/mkdocs-gh-pages.yml b/.github/workflows/mkdocs-gh-pages.yml index b4b90d4b0..5eddead0f 100644 --- a/.github/workflows/mkdocs-gh-pages.yml +++ b/.github/workflows/mkdocs-gh-pages.yml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 # Schema - name: Copy schema run: | @@ -44,7 +44,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Install required packages run: pip install -U mkdocs "mkdocstrings[python]" mkdocs-material pymdown-extensions - name: Build site (_site directory name is used for Jekyll compatiblity) diff --git a/.github/workflows/pdl-live-react-tests.yml b/.github/workflows/pdl-live-react-tests.yml index 58e14f3e6..62ce5ca38 100644 --- a/.github/workflows/pdl-live-react-tests.yml +++ b/.github/workflows/pdl-live-react-tests.yml @@ -19,7 +19,7 @@ jobs: run: working-directory: ./pdl-live-react steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up node uses: actions/setup-node@v4 with: diff --git a/.github/workflows/publish-quay.yaml b/.github/workflows/publish-quay.yaml index 296ea4de8..d27d1f79a 100644 --- a/.github/workflows/publish-quay.yaml +++ b/.github/workflows/publish-quay.yaml @@ -22,23 +22,23 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v5 - name: Docker Setup QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ secrets.QUAYIO_USERNAME }} password: ${{ secrets.QUAYIO_TOKEN }} - name: Build and push ${{ github.ref_name }} to ${{ env.REGISTRY }} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/release-static-web-app.yml b/.github/workflows/release-static-web-app.yml index a235da9a9..25bb566b2 100644 --- a/.github/workflows/release-static-web-app.yml +++ b/.github/workflows/release-static-web-app.yml @@ -13,12 +13,12 @@ jobs: strategy: fail-fast: false - runs-on: 'ubuntu-22.04' + runs-on: 'ubuntu-24.04' defaults: run: working-directory: ./pdl-live-react steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: setup node uses: actions/setup-node@v4 diff --git a/.github/workflows/release-ui.yml b/.github/workflows/release-ui.yml index 6628ceec6..428d0bb3a 100644 --- a/.github/workflows/release-ui.yml +++ b/.github/workflows/release-ui.yml @@ -30,7 +30,7 @@ jobs: run: working-directory: ./pdl-live-react steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: setup node uses: actions/setup-node@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee1e0cffe..5264b07a1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python uses: actions/setup-python@v5 with: @@ -50,7 +50,7 @@ jobs: steps: - name: Download all the dists - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: python-package-distributions path: dist/ @@ -115,7 +115,7 @@ jobs: steps: - name: Download all the dists - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: python-package-distributions path: dist/ diff --git a/.github/workflows/run-examples-prep.yml b/.github/workflows/run-examples-prep.yml index 9ea984412..64ae844fc 100644 --- a/.github/workflows/run-examples-prep.yml +++ b/.github/workflows/run-examples-prep.yml @@ -12,12 +12,12 @@ jobs: steps: # Detect modified PDL files, includes Add, Modified, but not Deleted - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 - name: Detect all PDL files that were changed or added id: changed-pdl-files - uses: tj-actions/changed-files@6cb76d07bee4c9772c6882c06c37837bf82a04d3 # v46 + uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46 with: files: | **.pdl diff --git a/.github/workflows/run-examples.yml b/.github/workflows/run-examples.yml index abc7fd933..6f5a8ec5d 100644 --- a/.github/workflows/run-examples.yml +++ b/.github/workflows/run-examples.yml @@ -15,7 +15,7 @@ jobs: matrix: python-version: ['3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: ref: ${{ github.head_ref }} - uses: ./.github/actions/run-examples diff --git a/.github/workflows/rust-interpreter.yml b/.github/workflows/rust-interpreter.yml index 2d05d439d..5f9eb132c 100644 --- a/.github/workflows/rust-interpreter.yml +++ b/.github/workflows/rust-interpreter.yml @@ -5,6 +5,7 @@ on: branches: [ main ] pull_request: branches: [ main ] + workflow_dispatch: # cancel any prior runs for this workflow and this PR (or branch) concurrency: @@ -19,7 +20,7 @@ jobs: run: working-directory: ./pdl-live-react steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up node uses: actions/setup-node@v4 with: diff --git a/.github/workflows/tauri-cli.yml b/.github/workflows/tauri-cli.yml index 47886a006..63e9a2ace 100644 --- a/.github/workflows/tauri-cli.yml +++ b/.github/workflows/tauri-cli.yml @@ -19,7 +19,7 @@ jobs: run: working-directory: ./pdl-live-react steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up node uses: actions/setup-node@v4 with: diff --git a/dockerfile b/dockerfile index 6e8b6d296..6869ff7ba 100644 --- a/dockerfile +++ b/dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-slim +FROM python:3.13-slim WORKDIR /pdl diff --git a/docs/README.md b/docs/README.md index d000a9430..4224102f1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -50,13 +50,13 @@ pip install 'prompt-declaration-language[examples]' The Live Explorer can be installed as follows (MacOS): ``` -brew install pdl +brew install pdl ``` For other platforms, see installation notes. You can run PDL with LLM models in local using [Ollama](https://ollama.com), or other cloud service. -See [here](https://ibm.github.io/prompt-declaration-language/tutorial/#using-ollama-models) for +See [here](https://ibm.github.io/prompt-declaration-language/tutorial/#using-ollama-models) for instructions on how to install an Ollama model locally. Most examples in this repository use IBM Granite models on [Ollama](https://ollama.com) and some are on [Replicate](https://replicate.com/). In order to run these examples, you need to create a free account @@ -172,7 +172,7 @@ text: temperature: 0 ``` -Notice the syntactic differences. Model ids on watsonx start with `watsonx`. +Notice the syntactic differences. Model ids on watsonx start with `watsonx`. Watsonx also provides a text completion endpoint as shown in the following example. A text completion endpoint does not take chat templates into account: @@ -201,7 +201,7 @@ text: ``` -A PDL program computes 2 data structures. The first is a JSON corresponding to the result of the overall program, obtained by aggregating the results of each block. This is what is printed by default when we run the interpreter. The second is a conversational background context, which is a list of role/content pairs, where we implicitly keep track of roles and content for the purpose of communicating with models that support chat APIs. The contents in the latter correspond to the results of each block. The conversational background context is the list of messages used to make calls to LLMs via LiteLLM. +A PDL program computes two data structures. The first is a JSON corresponding to the result of the overall program, obtained by aggregating the results of each block. This is what is printed by default when we run the interpreter. The second is a conversational background context, which is a list of role/content pairs, where we implicitly keep track of roles and content for the purpose of communicating with models that support chat APIs. The contents in the latter correspond to the results of each block. The conversational background context is the list of messages used to make calls to LLMs via LiteLLM. The PDL interpreter can also stream the background conversation instead of the result: @@ -266,10 +266,10 @@ When we execute this program with the PDL interpreter, we obtain the following t @SuppressWarnings("unchecked") public static Map deserializeOffsetMap(String lastSourceOffset) throws IOException { Map offsetMap; - if (lastSourceOffset == null || lastSourceOffset.isEmpty()) { - offsetMap = new HashMap<>(); + if (lastSourceOffset == null || lastSourceOffset.isEmpty()) { + offsetMap = new HashMap<>(); } else { - offsetMap = JSON_MAPPER.readValue(lastSourceOffset, Map.class); + offsetMap = JSON_MAPPER.readValue(lastSourceOffset, Map.class); } return offsetMap; } @@ -293,10 +293,10 @@ When we execute this new program, we obtain the following: @SuppressWarnings("unchecked") public static Map deserializeOffsetMap(String lastSourceOffset) throws IOException { Map offsetMap; - if (lastSourceOffset == null || lastSourceOffset.isEmpty()) { - offsetMap = new HashMap<>(); + if (lastSourceOffset == null || lastSourceOffset.isEmpty()) { + offsetMap = new HashMap<>(); } else { - offsetMap = JSON_MAPPER.readValue(lastSourceOffset, Map.class); + offsetMap = JSON_MAPPER.readValue(lastSourceOffset, Map.class); } return offsetMap; } diff --git a/docs/assets/pdl_quick_reference.pdf b/docs/assets/pdl_quick_reference.pdf index 43a33b0ae..cee203cf9 100644 Binary files a/docs/assets/pdl_quick_reference.pdf and b/docs/assets/pdl_quick_reference.pdf differ diff --git a/docs/assets/pdl_quick_reference.png b/docs/assets/pdl_quick_reference.png index 3d1c260c9..7dde23456 100644 Binary files a/docs/assets/pdl_quick_reference.png and b/docs/assets/pdl_quick_reference.png differ diff --git a/docs/autopdl.md b/docs/autopdl.md index 73b055ad1..3019044a4 100644 --- a/docs/autopdl.md +++ b/docs/autopdl.md @@ -7,7 +7,15 @@ hide: # AutoPDL Tutorial -The following sections show how to use the AutoPDL optimizer to produce optimized PDL programs for specific tasks. +The following sections show how to use the AutoPDL optimizer introduced by [Spiess et al. (2025)](https://openreview.net/forum?id=CAeISyE3aR) in "AutoPDL: Automatic Prompt Optimization for LLM Agents" ([arXiv](https://arxiv.org/abs/2504.04365)), to produce optimized PDL programs for specific tasks. Please ensure PDL was installed with extras e.g. + +``` { .bash .copy .annotate linenums="1" } +pip install 'prompt-declaration-language[all]' +# or from source +git clone git@github.com:IBM/prompt-declaration-language.git +cd prompt-declaration-language +pip install -e '.[all]' +``` To optimize a PDL program, we need the program, an optimizer configuration, a dataset, and an _evaluator_. An evaluator is a Python subclass of `OptimizerEvaluator` that evaluates a candidate, which is a generated configuration instance consisting of e.g. fewshot examples. The evaluator class follows this structure: @@ -52,41 +60,15 @@ class OptimizerEvaluator(Thread): Let's go through an example for `GSM8K`. Our PDL program uses different prompt patterns from the prompt library, and the variables `prompt_pattern`, `question`, `model`, and `demonstrations` are inserted at runtime by the evaluator. - ```yaml title="examples/optimizer/gsm8k.pdl" linenums="1" --8<-- "./examples/optimizer/gsm8k.pdl" ``` -We write a configuration file for the optimizer, see `src/pdl/optimize/config_parser.py` for all fields: - -``` { .yaml .copy .annotate title="gsm8k_optimizer_config.yml" linenums="1" } -benchmark: gsm8k # Name our benchmark -budget: null # Set a budget, can be number of iterations, or a duration string e.g. "2h" -budget_growth: double # double validation set size each iteration -# or to_max: reach max_test_set_size by final iteration -initial_test_set_size: 2 # size of test set in first iteration -max_test_set_size: 10 # maximum test set size -num_candidates: 100 # how many candidates to evaluate -num_demonstrations: 5 # how many demonstrations to include per candidate -parallelism: 1 # how many threads to run evaluations across -shuffle_test: false # shuffling of test set -test_set_name: test # name of test set -train_set_name: train # name of train set -validation_set_name: validation # name of validation set -demonstrations_variable_name: demonstrations # variable name to insert demonstrations into -variables: # define discrete options to sample from - model: # set ${ model } variable - - watsonx/meta-llama/llama-3-1-8b-instruct - prompt_pattern: # set ${ prompt_pattern } variable to one of these - - cot - - react - - rewoo - num_demonstrations: # overrides num demonstrations above - - 0 - - 3 - - 5 -``` +We write a configuration file for the optimizer, and save it as `gsm8k_optimizer_config.yml`. See `src/pdl/optimize/config_parser.py` for all fields. Please note that this example uses the `watsonx` inference service, so an API key is required, although you can also use a local model or any other inference service. +``` { .yaml .copy .annotate title="examples/optimizer/gsm8k_optimizer_config.yml" linenums="1" } +--8<-- "./examples/optimizer/gsm8k_optimizer_config.yml" +``` ```python title="examples/optimizer/gsm8k_evaluator.py" linenums="1" --8<-- "./examples/optimizer/gsm8k_evaluator.py" @@ -95,20 +77,112 @@ variables: # define discrete options to sample from We can see an example of a script to run the optimization process in `examples/optimizer/optimize.py`. Usage: -``` +```text python optimize.py optimize -h usage: optimize.py optimize [-h] --config CONFIG --dataset-path DATASET_PATH [--experiments-path EXPERIMENTS_PATH] [--yield_output | --no-yield_output] [--dry | --no-dry] pdl_file ``` -We also need a dataset to optimize against, with `train`, `test`, and `validation` splits. To produce such a dataset, we can use HuggingFace Datasets `load_dataset` and `save_to_disk`. This example requires the dataset to have columns `question`, `reasoning`, and `answer`, which can be created from the original `openai/gsm8k` dataset. Processing scripts are under development and will follow shortly. +We also need a dataset to optimize against, with `train`, `test`, and `validation` splits. To produce such a dataset, we can use HuggingFace Datasets `load_dataset` and `save_to_disk`. This example requires the dataset to have columns `question`, `reasoning`, and `answer`, which can be created from the original `openai/gsm8k` dataset. + +We provide three scripts in `examples/optimizer` to create datasets, including the rule based agentic trajectories. These are `process_gsm8k.py`, `process_fever.py`, and `process_mbpp.py`. They load the original datasets, process them, and save them to disk in the required format. Dataset specific instructions may be found in the respective script files. Note that the scripts create a folder named `var` in the current directory, which contains the processed dataset in a format that can be used by the optimizer. Therefore, they should be run in the root of the PDL repository. -We can run an example like so: +Let's run the GSM8K dataset processing script: + +``` { .bash .copy .annotate linenums="1" } +python examples/optimizer/process_gsm8k.py +``` +Which should save the processed dataset in `var/gsm8k_trajectified` and output something like: + +```text +Saving the dataset (1/1 shards): 100%|█████████████████████████████████████████████████████████████████| 6449/6449 [00:00<00:00, 557195.73 examples/s] +Saving the dataset (1/1 shards): 100%|█████████████████████████████████████████████████████████████████| 1319/1319 [00:00<00:00, 363559.64 examples/s] +Saving the dataset (1/1 shards): 100%|█████████████████████████████████████████████████████████████████| 1024/1024 [00:00<00:00, 271472.56 examples/s] +Map: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 6449/6449 [00:00<00:00, 71242.31 examples/s] +Map: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 1024/1024 [00:00<00:00, 68826.30 examples/s] +Map: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 6449/6449 [00:00<00:00, 22520.85 examples/s] +Map: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 6449/6449 [00:00<00:00, 18186.53 examples/s] +Saving the dataset (1/1 shards): 100%|█████████████████████████████████████████████████████████████████| 6449/6449 [00:00<00:00, 698328.77 examples/s] +Saving the dataset (1/1 shards): 100%|█████████████████████████████████████████████████████████████████| 1319/1319 [00:00<00:00, 232468.57 examples/s] +Saving the dataset (1/1 shards): 100%|█████████████████████████████████████████████████████████████████| 1024/1024 [00:00<00:00, 413375.10 examples/s] +DatasetDict({ + train: Dataset({ + features: ['question', 'answer', 'reasoning', 'raw_answer', 'answer_part', 'traj_keys', 'traj_values', 'rewoo_traj_keys', 'rewoo_traj_values'], + num_rows: 6449 + }) + test: Dataset({ + features: ['question', 'answer', 'reasoning', 'raw_answer', 'answer_part'], + num_rows: 1319 + }) + validation: Dataset({ + features: ['question', 'answer', 'reasoning', 'raw_answer', 'answer_part'], + num_rows: 1024 + }) +}) ``` + +Finally, we can run the example like so: + +``` { .bash .copy .annotate linenums="1" } cd examples/optimizer -python optimize.py optimize --config config.yml --dataset-path datasets/gsm8k gsm8k.pdl +python optimize.py optimize --config gsm8k_optimizer_config.yml --dataset-path ../../var/gsm8k_trajectified +``` + +This will report details about the optimization process, such as the number of candidates evaluated. The output will look something like this: + +```text + PDL Optimizer pdl_optimizer.py:336 + ┌──────────────────────────────┬─────────────────────────────────────────────┐ + │ Config combinations │ 9 │ + │ Max candidates │ 100 │ + │ Num. candidates │ 100 │ + │ Starting validation set size │ 2 │ + │ Max validation set size │ 10 │ + │ Num. iterations │ 7 │ + │ Total evaluations │ 1,200 │ + │ Num. threads │ 1 │ + │ Validation set multiplier │ 2 │ + │ Shuffle validation set │ False │ + │ Budget policy │ None │ + ├──────────────────────────────┼─────────────────────────────────────────────┤ + │ model │ ['watsonx/meta-llama/llama-3-2-3b-instruct… │ + │ prompt_pattern │ ['cot', 'react', 'rewoo'] │ + │ num_demonstrations │ [0, 3, 5] │ + └──────────────────────────────┴─────────────────────────────────────────────┘ + Iteration pdl_optimizer.py:419 + ┌─────────────────────┬─────┐ + │ Index │ 0 │ + │ Validation set size │ 2 │ + │ Num. candidates │ 100 │ + └─────────────────────┴─────┘ + Evaluation pdl_optimizer.py:601 + ┌────────────────────────┬──────────────────────────────────────────┐ + │ Test set size │ 2 │ + ├────────────────────────┼──────────────────────────────────────────┤ + │ model │ watsonx/meta-llama/llama-3-2-3b-instruct │ + │ prompt_pattern │ cot │ + │ num_demonstrations │ 0 │ + │ uuid │ enl0ertp │ + │ demonstrations_indices │ 0 │ + │ demonstrations │ 0 │ + └────────────────────────┴──────────────────────────────────────────┘ + Running without parallelism util.py:74 + 0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1,200 [ 0:00:01 < -:--:-- , ? it/s ] ``` -Once the process is complete, a file `optimized_gsm8k.pdl` is written. This file contains the optimal configuration and is directly executable by the standard PDL interpreter. +Note that it is not unusual to observe PDL exceptions during the optimization process. + +```text +[15:44:14] Type errors during spec checking: +../../contrib/prompt_library/ReAct.pdl:0 - should be an object +../../contrib/prompt_library/ReAct.pdl:0 - Type errors during spec checking: +../../contrib/prompt_library/ReAct.pdl:0 - should be an object +Retrying: False +Runtime FAILED and took seconds: 10.21 +``` + +Such exceptions, here for example in `ReAct.pdl`, are caused by the _typed_ model call in `ReAct.pdl:98`. If the model output does not result in a parsable JSON that matches the expected type `{ name: string, arguments: object }`, the PDL interpreter raises an exception. + +Once the process is complete, a file `optimized_gsm8k.pdl` is written in same directory as the source PDL file. This file contains the optimal configuration and is directly executable by the standard PDL interpreter. A log of the optimization process is written to `experiments/` by default. diff --git a/docs/tutorial.md b/docs/tutorial.md index 2f0f37d70..2e6f84fc3 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -35,42 +35,39 @@ Hello, world! In this program ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/calling_llm.pdl)), the `text` starts with the word `"Hello\n"`, and we call a model (`ollama/granite3.2:2b`) with this as input prompt. The model is passed a parameter `stop` to indicate the stop sequences. -A PDL program computes 2 data structures. The first is a JSON corresponding to the result of the overall program, obtained by aggregating the results of each block. This is what is printed by default when we run the interpreter. The second is a conversational background context, which is a list of role/content pairs (list of messages), where we implicitly keep track of roles and content for the purpose of communicating with models that support chat APIs. The contents in the latter correspond to the results of each block. The conversational background context is what is used to make calls to LLMs via LiteLLM. +A PDL program computes two data structures. The first is a JSON corresponding to the result of the overall program, obtained by aggregating the results of each block. This is what is printed by default when we run the interpreter. The second is a conversational background context, which is a list of role/content pairs (list of messages), where we implicitly keep track of roles and content for the purpose of communicating with models that support chat APIs. The contents in the latter correspond to the results of each block. The conversational background context is what is used to make calls to LLMs via LiteLLM. -In this example, since the `input` field is not specified in the model call, the entire text up to that point is passed to the model as input context, using the +In this example, the input of the model is `[{"role": "user", "content": "Hello\n"}]` which corresponds to the entire text up to that point using the default role `user`. -When we execute this program using the interpreter, we obtain: +When we execute this program using the interpreter, we obtain the following result where the second `Hello` has been generated by Granite: ``` Hello Hello ``` -where the second `Hello` has been generated by Granite. - -Here's another example of model call that includes an `input` field ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/calling_llm_with_input.pdl)): +The input of to the model can also be provided explicitly using the `input` field. +Here is an example of model call using this feature ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/calling_llm_with_input.pdl)): ```yaml --8<-- "./examples/tutorial/calling_llm_with_input.pdl" ``` -In this case, the input passed to the model is the sentence: `Translate the word 'Hello' to French` and nothing else from the surrounding document. When we execute this program, we obtain: +In this case, the input passed to the model is `[{"role": "user", "content": "Translate the word 'Hello' to French"}]` and nothing else from the surrounding document. When we execute this program, we obtain the following result where the second line is generated by the model.: ``` Hello Bonjour (pronounced bon-zhoor) is the translation for "Hello" in French. It's an informal greeting used during the day, similar to how we use "Hi" or "Hello." For a more formal context, you might say "Bonjour," which means "Good day." ``` -where the second line is generated by the model. - Using the `input` field, we can also give a directly an array of messages (`role`/`content`) to the model ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/calling_llm_with_input_messages.pdl)): ```yaml --8<-- "./examples/tutorial/calling_llm_with_input_messages.pdl" ``` -This has the same output as the previous program. An alternative way of writing this is [this](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/calling_llm_with_input_messages_var.pdl) program. +This has a similar output as the previous program. An alternative way of writing this program using a variable to store the prompt is [this program](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/calling_llm_with_input_messages_var.pdl). ### Parameter defaults for watsonx Granite models @@ -89,25 +86,45 @@ When using Granite models, we use the following defaults for model parameters: The user can override these defaults by explicitly including them in the model call. -## Variable Definition and Use -Any block can define a variable using a `def: ` field. This means that the output of that block is assigned to the variable ``, which may be reused at a later point in the document. +## Building the background context with `lastOf` -Consider the following example ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/variable_def_use.pdl)): +The pervious example explicitly provides a list of messages with different roles to the LLM call. This can also be done implicitly using the background context. + +Each block can be annotated with a `role` field indicating the role that is used when a message is added to the background context by the block or any of the sub-block that does not redefine it. +In this example, we add a `system` message asking the model to provide answer formally ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/role.pdl)): ```yaml ---8<-- "./examples/tutorial/variable_def_use.pdl" +--8<-- "./examples/tutorial/role.pdl" ``` -Here we assign the output of the model to variable `GEN` using the `def` field. The last line of the program prints out the value of `GEN`. Notice the notation `${ }` for accessing the value of a variable. Any [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) expression is allowed to be used inside these braces. These expressions -are also used to specify conditions for loops and conditionals. See for example this [file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/programs/chatbot.pdl). +In this program, we explicitly indicated the top-level `user` role which is added automatically by the interpreter otherwise. +This role is inherited by the `"Hello\n"` block and masked in the next block to define a system prompt. +So the context provided as input to the LLM is `[{"role": "user", "content": "Hello\n"}, {"role": "system", "content": "You are a polite assistant that likes to answer very formally."}]`. The answer produced by the model block has the `assistant` role. -When we execute this program, we obtain: +The execution of this program produces: ``` Hello +You are a polite assistant that likes to answer very formally. +Greetings! I trust this message finds you in good health and high spirits. How may I be of assistance today? Please feel free to pose your query or request, knowing that I am here to serve with diligence and precision. +``` + +If we want to add the `system` message to the background context without having it present in the result, we can use a `lastOf` block. +The `lastOf` is associated to a list of blocks that are executed in sequence. +Each sub-block contributes messages to the background context but the result of the block is the result of the last block. +The following program provides the same input to the LLM, but the system prompt is not part of the result ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/lastOf.pdl)): + +```yaml +--8<-- "./examples/tutorial/lastOf.pdl" +``` + +Therefore, the result of the program is: + +``` Hello -GEN is equal to: Hello + +Greetings! I trust this message finds you in good health and high spirits. How may I be of assistance today? Please feel free to pose your query or request, knowing that I am here to serve with diligence and precision. ``` ## Model Chaining @@ -118,77 +135,97 @@ In PDL, we can declaratively chain models together as in the following example ( --8<-- "./examples/tutorial/calling_llm_chaining.pdl" ``` -In this program, the first call is to a Granite model with the prompt `"Hello\n"`. The following block in the program prints out the sentence: `"\nDid you just say Hello?\n"`. The final line of the program takes the entire context produced so far and passes it as input to the Granite model. Notice that the input passed to this model is the context up to that point, represented as a conversation. This makes it easy to chain models together and continue building on previous interactions. Notice how the conversational context is accumulated implicitly without requiring the user to explicitly manage messages. +In this program, the first block result is `Hello\n` and adds a message with this value to the background context. The second block calls Granite on the background context containing the Hello message and adds the response of the model to the result and context. The following block contributes the sentence: `\nTranslate the above to French\n`. The final line of the program takes the entire context produced so far and passes it as input to the Granite model. Notice that the input passed to this model is the context up to that point, represented as a conversation. This makes it easy to chain models together and continue building on previous interactions. Notice how the conversational context is accumulated implicitly without requiring the user to explicitly manage messages. When we execute this program, we obtain: ``` Hello Hello -Did you just say Hello? -Yes, I did. That's how I greet people in this conversation. It's a common way to start a dialogue. How can I assist you today? +Translate the above to French +Bonjour ``` -## Function Definition +## Variable Definition and Use -PDL also supports function definitions to make it easier to reuse code. -Suppose we want to define a translation function that takes a string and calls a Granite model for the translation. This would be written in PDL as follows ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/function_definition.pdl)): +Any block can define a variable using a `def: ` field. This means that the result of that block is assigned to the variable ``, which may be reused at a later point in the document. + +Consider the following example ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/variable_def_use.pdl)): ```yaml ---8<-- "./examples/tutorial/function_definition.pdl" +--8<-- "./examples/tutorial/variable_def_use.pdl" ``` -In this program, the first block defines a function `translate` that takes as parameters `sentence` and `language`, both of which are of type string. The body of the function is defined by its `return` field. In this case, we formulate a translation prompt using the parameters and send it to a Granite model. +Here we assign the response of the model to variable `GEN` using the `def` field. The last line of the program prints out the value of `GEN`. Notice the notation `${ }` for accessing the value of a variable. Any [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) expression is allowed to be used inside these braces. These expressions +are also used to specify conditions for loops and conditionals. See for example this [file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/programs/chatbot.pdl). -The last two blocks are calls to this function, as indicated by `call: ${ translate }`. This block specifies the arguments to be passed. When we execute this program, we obtain: +When we execute this program, we obtain: ``` -'J'aime Paris !' -'Me encanta Madrid.' +Hello +Hello +The variable GEN is equal to: Hello ``` -A function only contributes to the result when it is called. So the definition itself results in `""`. When we call a function, we implicitly pass the current background context, and this is used as input to model calls inside the function body. In the above example, since the `input` field is omitted, the entire document produced at that point is passed as input to the Granite model. - -To reset the context when calling a function, we can pass the special argument: `pdl_context: []`. - -Notice that the arguments of function calls are expressions and cannot be arbitrary PDL blocks. +## Local Computation Using `defs` -A function name can be aliased (see [example](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/function_alias.pdl)). +In the previous example, the value of the variable `GEN` computed by the `model` block is part of the result and is added to the background context. To define the variable `GEN` without contributing to the result and context, the `model` block can be moved into a `defs` ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/local_computation.pdl)): -The context inherited by a function can be reset at the call site (see [example](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/function_empty_context.pdl)). +```yaml +--8<-- "./examples/tutorial/local_computation.pdl" +``` -Functions can be declared with optional parameters (see [example](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/function_optional_params.pdl)). +The execution of this program produces: -## Grouping Variable Definitions in Defs +``` +Hello +The variable GEN is equal to: Hello +``` -In PDL, the above program can be written more neatly by grouping certain variable definitions into a `defs` section, as follows ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/defs.pdl)): +The `defs` field can be added on any block and can introduce multiple variables. +The following program defines two variables `fr` and `es` associated to a `text` block that uses them ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/defs.pdl)): ```yaml --8<-- "./examples/tutorial/defs.pdl" ``` -This program has the same output has the one from the previous section. +This program first output `Hello` and add it in the context. +Then, the blocks defining the `fr` and `es` variables are both executed in a context containing only the `Hello` message. These blocks are using a `lastOf` that adds the value to each sub-blocs to the context and output the value of the last block. Finally, the value of the variables are used in the `text` block. -Any block can have a `defs` field defining variables used in that block. Notice it's different than the `def` field which stores the -result of the block after execution. +The output of this program is: -For another example, see [file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/defs-hello.pdl). +``` +Hello -## Muting Block Output with contribute +In Fench: Bonjour! -By default, when a PDL block is executed it produces a result that is contributed to the overall result, and it also contributes to the background context. It is possible to mute both contributions by setting `contribute` to `[]` for any block. This feature allows the computation of intermediate values that are not necessarily output as a result. The value of the variable specified in `def` is still set to the result of the block. +Translation of "Hello" in French is "Bonjour". -Consider the similar example as above, but with `contribute` set to `[]` ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/muting_block_output.pdl)): +In Spanish: Hola! + +La traducción de "Hello" al español es "Hola". +``` + +## Control Block Outputs with `contribute` + +By default, when a PDL block is executed, it produces a result that is contributed to the overall result, and it also contributes to the background context. We saw that `defs` and `lastOf` gives some control over the contribution to the result of context. `defs` executes a block without contributing to the context and name the result that can be used later. `lastOf` contributes only to the context for all of its sun-blocks except the last one. It is also possible to control the contribution of each block using the `contribute` field. + +Consider an example similar as above, but that uses `contribute` instead of `defs` and `lastOf` ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/muting_block_output.pdl)): ```yaml --8<-- "./examples/tutorial/muting_block_output.pdl" ``` -The call to the translator with French as language does not produce an output. However, we save the result in variable `FRENCH` and use it in the last sentence of the document. When we execute this program, we obtain: +Instead of a `lastOf`, we set `contribute` to `[context]` for the block that produces `"\nTranslate to French\n"`. That way, we only contribute to the context and not to the result. +We set `contribute` to `[]` for the call to the LLM such that it does not produce an output but only save the result in the `fr` variable that is used in the last block of the program. When we execute this program, we obtain: ``` -The french sentence was: 'J'aime Paris !' -``` +Hello + +In Fench: Bonjour! + +Translation of "Hello" in French is "Bonjour". +``` In general, `contribute` can be used to set how the result of the block contribute to the final result and the background context. Here are its possible values: @@ -201,7 +238,43 @@ Here are its possible values: - `[result, context]`: contribute to both, which is also the default setting. -## Specifying Data + +## Function Definition + +PDL supports function definitions to make it easier to reuse code. +Suppose we want to define a translation function that takes a string and calls a Granite model for the translation. This would be written in PDL as follows ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/function_definition.pdl)): + +```yaml +--8<-- "./examples/tutorial/function_definition.pdl" +``` + +In this program, the `defs` field defines a function `translate` that takes as parameters `sentence` and `language`, both of which are of type string. The body of the function is defined by its `return` field. In this case, we formulate a translation prompt using the parameters and send it to a Granite model. + +The body of the program is a `text` block that calls this function twice, as indicated by `call: ${ translate }`. The `call` block specifies the arguments to be passed. When we execute this program, we obtain: + +``` +J'aime Paris ! +Me encanta Madrid. +``` + +When we call a function, we implicitly pass the current background context, and this is used as input to model calls inside the function body. In the above example, since the `input` field is omitted, the entire document produced at that point is passed as input to the Granite model. + +To reset the context when calling a function, we can pass the special argument: `pdl_context: []` (see [example](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/function_empty_context.pdl)). + +Functions can be declared with optional parameters (see [example](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/function_optional_params.pdl)). + +PDL is a language with higher order functions meaning that functions are values. So for example, a function can be aliased (see [example](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/function_alias.pdl)). + +PDL functions can also be called from Jinja expressions as in the following example ([file](https://github.com/IBM/prompt-declaration-language/blob/main/examples/tutorial/function_call_in_jinja.pdl)): + +```yaml +--8<-- "./examples/tutorial/function_call_in_jinja.pdl" +``` + +Notice that arguments can be positional or named. + + +## Building Data Structures In PDL, the user specifies step by step the shape of data they wish to generate. A `text` block takes a list of blocks, stringifies the result of each block, and concatenates them. @@ -975,10 +1048,24 @@ What is the color of the sky? ## Python SDK -See examples of PDL being called programmatically in Python -[here](https://github.com/IBM/prompt-declaration-language/blob/main/examples/sdk). +PDL programs can be defined and called programmatically directly in Python. +In the following example, the PDL program is defined as a string and then parsed and executed using the [`exec_str`](https://ibm.github.io/prompt-declaration-language/api_reference/#src.pdl.pdl.exec_str) function ([file](https://github.com/IBM/prompt-declaration-language/blob/main/examples/tutorial/sdk/hello_str.py)). + +```python +--8<-- "./examples/tutorial/sdk/hello_str.py" +``` + +The SDK also provides functions to execute programs defined in a file (see [example](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/sdk/hello_file.py)), as a Python dictionary (see [example](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/sdk/hello_dict.py)), or PDL abstract syntax tree defined by a [Pydantic](https://docs.pydantic.dev) data structure (see [example](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/sdk/hello_prog.py)). The documentation of the API is available [here](https://ibm.github.io/prompt-declaration-language/api_reference/). + + +A way to handle the processing of large datasets using PDL is to use Python multiprocessing capabilities to launch multiple instances of the PDL interpreter. The example below, w are using the Python's `concurrent.futures.ProcessPoolExecutor` to execute in parallel multiple instances of the PDL program `HELLO` where the free variable `name` is instantiated with a different value for each instance ([file](https://github.com/IBM/prompt-declaration-language/blob/main/examples/tutorial/sdk/hello_parallel.py)). + +```python +--8<-- "./examples/tutorial/sdk/hello_parallel.py" +``` -For a more sophisticated example, see [here](https://github.com/IBM/prompt-declaration-language/blob/main/examples/callback). +Finally, it possible to interleave the use of Python and PDL. +You can find an example [here](https://github.com/IBM/prompt-declaration-language/blob/main/examples/callback) of a Python application which is using a function defined in PDL which itself depend on the Python application. ## Debugging PDL Programs @@ -1034,9 +1121,9 @@ export OPENAI_ORGANIZATION=ollama # not required pdl <...> ``` -## Strings In Yaml +## Strings in Yaml -Multiline strings are commonly used when writing PDL programs. There are two types of formats that YAML supports for strings: block scalar and flow scalar formats. Scalars are what YAML calls basic values like numbers or strings, as opposed to complex types like arrays or objects. Block scalars have more control over how they are interpreted, whereas flow scalars have more limited escaping support. (Explanation here is thanks to [Wolfgang Faust](https://yaml-multiline.info/)) +Multiline strings are commonly used when writing PDL programs. There are two types of formats that YAML supports for strings: block scalar and flow scalar formats. Scalars are what YAML calls basic values like numbers or strings, as opposed to complex types like arrays or objects. Block scalars have more control over how they are interpreted, whereas flow scalars have more limited escaping support. (Explanation in this section are based on [yaml-multiline.info](https://yaml-multiline.info/) by Wolfgang Faust.) ### Block Scalars diff --git a/examples/demo/9-react.pdl b/examples/demo/9-react.pdl index 13621edcd..4225ed076 100644 --- a/examples/demo/9-react.pdl +++ b/examples/demo/9-react.pdl @@ -1,31 +1,33 @@ description: Demonstrating a React program defs: + Calc: + description: Calculator function + function: + expr: + type: string + description: Arithmetic expression to calculate + return: + lang: python + code: result = ${ expr } + Search: + description: Wikipedia search + function: + topic: + type: string + description: Topic to search + return: + lang: python + code: | + import warnings, wikipedia + warnings.simplefilter("ignore") + try: + result = wikipedia.summary("${ topic }") + except wikipedia.WikipediaException as e: + result = str(e) tools: data: - - type: function - function: - name: Calc - description: Calculator function - parameters: - type: object - properties: - expr: - type: string - description: Arithmetic expression to calculate - required: - - expr - - type: function - function: - name: Search - description: Wikipedia search - parameters: - type: object - properties: - topic: - type: string - description: Topic to search - required: - - topic + - ${ Calc.signature } + - ${ Search.signature } text: - role: system text: You are Granite, developed by IBM. You are a helpful AI assistant with access to the following tools. When a tool is required to answer the user's query, respond with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request. @@ -77,19 +79,17 @@ text: - "\nObservation: " - match: ${ action[0].name } with: - - case: 'Search' + - case: Search then: - lang: python - code: | - import warnings, wikipedia - warnings.simplefilter("ignore") - try: - result = wikipedia.summary("${ action[0].arguments.topic }") - except wikipedia.WikipediaException as e: - result = str(e) - - case: 'Calc' + call: ${ Search } + args: + topic: ${ action[0].arguments.topic } + - case: Calc then: - lang: python - code: result = ${ action[0].arguments.expr } + call: ${ Calc } + args: + expr: ${ action[0].arguments.expr } + - case: Finish + then: ${ action[0].arguments.topic } - "\n" - until: ${ action[0].name == "Finish" } \ No newline at end of file + until: ${ action[0].name == "Finish" } diff --git a/examples/demos/react.pdl b/examples/demos/react.pdl index 43b2e2552..4225ed076 100644 --- a/examples/demos/react.pdl +++ b/examples/demos/react.pdl @@ -1,30 +1,33 @@ +description: Demonstrating a React program defs: + Calc: + description: Calculator function + function: + expr: + type: string + description: Arithmetic expression to calculate + return: + lang: python + code: result = ${ expr } + Search: + description: Wikipedia search + function: + topic: + type: string + description: Topic to search + return: + lang: python + code: | + import warnings, wikipedia + warnings.simplefilter("ignore") + try: + result = wikipedia.summary("${ topic }") + except wikipedia.WikipediaException as e: + result = str(e) tools: data: - - type: function - function: - name: Calc - description: Calculator function - parameters: - type: object - properties: - expr: - type: string - description: Arithmetic expression to calculate - required: - - expr - - type: function - function: - name: Search - description: Wikipedia search - parameters: - type: object - properties: - topic: - type: string - description: Topic to search - required: - - topic + - ${ Calc.signature } + - ${ Search.signature } text: - role: system text: You are Granite, developed by IBM. You are a helpful AI assistant with access to the following tools. When a tool is required to answer the user's query, respond with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request. @@ -76,19 +79,17 @@ text: - "\nObservation: " - match: ${ action[0].name } with: - - case: 'Search' + - case: Search then: - lang: python - code: | - import warnings, wikipedia - warnings.simplefilter("ignore") - try: - result = wikipedia.summary("${ action[0].arguments.topic }") - except wikipedia.WikipediaException as e: - result = str(e) - - case: 'Calc' + call: ${ Search } + args: + topic: ${ action[0].arguments.topic } + - case: Calc then: - lang: python - code: result = ${ action[0].arguments.expr } + call: ${ Calc } + args: + expr: ${ action[0].arguments.expr } + - case: Finish + then: ${ action[0].arguments.topic } - "\n" - until: ${ action[0].name == "Finish" } \ No newline at end of file + until: ${ action[0].name == "Finish" } diff --git a/examples/gsm8k/gsm8.pdl b/examples/gsm8k/gsm8k-loop-fission.pdl similarity index 95% rename from examples/gsm8k/gsm8.pdl rename to examples/gsm8k/gsm8k-loop-fission.pdl index 5f43320f3..ce70d580f 100644 --- a/examples/gsm8k/gsm8.pdl +++ b/examples/gsm8k/gsm8k-loop-fission.pdl @@ -18,6 +18,10 @@ defs: # How many problems to evaluate. The entire dataset is 1319 problems. # MAX_ITERATIONS: 1319 MAX_ITERATIONS: 50 + # Which model to use + # MODEL: ollama/granite-code:8b + # MODEL: ollama/granite3.2:8b + MODEL: watsonx/ibm/granite-3-2-8b-instruct # PDL variables that hold statistics SUCCESSES: 0 @@ -29,8 +33,7 @@ text: TEST: ${ TESTS } repeat: # Ask the LLM for the answer - # - model: ollama/granite-code:8b - model: ollama/granite3.2:8b + model: ${ MODEL } # First, get LLM to answer the question input: | Question: ${ TEST.question } @@ -51,8 +54,7 @@ text: LLM_FULL_ANSWER: ${ ALL_LLM_FULL_A } repeat: # Next, get LLM to convert its answer into a single JSON key/value - # - model: ollama/granite-code:8b - model: ollama/granite3.2:8b + model: ${ MODEL } input: | # 'input' is the prompt Generate the final answer from the conclusion of this text as JSON with a single key named answer. ${ LLM_FULL_ANSWER } diff --git a/examples/gsm8k/gsm8k.pdl b/examples/gsm8k/gsm8k.pdl new file mode 100644 index 000000000..be8c1ef5b --- /dev/null +++ b/examples/gsm8k/gsm8k.pdl @@ -0,0 +1,105 @@ +#!/usr/bin/env pdl + +# Grade School Math https://github.com/openai/grade-school-math is an +# open source AI dataset from 2021. +# +# https://github.com/openai/grade-school-math/blob/master/grade_school_math/data/test.jsonl +# is a file with 1319 questions and answers. +# +# + +description: Grade School Math +defs: + # The Grade School Math Dataset + ALL_TESTS: + read: ./test.jsonl + parser: jsonl + + # How many problems to evaluate. The entire dataset is 1319 problems. + # MAX_ITERATIONS: 1319 + MAX_ITERATIONS: 10 + # Which model to use + # MODEL: ollama/granite-code:8b + # MODEL: ollama/granite3.2:8b + MODEL: watsonx/ibm/granite-3-2-8b-instruct + + # PDL variables that hold statistics + SUCCESSES: 0 + FAILURES: 0 + TESTS: ${ ALL_TESTS[:MAX_ITERATIONS] } + SOLUTIONS: + defs: + stats: + function: + r1: { success: integer, text: string} + r2: { success: integer, text: string} + return: + data: + success: ${ r1.success + r2.success } + text: ${ r1.text + "\n\n" + r2.text } + for: + TEST: ${ TESTS } + # maxWorkers: 10 + map: + defs: + # First phase: ask LLM the Grade School Math questions + LLM_FULL_ANSWER: + model: ${ MODEL } + # First, get LLM to answer the question + input: | + Question: ${ TEST.question } + Answer: + # Next, get LLM to convert its answer into a single JSON key/value + SIMPLIFIED_LLM_ANSWER: + model: ${ MODEL } + input: | + Generate the final answer from the conclusion of this text as JSON with a single key named answer. + ${ LLM_FULL_ANSWER } + # Third phase: Compare with Grade School Math ground truth + lastOf: + # Convert the JSON string to JSON. (We do this in a separate step so + # we have access to the original for debugging.) + - data: ${ SIMPLIFIED_LLM_ANSWER } + parser: json + def: JSON_SIMPLIFIED_LLM_ANSWER + + # Strip off any prefix or suffix off the number (dollar signs, units, etc) + # and place it in of the JSON format { "answer": ... } + - data: ${ JSON_SIMPLIFIED_LLM_ANSWER.answer|string if 'answer' in JSON_SIMPLIFIED_LLM_ANSWER else ("MISSING 'answer' in " + LLM_FULL_ANSWER) } + parser: + regex: "[^0-9]*(?P[0-9]+).*$" + spec: + answer: string + def: EXTRACTED_SIMPLIFIED_LLM_ANSWER + # (In case the simplified answer did not contain digits.) + - if: ${ EXTRACTED_SIMPLIFIED_LLM_ANSWER == None } + then: + def: EXTRACTED_SIMPLIFIED_LLM_ANSWER + data: + answer: "none" + + # Extract the expected answer, which in this test data always follows "#### " + # into { "answer": ... } + - data: ${ TEST.answer } + parser: + regex: "(.|\n)*#### (?P([0-9])*)\n*" + spec: + answer: string + def: EXTRACTED_GROUND_TRUTH + + # Did we get the expected answer? + - if: ${ EXTRACTED_SIMPLIFIED_LLM_ANSWER.answer == EXTRACTED_GROUND_TRUTH.answer} + then: + object: + success: 1 + text: | + LLM got right answer for '${ LLM_FULL_ANSWER }' which was simplified to '${ SIMPLIFIED_LLM_ANSWER }' which was extracted to '${ EXTRACTED_SIMPLIFIED_LLM_ANSWER.answer }' + else: + object: + success: 0 + text: | + WRONG! Wanted ${ EXTRACTED_GROUND_TRUTH.answer} } / LLM said '${ LLM_FULL_ANSWER }' which was simplified to '${ SIMPLIFIED_LLM_ANSWER }' which was extracted to '${ EXTRACTED_SIMPLIFIED_LLM_ANSWER.answer }' + join: + reduce: ${ stats } +text: + Finished, ${ SOLUTIONS.success } successes on ${ MAX_ITERATIONS } tests diff --git a/examples/map-reduce/python-reduce.pdl b/examples/map-reduce/python-reduce.pdl new file mode 100644 index 000000000..3efbdc531 --- /dev/null +++ b/examples/map-reduce/python-reduce.pdl @@ -0,0 +1,13 @@ +defs: + plus: + lang: python + code: | + import operator + result = operator.add +for: + i: [1,2,3,4] +map: + ${i} +join: + as: reduce + reduce: ${ plus } diff --git a/examples/map-reduce/reduce.pdl b/examples/map-reduce/reduce.pdl new file mode 100644 index 000000000..2bbaaab6d --- /dev/null +++ b/examples/map-reduce/reduce.pdl @@ -0,0 +1,13 @@ +defs: + plus: + function: + x: number + y: number + return: + ${ x + y } +for: + i: [1,2,3,4] +map: + ${i} +join: + reduce: ${ plus } diff --git a/examples/optimizer/bea19.pdl b/examples/optimizer/bea19.pdl new file mode 100644 index 000000000..291bab410 --- /dev/null +++ b/examples/optimizer/bea19.pdl @@ -0,0 +1,17 @@ +lastOf: + - "Here are examples of grammatically incorrect sentences and their corrected versions:\n\n" + - for: + example: ${ demonstrations } + repeat: + text: "${ example.broken } -> ${ example.sentence }" + join: + with: "\n\n" + - "Correct the following sentence:\n\n${ broken }\nHere's the corrected sentence:\n\n" + - model: ${ model } + parameters: + max_tokens: 1024 + temperature: 0 + stop: + - "<|endoftext|>" + - "Question:" + include_stop_sequence: false \ No newline at end of file diff --git a/examples/optimizer/bea19_example.yml b/examples/optimizer/bea19_example.yml new file mode 100644 index 000000000..7698bb6af --- /dev/null +++ b/examples/optimizer/bea19_example.yml @@ -0,0 +1,37 @@ +pdl_path: examples/optimizer/bea19.pdl # Path to the PDL file to optimize +# benchmark: gretel-math # Name our benchmark +dataset: + train: bea19_jsonl/train.jsonl # Path to the training split in JSONL format + test: bea19_jsonl/test.jsonl # Path to the test split in JSONL format + validation: bea19_jsonl/validation.jsonl # Path to the validation split in JSONL format + +demonstrations_variable_name: demonstrations # variable name to insert demonstrations into +demonstration_columns: + - broken # column name for the question in the dataset + - sentence # column name for the answer in the dataset + +instance_columns: + - broken # column name for the question in the dataset + +groundtruth_column: sentence # column name for the ground truth in the dataset + +eval_pdl: examples/optimizer/eval_levenshtein.pdl # Path to the PDL file for evaluation + +budget: null # Set a budget, can be number of iterations, or a duration string e.g. "2h" +budget_growth: double # double validation set size each iteration +# or to_max: reach max_test_set_size by final iteration +initial_test_set_size: 1 # size of test set in first iteration +max_test_set_size: 1 # maximum test set size +num_candidates: 100 # how many candidates to evaluate +parallelism: 1 # how many threads to run evaluations across +shuffle_test: false # shuffling of test set +test_set_name: test # name of test set +train_set_name: train # name of train set +validation_set_name: validation # name of validation set +variables: # define discrete options to sample from + model: # set ${ model } variable + - watsonx/meta-llama/llama-3-2-3b-instruct + num_demonstrations: # overrides num demonstrations above + - 0 + - 3 + - 5 \ No newline at end of file diff --git a/examples/optimizer/eval_levenshtein.pdl b/examples/optimizer/eval_levenshtein.pdl new file mode 100644 index 000000000..c7c0ef534 --- /dev/null +++ b/examples/optimizer/eval_levenshtein.pdl @@ -0,0 +1,11 @@ +defs: + score: + function: + document: string + ground_truth: string + return: + lang: python + fallback: 0 + code: | + import textdistance + result = textdistance.levenshtein.normalized_similarity(document, ground_truth) \ No newline at end of file diff --git a/examples/optimizer/fever_evaluator.py b/examples/optimizer/fever_evaluator.py index 7bd056dcc..d9465199f 100644 --- a/examples/optimizer/fever_evaluator.py +++ b/examples/optimizer/fever_evaluator.py @@ -82,5 +82,12 @@ def extract_answer(self, document: str) -> bool | None: return None - def answer_correct(self, document: str, answer: Any, truth: Any) -> bool: - return answer == truth or document.lower().endswith(str(truth).lower()) + def score(self, document: str, ground_truth: Any) -> float: + answer = self.extract_answer(document) + if answer is None: + return 0.0 + + return float( + answer == ground_truth + or document.lower().endswith(str(ground_truth).lower()) + ) diff --git a/examples/optimizer/gsm8k_evaluator.py b/examples/optimizer/gsm8k_evaluator.py index d6c7c1858..8288895b9 100644 --- a/examples/optimizer/gsm8k_evaluator.py +++ b/examples/optimizer/gsm8k_evaluator.py @@ -64,8 +64,6 @@ def get_scope(self) -> ScopeType: scope["reasoning"] = self.example["reasoning"] return empty_scope | scope - def extract_answer(self, document: str) -> Any: - return extract_math_answer(document) - - def answer_correct(self, document: str, answer: Any, truth: Any) -> bool: - return answer == truth or document.endswith(f" {truth}") + def score(self, document: str, ground_truth: Any) -> float: + answer = extract_math_answer(document) + return float(answer == ground_truth or document.endswith(f" {ground_truth}")) diff --git a/examples/optimizer/gsm8k_optimizer_config.yml b/examples/optimizer/gsm8k_optimizer_config.yml new file mode 100644 index 000000000..822b43217 --- /dev/null +++ b/examples/optimizer/gsm8k_optimizer_config.yml @@ -0,0 +1,41 @@ +pdl_path: gsm8k.pdl # Path to the PDL file to optimize +dataset: gsm8k # Name our benchmark +budget: null # Set a budget, can be number of iterations, or a duration string e.g. "2h" +budget_growth: double # double validation set size each iteration +# or to_max: reach max_test_set_size by final iteration +initial_test_set_size: 2 # size of test set in first iteration +max_test_set_size: 10 # maximum test set size +num_candidates: 100 # how many candidates to evaluate +num_demonstrations: 5 # how many demonstrations to include per candidate +parallelism: 1 # how many threads to run evaluations across +shuffle_test: false # shuffling of test set +test_set_name: test # name of test set +train_set_name: train # name of train set +validation_set_name: validation # name of validation set +demonstrations_variable_name: demonstrations # variable name to insert demonstrations into +demonstration_columns: + - question # column name for the question in the dataset + - reasoning + - answer + - traj_keys + - traj_values + - rewoo_traj_keys + - rewoo_traj_values + +instance_columns: + - question + - reasoning + +groundtruth_column: answer # column name for the ground truth in the dataset + +variables: # define discrete options to sample from + model: # set ${ model } variable + - watsonx/meta-llama/llama-3-2-3b-instruct + prompt_pattern: # set ${ prompt_pattern } variable to one of these + - cot + - react + - rewoo + num_demonstrations: # overrides num demonstrations above + - 0 + - 3 + - 5 diff --git a/examples/optimizer/gsmhard_evaluator.py b/examples/optimizer/gsmhard_evaluator.py index a9bf5a641..18636db00 100644 --- a/examples/optimizer/gsmhard_evaluator.py +++ b/examples/optimizer/gsmhard_evaluator.py @@ -6,12 +6,12 @@ from pdl.pdl_interpreter import empty_scope -def is_float(s: str) -> str: +def is_float(s: str | float) -> str: try: f = float(s) return f"{f:.2f}" except Exception: - return s + return str(s) class GsmHardEvaluator(OptimizerEvaluator): @@ -74,10 +74,16 @@ def get_scope(self) -> ScopeType: scope["question"] = self.example["input"] return empty_scope | scope - def extract_answer(self, document: str) -> float | int | None: - return extract_math_answer(document) + def score(self, document: str, ground_truth: Any) -> float: + answer = extract_math_answer(document) + if answer is None: + return 0.0 - def answer_correct(self, document: str, answer: Any, truth: Any) -> bool: answerf = is_float(answer) - truthf = is_float(truth) - return answer == truth or answerf == truthf or document.endswith(f" {truth}") + truthf = is_float(ground_truth) + + return float( + answer == ground_truth + or answerf == truthf + or document.endswith(f" {ground_truth}") + ) diff --git a/examples/optimizer/mbpp_dataset.py b/examples/optimizer/mbpp_dataset.py index 3265a8b29..61fef67a6 100644 --- a/examples/optimizer/mbpp_dataset.py +++ b/examples/optimizer/mbpp_dataset.py @@ -3,7 +3,7 @@ from copy import deepcopy -from datasets import load_from_disk +from datasets.load import load_from_disk from evalplus.data import get_mbpp_plus, get_mbpp_plus_hash from evalplus.evaluate import MBPP_OUTPUT_NOT_NONE_TASKS, get_groundtruth diff --git a/examples/optimizer/mbpp_evaluator.py b/examples/optimizer/mbpp_evaluator.py index 4402acefd..e14151c54 100644 --- a/examples/optimizer/mbpp_evaluator.py +++ b/examples/optimizer/mbpp_evaluator.py @@ -65,9 +65,10 @@ def extract_answer(self, document: str) -> str: solution = solution.split("```")[1] return solution.strip() - def answer_correct(self, document: str, answer: Any, truth: Any) -> bool: - if answer is None or not isinstance(answer, str): - return False + def score(self, document: str, ground_truth: Any) -> float: + answer = self.extract_answer(document) + if not answer: + return 0.0 retry_parse = False try: @@ -78,16 +79,16 @@ def answer_correct(self, document: str, answer: Any, truth: Any) -> bool: if retry_parse: pattern = r"```(?:python)?\n(.*?)\n```" - match = re.search(pattern, answer, re.DOTALL) + match = re.search(pattern, document, re.DOTALL) if match: answer = match.group(1) try: ast.parse(answer) except Exception as e: print(e) - return False + return 0.0 else: - return False + return 0.0 task_id = self.example["task_id"] @@ -109,4 +110,4 @@ def answer_correct(self, document: str, answer: Any, truth: Any) -> bool: base_stat, _ = result["base"] plus_stat, _ = result["plus"] - return base_stat == "pass" and plus_stat == "pass" + return float(base_stat == "pass" and plus_stat == "pass") diff --git a/examples/optimizer/optimize.py b/examples/optimizer/optimize.py index c88b799cb..a2b5190d8 100644 --- a/examples/optimizer/optimize.py +++ b/examples/optimizer/optimize.py @@ -5,14 +5,16 @@ from typing import Any import yaml -from datasets import load_from_disk +from datasets import load_dataset, load_from_disk from fever_evaluator import FEVEREvaluator from gsm8k_evaluator import Gsm8kEvaluator from gsmhard_evaluator import GsmHardEvaluator from mbpp_dataset import MBPPDataset from mbpp_evaluator import MBPPEvaluator -from pdl.optimize.config_parser import OptimizationConfig +from pdl.optimize.config_parser import JsonlDataset, OptimizationConfig +from pdl.optimize.optimizer_evaluator import OptimizerEvaluator +from pdl.optimize.pdl_evaluator import PdlEvaluator from pdl.optimize.pdl_optimizer import PDLOptimizer if __name__ == "__main__": @@ -38,7 +40,7 @@ "--dataset-path", help="Path to the dataset directory", type=Path, - required=True, + required=False, ) common_parser.add_argument( "--experiments-path", @@ -56,11 +58,6 @@ action=argparse.BooleanOptionalAction, default=False, ) - common_parser.add_argument( - "pdl_file", - type=Path, - help="Path to a PDL file to optimize", - ) # Optimize command optimize_parser = subparsers.add_parser( @@ -82,9 +79,6 @@ ) args = parser.parse_args() - if not args.pdl_file.exists(): - print("PDL file doesn't exist:", args.pdl_file) - sys.exit(1) if not args.config.exists(): print("Config file doesn't exist:", args.config) @@ -100,35 +94,52 @@ traceback.print_last() sys.exit(1) + if not Path(config.pdl_path).exists(): + print("PDL file doesn't exist:", config.pdl_path) + sys.exit(1) + if args.dry: sys.exit(0) # Set up dataset and trial thread based on benchmark dataset: Any TrialThread: type[ - Gsm8kEvaluator | GsmHardEvaluator | FEVEREvaluator | MBPPEvaluator + Gsm8kEvaluator + | GsmHardEvaluator + | FEVEREvaluator + | MBPPEvaluator + | OptimizerEvaluator ] - if config.benchmark == "gsm8k": + if config.dataset == "gsm8k": dataset = load_from_disk(args.dataset_path) TrialThread = Gsm8kEvaluator - elif config.benchmark == "gsmhard": + elif config.dataset == "gsmhard": dataset = load_from_disk(args.dataset_path) TrialThread = GsmHardEvaluator - elif config.benchmark == "fever": + elif config.dataset == "fever": fever = load_from_disk(args.dataset_path) dataset = fever TrialThread = FEVEREvaluator - elif config.benchmark == "mbpp": + elif config.dataset == "mbpp": dataset = MBPPDataset(args.dataset_path) TrialThread = MBPPEvaluator + elif isinstance(config.dataset, (dict, JsonlDataset)): + dataset = load_dataset( + "json", + data_files={ + "train": config.dataset.train, + "validation": config.dataset.validation, + "test": config.dataset.test, + }, + ) + TrialThread = PdlEvaluator else: - print(f"Unknown benchmark: {config.benchmark}") + print(f"Unknown dataset: {config.dataset}") sys.exit(1) # Create optimizer instance optimizer = PDLOptimizer( - pdl_path=args.pdl_file, dataset=dataset, trial_thread=TrialThread, yield_output=args.yield_output, diff --git a/examples/optimizer/process_bea19.py b/examples/optimizer/process_bea19.py new file mode 100644 index 000000000..3a01b3e61 --- /dev/null +++ b/examples/optimizer/process_bea19.py @@ -0,0 +1,33 @@ +import json +from pathlib import Path + +from datasets.dataset_dict import DatasetDict +from datasets.load import load_dataset + +# Load dataset +bea19 = load_dataset("juancavallotti/bea-19-corruption") +if not isinstance(bea19, DatasetDict): + raise TypeError(f"Expected bea19 to be a DatasetDict, but got: {type(bea19)}") + +# Create validation split from train (1024 examples) +new_split = bea19["train"].train_test_split(test_size=1024) +bea19["test"] = new_split["test"] + +val_split = new_split["train"].train_test_split() +bea19["train"] = val_split["train"] +bea19["validation"] = val_split["test"] + +# Output dir +out_dir = Path("bea19_jsonl") +out_dir.mkdir(parents=True, exist_ok=True) + + +# Save to JSONL +def save_jsonl(dataset, path: Path) -> None: + with path.open("w") as f: + for item in dataset: + f.write(json.dumps(item) + "\n") + + +for split in ["train", "validation", "test"]: + save_jsonl(bea19[split], out_dir / f"{split}.jsonl") diff --git a/examples/optimizer/process_fever.py b/examples/optimizer/process_fever.py new file mode 100644 index 000000000..f3419cb7f --- /dev/null +++ b/examples/optimizer/process_fever.py @@ -0,0 +1,462 @@ +# Instructions for running this script: +# 1. Ensure you have the required libraries installed. +# `datasets` should be version 3.0 or higher. +# +# `pip install prompt-declaration-language[all] funcy` +# 2. Download the original FEVER dataset with wiki-pages, and BigBench FEVER task JSON file +# from the respective sources. +# https://fever.ai/dataset/fever.html +# https://github.com/google/BIG-bench/blob/main/bigbench/benchmark_tasks/fact_checker/fever/task.json +# +# ``` +# wget https://raw.githubusercontent.com/google/BIG-bench/refs/heads/main/bigbench/benchmark_tasks/fact_checker/fever/task.json +# wget https://fever.ai/download/fever/wiki-pages.zip +# wget https://fever.ai/download/fever/shared_task_dev.jsonl +# ``` +# Place the downloaded files in the `var/fever` directory. +# Extract the `wiki-pages.zip` file into `var/fever/wiki-pages/`. +# 3. Run this script to process the FEVER dataset. +# `python examples/optimizer/process_fever.py` +# +import json +import operator +import re +import unicodedata +import warnings +from functools import cache +from itertools import groupby +from pathlib import Path +from typing import Any + +import pandas as pd +import wikipedia +from datasets.arrow_dataset import Dataset +from datasets.dataset_dict import DatasetDict +from datasets.load import load_dataset, load_from_disk +from funcy import flatten +from tqdm.autonotebook import tqdm + +tqdm.pandas() +warnings.simplefilter("ignore") + +var_dir = Path("var") +var_dir.mkdir(parents=True, exist_ok=True) + + +def clean_fever(text: str) -> str: + mapping = { + "_": " ", + "-LRB- ": "(", + " -RRB-": ")", + "-LSB- ": "[", + " -RSB-": "]", + "-LRB-": "(", + "-RRB-": ")", + "-LSB-": "[", + "-RSB-": "]", + "-COLON-": ":", + } + + for k, v in mapping.items(): + text = text.replace(k, v) + + return text.strip() + + +@cache +def search_new( + subject: str, auto_suggest: bool = False, redirect: bool = False +) -> tuple[str, str]: + try: + result = ( + wikipedia.summary( + subject, auto_suggest=auto_suggest, redirect=redirect + ).strip(), + "success", + ) + except wikipedia.DisambiguationError as d: + result = ( + f'"{subject}" may refer to one of {d.args[1]}. Please retry the search with one of the subjects using Search[].', + "disambg", + ) + except wikipedia.PageError as e: + result = f"{e} Please retry the search using Search[].", "pageerror" + except wikipedia.WikipediaException as e: + print(e, type(e)) + result = str(e), f"other:{type(e)}" + except Exception as e: + print(e, type(e)) + result = str(e), f"other:{type(e)}" + return result + + +def searcher(row: dict[str, Any], auto_suggest: bool): + cleaned = clean_fever(row["article"]) + if "msg" in row: + if row["msg"] != "success": + wiki, msg = search_new(cleaned, auto_suggest=auto_suggest, redirect=True) + else: + wiki = row["wiki"] + msg = row["msg"] + else: + wiki, msg = search_new(cleaned, auto_suggest=auto_suggest, redirect=True) + return {"wiki": wiki, "msg": msg, "cleaned": cleaned} + + +def remove_accents(x: str) -> str: + return unicodedata.normalize("NFD", x) + + +fever = load_dataset("fever/fever", "v1.0") +if not isinstance(fever, DatasetDict): + raise TypeError(f"Expected fever to be a DatasetDict, but got: {type(fever)}") + +bigbench_fever = json.loads(Path("var/fever/task.json").read_text(encoding="utf-8")) + +fever.save_to_disk("var/fever/fever_original") +print(fever) + +wikipages = load_dataset( + "json", + data_files="var/fever/wiki-pages/wiki-pages/wiki-*.jsonl", + encoding="utf-8", +) +if not isinstance(wikipages, DatasetDict): + raise TypeError( + f"Expected wikipages to be a DatasetDict, but got: {type(wikipages)}" + ) + +print("Loaded wikipages:", wikipages) +print("Mapping wikipages...") +wikipages["train"] = wikipages["train"].map( + lambda x: { + "lines_split": [x for x in re.split(r"\d+\t", x["lines"]) if x], + }, + num_proc=32, +) +print("Mapping wikipages done.") + +print("Converting wikipages to DataFrame...") +wiki_pages_df = wikipages["train"].to_pandas() +if not isinstance(wiki_pages_df, pd.DataFrame): + raise TypeError( + f"Expected wiki_pages_df to be a DataFrame, but got: {type(wiki_pages_df)}" + ) +wiki_pages_df = wiki_pages_df.set_index("id") +wiki_pages_df.index = wiki_pages_df.index.map(remove_accents) +print("Wikipages converted to DataFrame.") + + +if isinstance(wiki_pages_df, pd.DataFrame): + wiki_pages_df.to_parquet( + path="var/fever/wiki_pages.parquet", + index=True, + engine="pyarrow", + compression="zstd", + compression_level=10, + ) +else: + raise TypeError( + f"Expected wiki_pages_df to be a DataFrame, but got: {type(wiki_pages_df)}" + ) + + +df = pd.read_json( + "var/fever/shared_task_dev.jsonl", lines=True, encoding="utf-8" +).set_index("id") +print("Loaded original FEVER", len(df)) +df = df[df.label.isin(["SUPPORTS", "REFUTES"])].copy() +print("Filtered original FEVER", len(df)) + + +def evidence_mapper(evidence: list[tuple]): + evidences = {(x[2], x[3]) for x in evidence[0] if x[2] is not None} + return list(evidences) + + +df["unique_evidence"] = df[ + "evidence" +].progress_apply( # pyright: ignore[reportAttributeAccessIssue] + evidence_mapper +) + + +def evidence_mapper_sentence(evidences: list[tuple[str, int]]): + if not isinstance(wiki_pages_df, pd.DataFrame): + raise TypeError( + f"Expected wiki_pages_df to be a DataFrame, but got: {type(wiki_pages_df)}" + ) + + lines = [] + for title, line in evidences: + if title is None or line is None: + continue + title_no_acc = remove_accents(title) + + if title_no_acc not in wiki_pages_df.index: + print(title_no_acc) + continue + + sentence = wiki_pages_df.loc[title_no_acc] + if sentence["lines_split"] is not None and len(sentence["lines_split"]) > line: + sentence = sentence["lines_split"][line] + lines.append((title_no_acc, line, sentence)) + else: + print(sentence) + return list(lines) + + +df["evidence_sentences"] = df[ + "unique_evidence" +].progress_apply( # pyright: ignore[reportAttributeAccessIssue] + evidence_mapper_sentence +) + +bigbench = pd.DataFrame.from_records(bigbench_fever["examples"]).set_index("id") + +tqdm.pandas(desc="Mapping claims to (in) bigbench") +df["claim_in_bigbench"] = df[ + "claim" +].progress_apply( # pyright: ignore[reportAttributeAccessIssue] + lambda x: bigbench.input.str.contains(x).any() +) +tqdm.pandas() + +df["evidence_sentence_count"] = df[ + "evidence_sentences" +].map( # pyright: ignore[reportAttributeAccessIssue] + len +) +print("Mapped bigbench") + +train_df = df[(~df.index.isin(bigbench.index)) & (df["evidence_sentence_count"] > 0)] + +test_df = df[ + (df.index.isin(bigbench.index)) & (df["evidence_sentence_count"] > 0) +].drop( # pyright: ignore[reportAttributeAccessIssue] + columns=["verifiable", "claim_in_bigbench", "evidence"] +) +test_df["unique_evidence"] = test_df[ + "unique_evidence" +].map( # pyright: ignore[reportAttributeAccessIssue] + lambda x: [[str(title), str(sent_id)] for title, sent_id in x] +) +test_df["evidence_sentences"] = test_df[ + "evidence_sentences" +].map( # pyright: ignore[reportAttributeAccessIssue] + lambda x: [[str(title), str(sent_id), str(sent)] for title, sent_id, sent in x] +) +test_df["label"] = test_df["label"] == "SUPPORTS" +test_df.index = test_df.index.astype(pd.StringDtype()) +test_df.claim = test_df.claim.astype(pd.StringDtype()) +test_df["id"] = test_df.index +print("Saving fever test df") +test_df.to_json("fever_test_df.json", orient="records", lines=True) +print("Saved fever test df") + +train_df = df[ + (~df.index.isin(bigbench.index)) & (df["evidence_sentence_count"] > 0) +].drop( # pyright: ignore[reportAttributeAccessIssue] + columns=["verifiable", "claim_in_bigbench", "evidence"] +) +train_df["unique_evidence"] = train_df[ + "unique_evidence" +].map( # pyright: ignore[reportAttributeAccessIssue] + lambda x: [[str(title), str(sent_id)] for title, sent_id in x] +) +train_df["evidence_sentences"] = train_df[ + "evidence_sentences" +].map( # pyright: ignore[reportAttributeAccessIssue] + lambda x: [[str(title), str(sent_id), str(sent)] for title, sent_id, sent in x] +) +train_df["label"] = train_df["label"] == "SUPPORTS" +train_df.index = train_df.index.astype(pd.StringDtype()) +train_df.claim = train_df.claim.astype(pd.StringDtype()) +train_df["id"] = train_df.index +print("Saving fever train df") +train_df.to_json("fever_train_df.json", orient="records", lines=True) +print("Saved fever train df") + +fever_ds = load_dataset( + "json", data_files={"train": "fever_train_df.json", "test": "fever_test_df.json"} +) +if not isinstance(fever_ds, DatasetDict): + raise TypeError(f"Expected fever_ds to be a DatasetDict, but got: {type(fever_ds)}") +fever_ds.save_to_disk("var/fever/fever_reprocessed") +print(fever_ds) + + +articles = list( + set(flatten([[y[0] for y in x] for x in fever_ds["train"]["unique_evidence"]])) +) +article_ds = Dataset.from_dict({"article": articles}) +print(article_ds) + + +article_ds = article_ds.map(lambda x: searcher(x, True), num_proc=4) +article_ds = article_ds.map(lambda x: searcher(x, False), num_proc=1) +article_df = article_ds.to_pandas() +if not isinstance(article_df, pd.DataFrame): + raise TypeError( + f"Expected article_df to be a DataFrame, but got: {type(article_df)}" + ) +article_df = article_df.set_index("article") +print("Articles that did not return a successful response:") +print(article_df[article_df.msg != "success"]) +article_ds.save_to_disk("var/fever/fever_articles") +article_df.to_parquet( + "var/fever/fever_articles.parquet", + index=True, + engine="pyarrow", + compression="zstd", + compression_level=10, +) + + +def search(query: str) -> tuple: + if not isinstance(article_df, pd.DataFrame): + raise TypeError( + f"Expected article_df to be a DataFrame, but got: {type(article_df)}" + ) + row = article_df.loc[query] + return row["wiki"], row["msg"] + + +def trajectorize(row: dict[str, Any]) -> dict[str, Any]: + evidence_sentences = row["evidence_sentences"] + + claim = row["claim"].strip() + task = f"On June 2017, the following claim was made: {claim}\nQ: Was this claim true or false?" + answer = str(row["label"]).lower() + + article_sentence_group = { + k: list(v) for k, v in groupby(evidence_sentences, operator.itemgetter(0)) + } + + sample_articles = {} + statuses = [] + wiki_worked = True + for article in article_sentence_group: + cleaned_article = clean_fever(article) + wiki, worked = search(article) + wiki = wiki.strip() + if worked != "success": + wiki_worked = False + + sample_articles[cleaned_article] = wiki + statuses.append(worked) + all_wiki_success = all(x in {"success", "fallback"} for x in statuses) + + trajectory = [{"task": task}] + + for article, evidences in article_sentence_group.items(): + cleaned_article = clean_fever(article) + trajectory.extend( + [ + {"thought": f"I need to search {cleaned_article}."}, + { + "action": '{"name": "Search", "arguments": {"topic": "' + + cleaned_article + + '"}}' + }, + { + "observation": f"[Document]\n{sample_articles[cleaned_article]}\n[End]" + }, + ] + ) + + for _title, _line, sent in evidences: + trajectory.append({"observation": clean_fever(sent.split("\t")[0])}) + + trajectory.extend( + [ + {"thought": f"The claim is {answer}."}, + {"action": '{"name": "Finish", "arguments": {"topic": "' + answer + '"}}'}, + ] + ) + + traj_keys = [next(iter(t.keys())) for t in trajectory] + traj_values = [next(iter(t.values())) for t in trajectory] + + rewoo_trajectory = [{"task": task}] + + for article, evidences in article_sentence_group.items(): + cleaned_article = clean_fever(article) + rewoo_trajectory.extend( + [ + {"thought": f"Search for more information about {cleaned_article}."}, + { + "action": '{"name": "Search", "arguments": {"topic": "' + + cleaned_article + + '"}}' + }, + { + "observation": f"[Document]\n{sample_articles[cleaned_article]}\n[End]" + }, + ] + ) + + for _title, _line, sent in evidences: + rewoo_trajectory.append({"observation": clean_fever(sent.split("\t")[0])}) + + rewoo_traj_keys = [next(iter(t.keys())) for t in rewoo_trajectory] + rewoo_traj_values = [next(iter(t.values())) for t in rewoo_trajectory] + + return { + "traj_keys": traj_keys, + "traj_values": traj_values, + "rewoo_traj_keys": rewoo_traj_keys, + "rewoo_traj_values": rewoo_traj_values, + "all_wiki_success": all_wiki_success, + "wiki_worked": wiki_worked, + "articles": list(sample_articles.values()), + "statuses": statuses, + } + + +def sentencify(row: dict[str, Any]) -> dict[str, str]: + evidence_sentences = row["evidence_sentences"] + + article_sentence_group = { + clean_fever(k): list(v) + for k, v in groupby(evidence_sentences, operator.itemgetter(0)) + } + + sentences = [] + for evidences in article_sentence_group.values(): + for _title, _line, sent in evidences: + sentences.append(clean_fever(sent.split("\t")[0])) + + return {"cot": " ".join(sentences).strip().replace("\n", " ").strip()} + + +fever_ds = fever_ds.map( + lambda x: {"label": str(x["label"]).lower()}, + num_proc=4, +) + +fever_ds["train"] = ( + fever_ds["train"].map(trajectorize, num_proc=4).map(sentencify, num_proc=4) +) + + +print( + "Wiki lookup failures:", + fever_ds["train"].filter(lambda x: x["all_wiki_success"] is False), +) + + +fever_ds["train"] = fever_ds["train"].filter(lambda x: x["wiki_worked"] is True) +fever_ds["train"] = fever_ds["train"].remove_columns( + column_names=["wiki_worked", "all_wiki_success", "statuses"] +) +print(fever_ds) + +new_split = fever_ds["train"].train_test_split(test_size=1024) +fever_ds["train"] = new_split["train"] +fever_ds["validation"] = new_split["test"] +fever_ds.save_to_disk("var/fever_trajectified") + +# Make sure the saved dataset is loaded correctly +ds = load_from_disk("var/fever_trajectified") +print(ds) diff --git a/examples/optimizer/process_gsm8k.py b/examples/optimizer/process_gsm8k.py new file mode 100644 index 000000000..57911a0c7 --- /dev/null +++ b/examples/optimizer/process_gsm8k.py @@ -0,0 +1,166 @@ +import re +from pathlib import Path +from typing import Any + +from datasets.dataset_dict import DatasetDict +from datasets.load import load_dataset, load_from_disk + +from pdl.optimize.parse_number import parse_number + +# Load original GSM8K dataset and split it into train and validation sets + +var_dir = Path("var") +var_dir.mkdir(parents=True, exist_ok=True) + +gsm8k_orig = load_dataset("openai/gsm8k", "main") +if not isinstance(gsm8k_orig, DatasetDict): + raise TypeError( + f"Expected gsm8k_orig to be a DatasetDict, but got: {type(gsm8k_orig)}" + ) +new_split = gsm8k_orig["train"].train_test_split(test_size=1024) +gsm8k_orig["validation"] = new_split["test"] +gsm8k_orig["train"] = new_split["train"] +gsm8k_orig.save_to_disk("var/gsm8k_split") + +# Make sure the saved dataset is loaded correctly +gsm8k = load_from_disk("var/gsm8k_split") +if not isinstance(gsm8k, DatasetDict): + raise TypeError(f"Expected gsm8k to be a DatasetDict, but got: {type(gsm8k)}") + + +def parse_answers(row: dict[str, Any]) -> dict[str, Any]: + question = row["question"].strip().replace("’", "'").replace(" ", " ") + parts = row["answer"].split("####") + answer = parse_number(parts[-1]) + reasoning = "####".join(parts[:-1]).strip().replace("’", "'").replace(" ", " ") + return { + "question": question, + "answer": answer, + "reasoning": reasoning, + "raw_answer": row["answer"], + "answer_part": parts[-1], + } + + +gsm8k = gsm8k.map(parse_answers) + + +def react_trajectory(row: dict[str, Any]) -> dict[str, list[str]]: + question = row["question"] + answer = row["answer"] + reasoning = row["reasoning"].splitlines() + trajectory = [{"question": question.strip()}] + res = answer + + for line in reasoning: + pattern = ( + r"(?P
(=(\ )?|equals(\ )?)?(\$)?)<<(?P.*?)=(?P.*?)>>([^\s]*)"
+        )
+        expressions = re.search(pattern, line)
+
+        if expressions is None:
+            trajectory += [
+                {"thought": line.strip().replace("  ", " ")},
+            ]
+        else:
+            thought = re.sub(pattern, "", line)
+            thought = thought.rstrip(".").rstrip(",")
+            exp = expressions.group("exp").strip()
+            res = expressions.group("res").strip()
+
+            trajectory += [
+                {
+                    "thought": f"{thought.strip().replace('  ', ' ')}. I need to calculate {exp}"
+                },
+                {
+                    "action": '{"name": "Calculator", "arguments": {"expr": "'
+                    f"{exp}"
+                    '"}}'
+                },
+                {"observation": res},
+            ]
+    if next(iter(trajectory[-1].keys())) == "observation":
+        trajectory.append({"thought": f"The answer is {answer}"})
+
+    trajectory.append(
+        {"action": '{"name": "Finish", "arguments": {"answer": "' + f"{answer}" + '"}}'}
+    )
+
+    traj_keys = [next(iter(t.keys())) for t in trajectory]
+    traj_values = [next(iter(t.values())) for t in trajectory]
+
+    return {
+        "traj_keys": traj_keys,
+        "traj_values": traj_values,
+    }
+
+
+gsm8k["train"] = gsm8k["train"].map(react_trajectory)
+
+
+def rewoo_trajectory(row: dict[str, Any]) -> dict[str, list[str]]:
+    question = row["question"]
+    answer = row["answer"]
+    reasoning = row["reasoning"].splitlines()
+    trajectory = [{"question": question.strip().replace("  ", " ")}]
+    res = answer
+
+    for line in reasoning:
+        pattern = (
+            r"(?P
(=(\ )?|equals(\ )?)?(\$)?)<<(?P.*?)=(?P.*?)>>([^\s]*)"
+        )
+        expressions = re.search(pattern, line)
+
+        if expressions is None:
+            trajectory += [
+                {"thought": line.strip().replace("  ", " ")},
+            ]
+        else:
+            thought = re.sub(pattern, "", line)
+            thought = thought.rstrip(".").rstrip(",")
+            exp = expressions.group("exp").strip()
+            res = expressions.group("res").strip()
+
+            trajectory += [
+                {"thought": f"{thought.strip().replace('  ', ' ')}. Calculate {exp}"},
+                {
+                    "action": '{"name": "Calculator", "arguments": {"expr": "'
+                    f"{exp}"
+                    '"}}'
+                },
+                {"observation": res},
+            ]
+
+    evidence_counter = 0
+    for i, outer in enumerate(trajectory):
+        type_event = next(iter(outer.keys()))
+        value = next(iter(outer.values()))
+
+        if type_event == "action":
+            evidence_counter += 1
+        if type_event == "observation":
+            for j in range(i + 1, len(trajectory)):
+                inner = trajectory[j]
+                inner_type_event = next(iter(inner.keys()))
+                if inner_type_event == "action":
+                    trajectory[j]["action"] = trajectory[j]["action"].replace(
+                        value, f"#E{evidence_counter}"
+                    )
+                elif inner_type_event == "thought":
+                    trajectory[j]["thought"] = trajectory[j]["thought"].replace(
+                        value, f"#E{evidence_counter}"
+                    )
+    traj_keys = [next(iter(t.keys())) for t in trajectory]
+    traj_values = [next(iter(t.values())) for t in trajectory]
+
+    return {"rewoo_traj_keys": traj_keys, "rewoo_traj_values": traj_values}
+
+
+gsm8k["train"] = gsm8k["train"].map(rewoo_trajectory)
+
+# Save the processed dataset
+gsm8k.save_to_disk("var/gsm8k_trajectified")
+
+# Make sure the saved dataset is loaded correctly
+ds = load_from_disk("var/gsm8k_trajectified")
+print(ds)
diff --git a/examples/optimizer/process_mbpp.py b/examples/optimizer/process_mbpp.py
new file mode 100644
index 000000000..c995b9d44
--- /dev/null
+++ b/examples/optimizer/process_mbpp.py
@@ -0,0 +1,79 @@
+# Instructions:
+# 1. Install EvalPlus e.g. `pip install evalplus`
+# 2. Run this script to process the MBPP dataset into a format suitable for evaluation.
+import re
+from pathlib import Path
+from typing import Any
+
+from datasets.dataset_dict import DatasetDict
+from datasets.load import load_dataset, load_from_disk
+from evalplus.data import get_mbpp_plus
+
+var_dir = Path("var")
+var_dir.mkdir(parents=True, exist_ok=True)
+
+mbpp_plus = get_mbpp_plus()
+
+mbpp = load_dataset("google-research-datasets/mbpp", name="full")
+if not isinstance(mbpp, DatasetDict):
+    raise TypeError(f"Expected mbpp to be a DatasetDict, but got: {type(mbpp)}")
+
+mbpp["test"] = mbpp["test"].filter(
+    lambda x: f"Mbpp/{x['task_id']}" in mbpp_plus,
+)
+
+mbpp["validation"] = mbpp["validation"].filter(
+    lambda x: f"Mbpp/{x['task_id']}" in mbpp_plus,
+)
+
+
+def trajectify(row: dict[str, Any]) -> dict[str, list[str]]:
+    code = row["code"].replace("\r\n", "\n").replace("\r", "\n").strip()
+    first_test = row["test_list"][0].strip().lstrip()
+    pattern = r"assert\s+(\w+\(.*?\))\s*==\s*(.+)"
+
+    # Replacement format
+    replacement = r"res = \1\nassert res == \2, \"Expected \2 but got {}\".format(res)"
+
+    # Perform the substitution
+    converted_string = (
+        re.sub(pattern, replacement, first_test)
+        .replace('\\"Expected ', '"Expected ')
+        .replace('{}\\"', '{}"')
+    )
+    code_w_assert = code + "\n" + converted_string.strip()
+    prompt = row["text"].strip() + "\n" + first_test
+
+    trajectory = [
+        {"task": prompt},
+        {
+            "thought": "I should run a solution on the test case before proposing a solution."
+        },
+        {"action": code_w_assert},
+        {"observation": "[Executed Successfully with No Output]"},
+        {"thought": "There is no AssertionError. I can now submit the solution."},
+        {"solution": code},
+    ]
+
+    traj_keys = [next(iter(t.keys())) for t in trajectory]
+    traj_values = [next(iter(t.values())) for t in trajectory]
+
+    return {
+        "react_prompt": prompt,
+        "code": code,
+        "traj_keys": traj_keys,
+        "traj_values": traj_values,
+    }
+
+
+mbpp_trajectified = mbpp.map(trajectify)
+assert len(mbpp_trajectified["train"]) == 374
+assert len(mbpp_trajectified["test"]) == 224
+assert len(mbpp_trajectified["validation"]) == 39
+
+# Save the processed dataset
+mbpp_trajectified.save_to_disk("var/mbpp_trajectified")
+
+# Make sure the saved dataset is loaded correctly
+ds = load_from_disk("var/mbpp_trajectified")
+print(ds)
diff --git a/examples/requirements/email.pdl b/examples/requirements/email.pdl
new file mode 100644
index 000000000..c949b33d3
--- /dev/null
+++ b/examples/requirements/email.pdl
@@ -0,0 +1,42 @@
+description: Hello world calling a model
+defs:
+  eval: 
+    function:
+      requirement: string
+      response: string
+    return:
+      lastOf:
+      - model: ollama_chat/mistral-small:latest 
+        def: result
+        input: |
+          Does the following email end with Kind regards. Answer with a JSON object and a result field with value True or False only.
+          Email: ${ response }
+        parser: json
+      - ${ result.result }
+      
+  fix:
+    function:
+      requirement: string
+      response: string
+    return: 
+      lastOf:
+      - model: ollama_chat/mistral-small:latest 
+        def: instruction
+        input: |
+          A model responded with the following response: ${ response }
+          In order to satisfy the following requirement: ${ requirement }
+          what should be added to the prompt as an instruction?
+
+          Respond with only with the instruction.
+      - ${ pdl_context }
+
+  notes: Olivia helped the lab over the last few weeks by organizing intern events, advertising the speaker series, and handling issues with snack delivery.
+  name: Olivia
+text:
+- "Write an email to ${ name } using the notes following: ${ notes }"
+- model: ollama_chat/granite3.2:2b
+  requirements:
+  - description: The email should end with Kind regards
+    evaluate:  ${ eval }
+    transformContext: ${ fix }
+  retry: 5
diff --git a/examples/sdk/hello_dict.py b/examples/sdk/hello_dict.py
deleted file mode 100644
index 4313898ce..000000000
--- a/examples/sdk/hello_dict.py
+++ /dev/null
@@ -1,22 +0,0 @@
-from pdl.pdl import exec_dict
-
-hello = {
-    "text": [
-        "Hello\n",
-        {
-            "model": "ollama_chat/granite3.2:2b",
-            "parameters": {
-                "stop": ["!"],
-            },
-        },
-    ]
-}
-
-
-def main():
-    result = exec_dict(hello)
-    print(result)
-
-
-if __name__ == "__main__":
-    main()
diff --git a/examples/sdk/hello_prog.py b/examples/sdk/hello_prog.py
deleted file mode 100644
index de0c8b8e8..000000000
--- a/examples/sdk/hello_prog.py
+++ /dev/null
@@ -1,23 +0,0 @@
-from pdl.pdl import exec_program
-from pdl.pdl_ast import LitellmModelBlock, LitellmParameters, Program, TextBlock
-
-hello = Program(
-    TextBlock(
-        text=[
-            "Hello\n",
-            LitellmModelBlock(
-                model="ollama_chat/granite3.2:2b",
-                parameters=LitellmParameters(stop=["!"]),  # pyright: ignore
-            ),
-        ]
-    )
-)
-
-
-def main():
-    result = exec_program(hello)
-    print(result)
-
-
-if __name__ == "__main__":
-    main()
diff --git a/examples/tools/calc.pdl b/examples/tools/calc.pdl
index 2405f3c40..38094f3dc 100644
--- a/examples/tools/calc.pdl
+++ b/examples/tools/calc.pdl
@@ -1,16 +1,20 @@
 description: tool use
 defs:
+  calc:
+    description: Calculator function
+    function:
+      expr:
+        type: string
+        description: Arithmetic expression to calculate
+    return:
+      lang: python
+      code: result = ${ expr }
   tools:
-    data:
-    - name: calc
-      description: Calculator function
-      arguments:
-        expr:
-          type: string
-          description: Arithmetic expression to calculate
+    array:
+      - ${ calc.signature }
 text:
 - role: system
-  text: You are Granite, developed by IBM. You are a helpful AI assistant with access to the following tools. When a tool is required to answer the user's query, respond with <|tool_call|> followed by a JSON list of tools used. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.
+  text: You are Granite, developed by IBM. You are a helpful AI assistant with access to the following tools.
   contribute: [context]
 - role: tools
   content:
@@ -21,11 +25,11 @@ text:
   model: ollama_chat/granite3.2:8b
   parser: json
   spec: [{ name: string, arguments: { expr: string }}]
-  parameters:
-    drop_params: true  # This is needed because the model does not support structured decoding. It directs LiteLLM to ignore parameters sent for structured decoding.
 - "\n"
-- if: ${ actions[0].name == "calc" }
-  then:
-    text:
-    - lang: python
-      code: result = ${ actions[0].arguments.expr }
\ No newline at end of file
+- match: ${ actions[0].name }
+  with:
+  - case: calc
+    then:
+      call: ${ calc }
+      args: 
+        expr: ${ actions[0].arguments.expr }
\ No newline at end of file
diff --git a/examples/tutorial/calling_llm.pdl b/examples/tutorial/calling_llm.pdl
index 00d09ccdd..49209043b 100644
--- a/examples/tutorial/calling_llm.pdl
+++ b/examples/tutorial/calling_llm.pdl
@@ -1,6 +1,6 @@
-description: Hello world calling a model
+description: Calling a model on the implicit background context
 text:
 - "Hello\n"
 - model: ollama_chat/granite3.2:2b
   parameters:
-    stop: ['!']
\ No newline at end of file
+    stop: ['!']
diff --git a/examples/tutorial/calling_llm_with_input.pdl b/examples/tutorial/calling_llm_with_input.pdl
index f16648849..33064cf68 100644
--- a/examples/tutorial/calling_llm_with_input.pdl
+++ b/examples/tutorial/calling_llm_with_input.pdl
@@ -1,4 +1,4 @@
-description: Hello world calling a model
+description: Calling a model with an input text
 text:
 - "Hello\n"
 - model: ollama_chat/granite3.2:2b
diff --git a/examples/tutorial/calling_llm_with_input_messages.pdl b/examples/tutorial/calling_llm_with_input_messages.pdl
index c994d7788..146a9e28f 100644
--- a/examples/tutorial/calling_llm_with_input_messages.pdl
+++ b/examples/tutorial/calling_llm_with_input_messages.pdl
@@ -1,4 +1,4 @@
-description: Hello world calling a model
+description: Calling a model with an explicit list of messages
 text:
 - "Hello\n"
 - model: ollama_chat/granite3.2:2b
diff --git a/examples/tutorial/calling_llm_with_input_messages_var.pdl b/examples/tutorial/calling_llm_with_input_messages_var.pdl
index 831467442..774950391 100644
--- a/examples/tutorial/calling_llm_with_input_messages_var.pdl
+++ b/examples/tutorial/calling_llm_with_input_messages_var.pdl
@@ -3,8 +3,10 @@ defs:
   prompt:
     array:
     - role: system
-      content: You are a helpful software engineer. You write clear, concise, well-commented code.
+      content: You are a helpful assistant that is fluent in French.
     - role: user
-      content: Write a Python function that implement merge sort.
-model: ollama_chat/granite3.2:2b
-input: ${ prompt }
+      content: Translate the word 'Hello' to French
+text:
+- "Hello\n"
+- model: ollama_chat/granite3.2:2b
+  input: ${ prompt }
diff --git a/examples/tutorial/defs-hello.pdl b/examples/tutorial/defs-hello.pdl
deleted file mode 100644
index 477d58822..000000000
--- a/examples/tutorial/defs-hello.pdl
+++ /dev/null
@@ -1,14 +0,0 @@
-description: Hello world with defs
-defs:
-  hello:
-    function:
-      name: string
-    return: Hello ${ name }!
-  bye:
-    "Good bye"
-text:
-- call: ${ hello }
-  args:
-    name: World
-- "\n"
-- ${ bye }
diff --git a/examples/tutorial/defs.pdl b/examples/tutorial/defs.pdl
index e2e49afd0..2bed2a974 100644
--- a/examples/tutorial/defs.pdl
+++ b/examples/tutorial/defs.pdl
@@ -1,22 +1,16 @@
-description: Function def and call
-defs:
-  translate:
-    function:
-      sentence: string
-      language: string
-    return:
+text:
+- "Hello\n"
+- defs:
+    fr:
       lastOf:
-      - "\nTranslate the sentence '${ sentence }' to ${ language }.\n"
+      - "\nTranslate to French\n"
       - model: ollama_chat/granite3.2:2b
-        parameters:
-          stop: ["\n"]
-text:
-- call: ${ translate }
-  args:
-    sentence: I love Paris!
-    language: French
-- "\n"
-- call: ${ translate }
-  args:
-    sentence: I love Madrid!
-    language: Spanish
\ No newline at end of file
+    es:
+      lastOf:
+      - "\nTranslate to Spanish\n"
+      - model: ollama_chat/granite3.2:2b
+  text: |
+  
+    In Fench: ${ fr }
+
+    In Spanish: ${ es }
diff --git a/examples/tutorial/function_alias.pdl b/examples/tutorial/function_alias.pdl
index 23bf7c115..62883c787 100644
--- a/examples/tutorial/function_alias.pdl
+++ b/examples/tutorial/function_alias.pdl
@@ -1,4 +1,4 @@
-description: Hello function
+description: Use a function as a value
 defs:
   hello:
     function:
diff --git a/examples/tutorial/function_call_in_jinja.pdl b/examples/tutorial/function_call_in_jinja.pdl
new file mode 100644
index 000000000..32a74aee8
--- /dev/null
+++ b/examples/tutorial/function_call_in_jinja.pdl
@@ -0,0 +1,14 @@
+description: Calling a PDL function from Jinja
+defs:
+  translate:
+    function:
+      sentence: string
+      language: string
+    return:
+      lastOf:
+      - |
+        Translate the sentence '${ sentence }' to ${ language }.
+        Only give the result of the translation.
+      - model: ollama_chat/granite3.2:2b
+text: |
+  The way to say hello in French is ${ translate("Hello", language="French") }.
diff --git a/examples/tutorial/function_definition.pdl b/examples/tutorial/function_definition.pdl
index dac318dc9..7124eb0c0 100644
--- a/examples/tutorial/function_definition.pdl
+++ b/examples/tutorial/function_definition.pdl
@@ -1,16 +1,16 @@
-description: Function def and call
+description: Function definition and call
+defs:
+  translate:
+    function:
+      sentence: string
+      language: string
+    return:
+      lastOf:
+      - |
+        Translate the sentence '${ sentence }' to ${ language }.
+        Only give the result of the translation.
+      - model: ollama_chat/granite3.2:2b
 text:
-- def: translate
-  function:
-    sentence: string
-    language: string
-  return:
-    lastOf:
-    - "\nTranslate the sentence '${ sentence }' to ${ language }.\n"
-    - model: ollama_chat/granite3.2:2b
-      parameters:
-        stop: ["\n"]
-        temperature: 0
 - call: ${ translate }
   args:
     sentence: I love Paris!
diff --git a/examples/tutorial/function_empty_context.pdl b/examples/tutorial/function_empty_context.pdl
index 54e3c6858..2f2d5dbf2 100644
--- a/examples/tutorial/function_empty_context.pdl
+++ b/examples/tutorial/function_empty_context.pdl
@@ -1,13 +1,24 @@
-description: Hello world with function definition and call
+description: Function call with an empty context
+defs:
+  translate:
+    function:
+      sentence: string
+      language: string
+    return:
+      lastOf:
+      - |
+        Translate the sentence '${ sentence }' to ${ language }.
+        Only give the result of the translation.
+      - model: ollama_chat/granite3.2:2b
 text:
-- def: hello
-  function:
-    name: string
-  return:
-    text:
-    -  Hello ${ name }!
-    - model: ollama_chat/granite3.2:8b
-- call: ${ hello }
+- call: ${ translate }
   args:
-    name: World
+    sentence: I love Paris!
+    language: French
+    pdl_context: []
+- "\n"
+- call: ${ translate }
+  args:
+    sentence: I love Madrid!
+    language: Spanish
     pdl_context: []
diff --git a/examples/tutorial/function_optional_params.pdl b/examples/tutorial/function_optional_params.pdl
index cde3af8ac..880c96632 100644
--- a/examples/tutorial/function_optional_params.pdl
+++ b/examples/tutorial/function_optional_params.pdl
@@ -1,14 +1,19 @@
-description: Hello world with function definition and call
+description: Function with optional parameter
+defs:
+  hello:
+    function:
+      name: string
+      lastName: {optional: string} # optional parameter
+    return:
+      if: ${ lastName is defined }
+      then: Hello ${ name } ${ lastName }!
+      else: Hello ${ name }!
 text:
-- def: hello
-  function:
-    name: string
-    lastName: {optional: string} # optional parameter
-  return:
-    if: ${ lastName is defined }
-    then: Hello ${ name } ${ lastName }!
-    else: Hello ${ name }!
 - call: ${ hello }
   args:
     name: World
-    lastName: Universe
+- "\n"
+- call: ${ hello }
+  args:
+    name: Earth
+    lastName: Planet
diff --git a/examples/tutorial/lastOf.pdl b/examples/tutorial/lastOf.pdl
new file mode 100644
index 000000000..9eacbd655
--- /dev/null
+++ b/examples/tutorial/lastOf.pdl
@@ -0,0 +1,8 @@
+description: Explicit use of role
+role: user
+text:
+- "Hello\n"
+- lastOf:
+  - role: system
+    text: "You are a polite assistant that likes to answer very formally."
+  - model: ollama_chat/granite3.2:2b
diff --git a/examples/tutorial/local_computation.pdl b/examples/tutorial/local_computation.pdl
new file mode 100644
index 000000000..2a22df33a
--- /dev/null
+++ b/examples/tutorial/local_computation.pdl
@@ -0,0 +1,9 @@
+description: Local computations using defs
+text:
+- "Hello\n"
+- defs:
+    GEN:
+      model: ollama_chat/granite3.2:2b
+      parameters:
+        stop: ['!']
+- "The variable GEN is equal to: ${ GEN }"
\ No newline at end of file
diff --git a/examples/tutorial/muting_block_output.pdl b/examples/tutorial/muting_block_output.pdl
index c75b416a0..987617eb1 100644
--- a/examples/tutorial/muting_block_output.pdl
+++ b/examples/tutorial/muting_block_output.pdl
@@ -1,21 +1,11 @@
-description: Function def and call
-defs:
-  translate:
-    function:
-      sentence: string
-      language: string
-    return:
-      text:
-      - text: "\nTranslate the sentence '${ sentence }' to ${ language }.\n"
-        contribute: [context]
-      - model: ollama_chat/granite3.2:2b
-        parameters:
-          stop: ["\n"]
+description: Control block outputs with `contribute`
 text:
-- call: ${ translate }
+- "Hello\n"
+- text: "\nTranslate to French\n"
+  contribute: [context]
+- model: ollama_chat/granite3.2:2b
   contribute: []
-  def: FRENCH
-  args:
-    sentence: I love Paris!
-    language: French
-- "The french sentence was: ${ FRENCH }"
\ No newline at end of file
+  def: fr
+- |
+  
+  In Fench: ${ fr }
diff --git a/examples/tutorial/role.pdl b/examples/tutorial/role.pdl
new file mode 100644
index 000000000..81907fd47
--- /dev/null
+++ b/examples/tutorial/role.pdl
@@ -0,0 +1,7 @@
+description: Explicit use of role
+role: user
+text:
+- "Hello\n"
+- role: system
+  text: "You are a polite assistant that likes to answer very formally."
+- model: ollama_chat/granite3.2:2b
diff --git a/examples/sdk/hello.pdl b/examples/tutorial/sdk/hello.pdl
similarity index 100%
rename from examples/sdk/hello.pdl
rename to examples/tutorial/sdk/hello.pdl
diff --git a/examples/tutorial/sdk/hello_dict.py b/examples/tutorial/sdk/hello_dict.py
new file mode 100644
index 000000000..06a8736dd
--- /dev/null
+++ b/examples/tutorial/sdk/hello_dict.py
@@ -0,0 +1,21 @@
+from pdl.pdl import exec_dict
+
+
+def main():
+    hello = {
+        "text": [
+            "Hello\n",
+            {
+                "model": "ollama_chat/granite3.2:2b",
+                "parameters": {
+                    "stop": ["!"],
+                },
+            },
+        ]
+    }
+    result = exec_dict(hello)
+    print(result)
+
+
+if __name__ == "__main__":
+    main()
diff --git a/examples/sdk/hello_file.py b/examples/tutorial/sdk/hello_file.py
similarity index 100%
rename from examples/sdk/hello_file.py
rename to examples/tutorial/sdk/hello_file.py
diff --git a/examples/tutorial/sdk/hello_parallel.py b/examples/tutorial/sdk/hello_parallel.py
new file mode 100644
index 000000000..6dd7b334c
--- /dev/null
+++ b/examples/tutorial/sdk/hello_parallel.py
@@ -0,0 +1,37 @@
+import concurrent.futures
+
+from pdl.pdl import exec_str
+
+HELLO = """
+text:
+- >+
+  Hello, my name is ${name}
+- model: ollama_chat/granite3.2:2b
+"""
+
+
+def _run_agent(name):
+    pdl_output = exec_str(
+        HELLO,
+        scope={"name": name},
+        config={
+            "yield_result": False,
+            "yield_background": False,
+            "batch": 1,  # disable streaming
+        },
+    )
+    return pdl_output
+
+
+if __name__ == "__main__":
+    data = ["Alice", "Nicolas", "Rosa", "Remi"]
+    with concurrent.futures.ProcessPoolExecutor() as executor:
+        futures = {executor.submit(_run_agent, name) for name in data}
+        executor.map(_run_agent, data)
+        for future in concurrent.futures.as_completed(futures):
+            try:
+                result = future.result()
+            except Exception as e:
+                print(f"Task raised an exception: {e}")
+            else:
+                print(result)
diff --git a/examples/tutorial/sdk/hello_prog.py b/examples/tutorial/sdk/hello_prog.py
new file mode 100644
index 000000000..f6baa420c
--- /dev/null
+++ b/examples/tutorial/sdk/hello_prog.py
@@ -0,0 +1,22 @@
+from pdl.pdl import exec_program
+from pdl.pdl_ast import LitellmModelBlock, LitellmParameters, Program, TextBlock
+
+
+def main():
+    hello = Program(
+        TextBlock(
+            text=[
+                "Hello\n",
+                LitellmModelBlock(
+                    model="ollama_chat/granite3.2:2b",
+                    parameters=LitellmParameters(stop=["!"]),
+                ),
+            ]
+        )
+    )
+    result = exec_program(hello)
+    print(result)
+
+
+if __name__ == "__main__":
+    main()
diff --git a/examples/sdk/hello_str.py b/examples/tutorial/sdk/hello_str.py
similarity index 94%
rename from examples/sdk/hello_str.py
rename to examples/tutorial/sdk/hello_str.py
index 8a6b52c90..40f3810ea 100644
--- a/examples/sdk/hello_str.py
+++ b/examples/tutorial/sdk/hello_str.py
@@ -2,7 +2,8 @@
 
 HELLO = """
 text:
-- "Hello\n"
+- >+
+  Hello
 - model: ollama_chat/granite3.2:2b
   parameters:
     stop: ['!']
diff --git a/examples/tutorial/variable_def_use.pdl b/examples/tutorial/variable_def_use.pdl
index fea5ac9e9..1a0a53f98 100644
--- a/examples/tutorial/variable_def_use.pdl
+++ b/examples/tutorial/variable_def_use.pdl
@@ -1,8 +1,8 @@
-description: Hello world with variable def and use
+description: Variable def and use
 text:
 - "Hello\n"
 - model: ollama_chat/granite3.2:2b
-  def: GEN
   parameters:
     stop: ['!']
-- "\nGEN is equal to: ${ GEN }"
\ No newline at end of file
+  def: GEN
+- "\nThe variable GEN is equal to: ${ GEN }"
\ No newline at end of file
diff --git a/mkdocs.yml b/mkdocs.yml
index 3d5fe3887..2831e62d5 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -47,7 +47,7 @@ nav:
   - API Reference: api_reference.md
   - Contribute: contrib.md
   - Viewer: viewer.md
-  # - AutoPDL: autopdl.md # Hide documentation for now
+  - AutoPDL: autopdl.md
 
 # Define some IBM colors
 extra_css:
diff --git a/pdl-live-react/package-lock.json b/pdl-live-react/package-lock.json
index 8779f9ac8..5a5704ef7 100644
--- a/pdl-live-react/package-lock.json
+++ b/pdl-live-react/package-lock.json
@@ -21,8 +21,8 @@
         "lz-string": "^1.5.0",
         "pretty-bytes": "^7.0.0",
         "pretty-ms": "^9.2.0",
-        "react": "^18.3.1",
-        "react-dom": "^18.3.1",
+        "react": "^19.0.0",
+        "react-dom": "^19.0.0",
         "react-markdown": "^10.0.0",
         "react-router": "^7.1.5",
         "react-syntax-highlighter": "^15.6.1",
@@ -36,11 +36,11 @@
         "@eslint/js": "^9.19.0",
         "@playwright/test": "^1.50.0",
         "@tauri-apps/cli": "^2.3.0",
-        "@types/node": "22.12.0",
-        "@types/react": "^18.3.18",
-        "@types/react-dom": "^18.3.5",
+        "@types/node": "22.17.1",
+        "@types/react": "^19.0.0",
+        "@types/react-dom": "^19.0.0",
         "@types/react-syntax-highlighter": "^15.5.13",
-        "@vitejs/plugin-react": "^4.3.4",
+        "@vitejs/plugin-react": "^5.0.0",
         "concurrently": "^9.1.2",
         "eslint": "^9.19.0",
         "eslint-plugin-react-hooks": "^5.1.0",
@@ -48,9 +48,9 @@
         "globals": "^16.0.0",
         "json-schema-to-typescript": "^15.0.4",
         "prettier": "^3.4.2",
-        "typescript": "5.8",
+        "typescript": "5.9",
         "typescript-eslint": "^8.27.0",
-        "vite": "^6.2.3",
+        "vite": "^7.0.0",
         "vite-plugin-html": "^3.2.2"
       }
     },
@@ -102,9 +102,9 @@
       }
     },
     "node_modules/@babel/compat-data": {
-      "version": "7.27.1",
-      "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.1.tgz",
-      "integrity": "sha512-Q+E+rd/yBzNQhXkG+zQnF58e4zoZfBedaxwzPmicKsiK3nt8iJYrSrDbjwFFDGC4f+rPafqRaPH6TsDoSvMf7A==",
+      "version": "7.28.0",
+      "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz",
+      "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -112,22 +112,22 @@
       }
     },
     "node_modules/@babel/core": {
-      "version": "7.27.1",
-      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.1.tgz",
-      "integrity": "sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ==",
+      "version": "7.28.0",
+      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.0.tgz",
+      "integrity": "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@ampproject/remapping": "^2.2.0",
         "@babel/code-frame": "^7.27.1",
-        "@babel/generator": "^7.27.1",
-        "@babel/helper-compilation-targets": "^7.27.1",
-        "@babel/helper-module-transforms": "^7.27.1",
-        "@babel/helpers": "^7.27.1",
-        "@babel/parser": "^7.27.1",
-        "@babel/template": "^7.27.1",
-        "@babel/traverse": "^7.27.1",
-        "@babel/types": "^7.27.1",
+        "@babel/generator": "^7.28.0",
+        "@babel/helper-compilation-targets": "^7.27.2",
+        "@babel/helper-module-transforms": "^7.27.3",
+        "@babel/helpers": "^7.27.6",
+        "@babel/parser": "^7.28.0",
+        "@babel/template": "^7.27.2",
+        "@babel/traverse": "^7.28.0",
+        "@babel/types": "^7.28.0",
         "convert-source-map": "^2.0.0",
         "debug": "^4.1.0",
         "gensync": "^1.0.0-beta.2",
@@ -143,16 +143,16 @@
       }
     },
     "node_modules/@babel/generator": {
-      "version": "7.27.1",
-      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.1.tgz",
-      "integrity": "sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==",
+      "version": "7.28.0",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz",
+      "integrity": "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/parser": "^7.27.1",
-        "@babel/types": "^7.27.1",
-        "@jridgewell/gen-mapping": "^0.3.5",
-        "@jridgewell/trace-mapping": "^0.3.25",
+        "@babel/parser": "^7.28.0",
+        "@babel/types": "^7.28.0",
+        "@jridgewell/gen-mapping": "^0.3.12",
+        "@jridgewell/trace-mapping": "^0.3.28",
         "jsesc": "^3.0.2"
       },
       "engines": {
@@ -160,13 +160,13 @@
       }
     },
     "node_modules/@babel/helper-compilation-targets": {
-      "version": "7.27.1",
-      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.1.tgz",
-      "integrity": "sha512-2YaDd/Rd9E598B5+WIc8wJPmWETiiJXFYVE60oX8FDohv7rAUU3CQj+A1MgeEmcsk2+dQuEjIe/GDvig0SqL4g==",
+      "version": "7.27.2",
+      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz",
+      "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/compat-data": "^7.27.1",
+        "@babel/compat-data": "^7.27.2",
         "@babel/helper-validator-option": "^7.27.1",
         "browserslist": "^4.24.0",
         "lru-cache": "^5.1.1",
@@ -176,6 +176,16 @@
         "node": ">=6.9.0"
       }
     },
+    "node_modules/@babel/helper-globals": {
+      "version": "7.28.0",
+      "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
+      "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
     "node_modules/@babel/helper-module-imports": {
       "version": "7.27.1",
       "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz",
@@ -191,15 +201,15 @@
       }
     },
     "node_modules/@babel/helper-module-transforms": {
-      "version": "7.27.1",
-      "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.1.tgz",
-      "integrity": "sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g==",
+      "version": "7.27.3",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz",
+      "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/helper-module-imports": "^7.27.1",
         "@babel/helper-validator-identifier": "^7.27.1",
-        "@babel/traverse": "^7.27.1"
+        "@babel/traverse": "^7.27.3"
       },
       "engines": {
         "node": ">=6.9.0"
@@ -249,27 +259,27 @@
       }
     },
     "node_modules/@babel/helpers": {
-      "version": "7.27.1",
-      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.1.tgz",
-      "integrity": "sha512-FCvFTm0sWV8Fxhpp2McP5/W53GPllQ9QeQ7SiqGWjMf/LVG07lFa5+pgK05IRhVwtvafT22KF+ZSnM9I545CvQ==",
+      "version": "7.27.6",
+      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz",
+      "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/template": "^7.27.1",
-        "@babel/types": "^7.27.1"
+        "@babel/template": "^7.27.2",
+        "@babel/types": "^7.27.6"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/parser": {
-      "version": "7.27.1",
-      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.1.tgz",
-      "integrity": "sha512-I0dZ3ZpCrJ1c04OqlNsQcKiZlsrXf/kkE4FXzID9rIOYICsAbA8mMDzhW/luRNAHdCNt7os/u8wenklZDlUVUQ==",
+      "version": "7.28.0",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz",
+      "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/types": "^7.27.1"
+        "@babel/types": "^7.28.0"
       },
       "bin": {
         "parser": "bin/babel-parser.js"
@@ -320,14 +330,14 @@
       }
     },
     "node_modules/@babel/template": {
-      "version": "7.27.1",
-      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.1.tgz",
-      "integrity": "sha512-Fyo3ghWMqkHHpHQCoBs2VnYjR4iWFFjguTDEqA5WgZDOrFesVjMhMM2FSqTKSoUSDO1VQtavj8NFpdRBEvJTtg==",
+      "version": "7.27.2",
+      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz",
+      "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/code-frame": "^7.27.1",
-        "@babel/parser": "^7.27.1",
+        "@babel/parser": "^7.27.2",
         "@babel/types": "^7.27.1"
       },
       "engines": {
@@ -335,38 +345,28 @@
       }
     },
     "node_modules/@babel/traverse": {
-      "version": "7.27.1",
-      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.1.tgz",
-      "integrity": "sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==",
+      "version": "7.28.0",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.0.tgz",
+      "integrity": "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/code-frame": "^7.27.1",
-        "@babel/generator": "^7.27.1",
-        "@babel/parser": "^7.27.1",
-        "@babel/template": "^7.27.1",
-        "@babel/types": "^7.27.1",
-        "debug": "^4.3.1",
-        "globals": "^11.1.0"
+        "@babel/generator": "^7.28.0",
+        "@babel/helper-globals": "^7.28.0",
+        "@babel/parser": "^7.28.0",
+        "@babel/template": "^7.27.2",
+        "@babel/types": "^7.28.0",
+        "debug": "^4.3.1"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
-    "node_modules/@babel/traverse/node_modules/globals": {
-      "version": "11.12.0",
-      "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
-      "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=4"
-      }
-    },
     "node_modules/@babel/types": {
-      "version": "7.27.1",
-      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.1.tgz",
-      "integrity": "sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==",
+      "version": "7.28.0",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.0.tgz",
+      "integrity": "sha512-jYnje+JyZG5YThjHiF28oT4SIZLnYOcSBb6+SDaFIyzDVSkXQmQQYclJ2R+YxcdmK0AX6x1E5OQNtuh3jHDrUg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -845,9 +845,9 @@
       }
     },
     "node_modules/@eslint/config-array": {
-      "version": "0.20.0",
-      "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz",
-      "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==",
+      "version": "0.21.0",
+      "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz",
+      "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==",
       "dev": true,
       "license": "Apache-2.0",
       "dependencies": {
@@ -860,9 +860,9 @@
       }
     },
     "node_modules/@eslint/config-helpers": {
-      "version": "0.2.2",
-      "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz",
-      "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==",
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz",
+      "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==",
       "dev": true,
       "license": "Apache-2.0",
       "engines": {
@@ -870,9 +870,9 @@
       }
     },
     "node_modules/@eslint/core": {
-      "version": "0.13.0",
-      "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz",
-      "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==",
+      "version": "0.15.2",
+      "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz",
+      "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==",
       "dev": true,
       "license": "Apache-2.0",
       "dependencies": {
@@ -920,13 +920,16 @@
       }
     },
     "node_modules/@eslint/js": {
-      "version": "9.26.0",
-      "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.26.0.tgz",
-      "integrity": "sha512-I9XlJawFdSMvWjDt6wksMCrgns5ggLNfFwFvnShsleWruvXM514Qxk8V246efTw+eo9JABvVz+u3q2RiAowKxQ==",
+      "version": "9.33.0",
+      "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.33.0.tgz",
+      "integrity": "sha512-5K1/mKhWaMfreBGJTwval43JJmkip0RmM+3+IuqupeSKNC/Th2Kc7ucaq5ovTSra/OOKB9c58CGSz3QMVbWt0A==",
       "dev": true,
       "license": "MIT",
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      },
+      "funding": {
+        "url": "https://eslint.org/donate"
       }
     },
     "node_modules/@eslint/object-schema": {
@@ -940,13 +943,13 @@
       }
     },
     "node_modules/@eslint/plugin-kit": {
-      "version": "0.2.8",
-      "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz",
-      "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==",
+      "version": "0.3.5",
+      "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz",
+      "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==",
       "dev": true,
       "license": "Apache-2.0",
       "dependencies": {
-        "@eslint/core": "^0.13.0",
+        "@eslint/core": "^0.15.2",
         "levn": "^0.4.1"
       },
       "engines": {
@@ -1020,18 +1023,14 @@
       }
     },
     "node_modules/@jridgewell/gen-mapping": {
-      "version": "0.3.8",
-      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
-      "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
+      "version": "0.3.12",
+      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz",
+      "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@jridgewell/set-array": "^1.2.1",
-        "@jridgewell/sourcemap-codec": "^1.4.10",
+        "@jridgewell/sourcemap-codec": "^1.5.0",
         "@jridgewell/trace-mapping": "^0.3.24"
-      },
-      "engines": {
-        "node": ">=6.0.0"
       }
     },
     "node_modules/@jridgewell/resolve-uri": {
@@ -1044,16 +1043,6 @@
         "node": ">=6.0.0"
       }
     },
-    "node_modules/@jridgewell/set-array": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
-      "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=6.0.0"
-      }
-    },
     "node_modules/@jridgewell/source-map": {
       "version": "0.3.6",
       "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz",
@@ -1073,9 +1062,9 @@
       "license": "MIT"
     },
     "node_modules/@jridgewell/trace-mapping": {
-      "version": "0.3.25",
-      "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
-      "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
+      "version": "0.3.29",
+      "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz",
+      "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -1090,28 +1079,6 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/@modelcontextprotocol/sdk": {
-      "version": "1.11.0",
-      "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.11.0.tgz",
-      "integrity": "sha512-k/1pb70eD638anoi0e8wUGAlbMJXyvdV4p62Ko+EZ7eBe1xMx8Uhak1R5DgfoofsK5IBBnRwsYGTaLZl+6/+RQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "content-type": "^1.0.5",
-        "cors": "^2.8.5",
-        "cross-spawn": "^7.0.3",
-        "eventsource": "^3.0.2",
-        "express": "^5.0.1",
-        "express-rate-limit": "^7.5.0",
-        "pkce-challenge": "^5.0.0",
-        "raw-body": "^3.0.0",
-        "zod": "^3.23.8",
-        "zod-to-json-schema": "^3.24.1"
-      },
-      "engines": {
-        "node": ">=18"
-      }
-    },
     "node_modules/@monaco-editor/loader": {
       "version": "1.5.0",
       "resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.5.0.tgz",
@@ -1174,71 +1141,71 @@
       }
     },
     "node_modules/@patternfly/react-code-editor": {
-      "version": "6.2.2",
-      "resolved": "https://registry.npmjs.org/@patternfly/react-code-editor/-/react-code-editor-6.2.2.tgz",
-      "integrity": "sha512-KPnkNP769afD2rvoNQtgCx+SYscamM5QSRmw2FJ9QPHVMksarwTsMvrdMxvu+n6Dhs/T40vQLU5UR7X2yPrURg==",
+      "version": "6.3.1",
+      "resolved": "https://registry.npmjs.org/@patternfly/react-code-editor/-/react-code-editor-6.3.1.tgz",
+      "integrity": "sha512-lzrION96CR2G3ASjE++dX/dExH08HVcCLXbHdmiiTL4eHfbqXt4edDc+UX619XrbaccJBE+BxNNGKyO8bgpKRg==",
       "license": "MIT",
       "dependencies": {
         "@monaco-editor/react": "^4.6.0",
-        "@patternfly/react-core": "^6.2.2",
-        "@patternfly/react-icons": "^6.2.2",
-        "@patternfly/react-styles": "^6.2.2",
+        "@patternfly/react-core": "^6.3.1",
+        "@patternfly/react-icons": "^6.3.1",
+        "@patternfly/react-styles": "^6.3.1",
         "react-dropzone": "14.3.5",
         "tslib": "^2.8.1"
       },
       "peerDependencies": {
-        "react": "^17 || ^18",
-        "react-dom": "^17 || ^18"
+        "react": "^17 || ^18 || ^19",
+        "react-dom": "^17 || ^18 || ^19"
       }
     },
     "node_modules/@patternfly/react-core": {
-      "version": "6.2.2",
-      "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-6.2.2.tgz",
-      "integrity": "sha512-JUrZ57JQ4bkmed1kxaciXb0ZpIVYyCHc2HjtzoKQ5UNRlx204zR2isATSHjdw2GFcWvwpkC5/fU2BR+oT3opbg==",
+      "version": "6.3.1",
+      "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-6.3.1.tgz",
+      "integrity": "sha512-1qV20nU4M6PA28qnikH9fPLQlkteaZZToFlATjBNBw7aUI6zIvj7U0akkHz8raWcfHAI+tAzGV7dfKjiv035/g==",
       "license": "MIT",
       "dependencies": {
-        "@patternfly/react-icons": "^6.2.2",
-        "@patternfly/react-styles": "^6.2.2",
-        "@patternfly/react-tokens": "^6.2.2",
+        "@patternfly/react-icons": "^6.3.1",
+        "@patternfly/react-styles": "^6.3.1",
+        "@patternfly/react-tokens": "^6.3.1",
         "focus-trap": "7.6.4",
         "react-dropzone": "^14.3.5",
         "tslib": "^2.8.1"
       },
       "peerDependencies": {
-        "react": "^17 || ^18",
-        "react-dom": "^17 || ^18"
+        "react": "^17 || ^18 || ^19",
+        "react-dom": "^17 || ^18 || ^19"
       }
     },
     "node_modules/@patternfly/react-icons": {
-      "version": "6.2.2",
-      "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-6.2.2.tgz",
-      "integrity": "sha512-XkBwzuV/uiolX+T6QgB3RIqphM1m+vAZjAe3McYtyY22j1rsOdlWDE4RtRrJ1q7EoIZwyZHj0h8T9vMfUsLn4Q==",
+      "version": "6.3.1",
+      "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-6.3.1.tgz",
+      "integrity": "sha512-uiMounSIww1iZLM4pq+X8c3upzwl9iowXRPjR5CA8entb70lwgAXg3PqvypnuTAcilTq1Y3k5sFTqkhz7rgKcQ==",
       "license": "MIT",
       "peerDependencies": {
-        "react": "^17 || ^18",
-        "react-dom": "^17 || ^18"
+        "react": "^17 || ^18 || ^19",
+        "react-dom": "^17 || ^18 || ^19"
       }
     },
     "node_modules/@patternfly/react-styles": {
-      "version": "6.2.2",
-      "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-6.2.2.tgz",
-      "integrity": "sha512-rncRDq66H8VnLyb9DrHHlZtPddlpNL9+W0XuQC0L7F6p78hOwSZmoGTW2Vq8/wJplDj8h/61qRpfRF9VEYPW0g==",
+      "version": "6.3.1",
+      "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-6.3.1.tgz",
+      "integrity": "sha512-hyb+PlO8YITjKh2wBvjdeZhX6FyB3hlf4r6yG4rPOHk4SgneXHjNSdGwQ3szAxgGqtbENCYtOqwD/8ai72GrxQ==",
       "license": "MIT"
     },
     "node_modules/@patternfly/react-tokens": {
-      "version": "6.2.2",
-      "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-6.2.2.tgz",
-      "integrity": "sha512-2GRWDPBTrcTlGNFc5NPJjrjEVU90RpgcGX/CIe2MplLgM32tpVIkeUtqIoJPLRk5GrbhyFuHJYRU+O93gU4o3Q==",
+      "version": "6.3.1",
+      "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-6.3.1.tgz",
+      "integrity": "sha512-wt/xKU1tGCDXUueFb+8/Cwxlm4vUD/Xl26O8MxbSLm6NZAHOUPwytJ7gugloGSPvc/zcsXxEgKANL8UZNO6DTw==",
       "license": "MIT"
     },
     "node_modules/@playwright/test": {
-      "version": "1.52.0",
-      "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.52.0.tgz",
-      "integrity": "sha512-uh6W7sb55hl7D6vsAeA+V2p5JnlAqzhqFyF0VcJkKZXkgnFcVG9PziERRHQfPLfNGx1C292a4JqbWzhR8L4R1g==",
+      "version": "1.54.2",
+      "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.54.2.tgz",
+      "integrity": "sha512-A+znathYxPf+72riFd1r1ovOLqsIIB0jKIoPjyK2kqEIe30/6jF6BC7QNluHuwUmsD2tv1XZVugN8GqfTMOxsA==",
       "dev": true,
       "license": "Apache-2.0",
       "dependencies": {
-        "playwright": "1.52.0"
+        "playwright": "1.54.2"
       },
       "bin": {
         "playwright": "cli.js"
@@ -1247,6 +1214,13 @@
         "node": ">=18"
       }
     },
+    "node_modules/@rolldown/pluginutils": {
+      "version": "1.0.0-beta.30",
+      "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.30.tgz",
+      "integrity": "sha512-whXaSoNUFiyDAjkUF8OBpOm77Szdbk5lGNqFe6CbVbJFrhCCPinCbRA3NjawwlNHla1No7xvXXh+CpSxnPfUEw==",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/@rollup/pluginutils": {
       "version": "4.2.1",
       "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
@@ -1275,9 +1249,9 @@
       }
     },
     "node_modules/@rollup/rollup-android-arm-eabi": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.1.tgz",
-      "integrity": "sha512-kxz0YeeCrRUHz3zyqvd7n+TVRlNyTifBsmnmNPtk3hQURUyG9eAB+usz6DAwagMusjx/zb3AjvDUvhFGDAexGw==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.2.tgz",
+      "integrity": "sha512-Zj3Hl6sN34xJtMv7Anwb5Gu01yujyE/cLBDB2gnHTAHaWS1Z38L7kuSG+oAh0giZMqG060f/YBStXtMH6FvPMA==",
       "cpu": [
         "arm"
       ],
@@ -1289,9 +1263,9 @@
       ]
     },
     "node_modules/@rollup/rollup-android-arm64": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.1.tgz",
-      "integrity": "sha512-PPkxTOisoNC6TpnDKatjKkjRMsdaWIhyuMkA4UsBXT9WEZY4uHezBTjs6Vl4PbqQQeu6oION1w2voYZv9yquCw==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.46.2.tgz",
+      "integrity": "sha512-nTeCWY83kN64oQ5MGz3CgtPx8NSOhC5lWtsjTs+8JAJNLcP3QbLCtDDgUKQc/Ro/frpMq4SHUaHN6AMltcEoLQ==",
       "cpu": [
         "arm64"
       ],
@@ -1303,9 +1277,9 @@
       ]
     },
     "node_modules/@rollup/rollup-darwin-arm64": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.1.tgz",
-      "integrity": "sha512-VWXGISWFY18v/0JyNUy4A46KCFCb9NVsH+1100XP31lud+TzlezBbz24CYzbnA4x6w4hx+NYCXDfnvDVO6lcAA==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.46.2.tgz",
+      "integrity": "sha512-HV7bW2Fb/F5KPdM/9bApunQh68YVDU8sO8BvcW9OngQVN3HHHkw99wFupuUJfGR9pYLLAjcAOA6iO+evsbBaPQ==",
       "cpu": [
         "arm64"
       ],
@@ -1317,9 +1291,9 @@
       ]
     },
     "node_modules/@rollup/rollup-darwin-x64": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.1.tgz",
-      "integrity": "sha512-nIwkXafAI1/QCS7pxSpv/ZtFW6TXcNUEHAIA9EIyw5OzxJZQ1YDrX+CL6JAIQgZ33CInl1R6mHet9Y/UZTg2Bw==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.46.2.tgz",
+      "integrity": "sha512-SSj8TlYV5nJixSsm/y3QXfhspSiLYP11zpfwp6G/YDXctf3Xkdnk4woJIF5VQe0of2OjzTt8EsxnJDCdHd2xMA==",
       "cpu": [
         "x64"
       ],
@@ -1331,9 +1305,9 @@
       ]
     },
     "node_modules/@rollup/rollup-freebsd-arm64": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.1.tgz",
-      "integrity": "sha512-BdrLJ2mHTrIYdaS2I99mriyJfGGenSaP+UwGi1kB9BLOCu9SR8ZpbkmmalKIALnRw24kM7qCN0IOm6L0S44iWw==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.46.2.tgz",
+      "integrity": "sha512-ZyrsG4TIT9xnOlLsSSi9w/X29tCbK1yegE49RYm3tu3wF1L/B6LVMqnEWyDB26d9Ecx9zrmXCiPmIabVuLmNSg==",
       "cpu": [
         "arm64"
       ],
@@ -1345,9 +1319,9 @@
       ]
     },
     "node_modules/@rollup/rollup-freebsd-x64": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.1.tgz",
-      "integrity": "sha512-VXeo/puqvCG8JBPNZXZf5Dqq7BzElNJzHRRw3vjBE27WujdzuOPecDPc/+1DcdcTptNBep3861jNq0mYkT8Z6Q==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.46.2.tgz",
+      "integrity": "sha512-pCgHFoOECwVCJ5GFq8+gR8SBKnMO+xe5UEqbemxBpCKYQddRQMgomv1104RnLSg7nNvgKy05sLsY51+OVRyiVw==",
       "cpu": [
         "x64"
       ],
@@ -1359,9 +1333,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.1.tgz",
-      "integrity": "sha512-ehSKrewwsESPt1TgSE/na9nIhWCosfGSFqv7vwEtjyAqZcvbGIg4JAcV7ZEh2tfj/IlfBeZjgOXm35iOOjadcg==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.46.2.tgz",
+      "integrity": "sha512-EtP8aquZ0xQg0ETFcxUbU71MZlHaw9MChwrQzatiE8U/bvi5uv/oChExXC4mWhjiqK7azGJBqU0tt5H123SzVA==",
       "cpu": [
         "arm"
       ],
@@ -1373,9 +1347,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-arm-musleabihf": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.1.tgz",
-      "integrity": "sha512-m39iO/aaurh5FVIu/F4/Zsl8xppd76S4qoID8E+dSRQvTyZTOI2gVk3T4oqzfq1PtcvOfAVlwLMK3KRQMaR8lg==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.46.2.tgz",
+      "integrity": "sha512-qO7F7U3u1nfxYRPM8HqFtLd+raev2K137dsV08q/LRKRLEc7RsiDWihUnrINdsWQxPR9jqZ8DIIZ1zJJAm5PjQ==",
       "cpu": [
         "arm"
       ],
@@ -1387,9 +1361,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-arm64-gnu": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.1.tgz",
-      "integrity": "sha512-Y+GHnGaku4aVLSgrT0uWe2o2Rq8te9hi+MwqGF9r9ORgXhmHK5Q71N757u0F8yU1OIwUIFy6YiJtKjtyktk5hg==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.46.2.tgz",
+      "integrity": "sha512-3dRaqLfcOXYsfvw5xMrxAk9Lb1f395gkoBYzSFcc/scgRFptRXL9DOaDpMiehf9CO8ZDRJW2z45b6fpU5nwjng==",
       "cpu": [
         "arm64"
       ],
@@ -1401,9 +1375,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-arm64-musl": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.1.tgz",
-      "integrity": "sha512-jEwjn3jCA+tQGswK3aEWcD09/7M5wGwc6+flhva7dsQNRZZTe30vkalgIzV4tjkopsTS9Jd7Y1Bsj6a4lzz8gQ==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.46.2.tgz",
+      "integrity": "sha512-fhHFTutA7SM+IrR6lIfiHskxmpmPTJUXpWIsBXpeEwNgZzZZSg/q4i6FU4J8qOGyJ0TR+wXBwx/L7Ho9z0+uDg==",
       "cpu": [
         "arm64"
       ],
@@ -1415,9 +1389,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.1.tgz",
-      "integrity": "sha512-ySyWikVhNzv+BV/IDCsrraOAZ3UaC8SZB67FZlqVwXwnFhPihOso9rPOxzZbjp81suB1O2Topw+6Ug3JNegejQ==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.46.2.tgz",
+      "integrity": "sha512-i7wfGFXu8x4+FRqPymzjD+Hyav8l95UIZ773j7J7zRYc3Xsxy2wIn4x+llpunexXe6laaO72iEjeeGyUFmjKeA==",
       "cpu": [
         "loong64"
       ],
@@ -1428,10 +1402,10 @@
         "linux"
       ]
     },
-    "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.1.tgz",
-      "integrity": "sha512-BvvA64QxZlh7WZWqDPPdt0GH4bznuL6uOO1pmgPnnv86rpUpc8ZxgZwcEgXvo02GRIZX1hQ0j0pAnhwkhwPqWg==",
+    "node_modules/@rollup/rollup-linux-ppc64-gnu": {
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.46.2.tgz",
+      "integrity": "sha512-B/l0dFcHVUnqcGZWKcWBSV2PF01YUt0Rvlurci5P+neqY/yMKchGU8ullZvIv5e8Y1C6wOn+U03mrDylP5q9Yw==",
       "cpu": [
         "ppc64"
       ],
@@ -1443,9 +1417,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-riscv64-gnu": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.1.tgz",
-      "integrity": "sha512-EQSP+8+1VuSulm9RKSMKitTav89fKbHymTf25n5+Yr6gAPZxYWpj3DzAsQqoaHAk9YX2lwEyAf9S4W8F4l3VBQ==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.46.2.tgz",
+      "integrity": "sha512-32k4ENb5ygtkMwPMucAb8MtV8olkPT03oiTxJbgkJa7lJ7dZMr0GCFJlyvy+K8iq7F/iuOr41ZdUHaOiqyR3iQ==",
       "cpu": [
         "riscv64"
       ],
@@ -1457,9 +1431,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-riscv64-musl": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.1.tgz",
-      "integrity": "sha512-n/vQ4xRZXKuIpqukkMXZt9RWdl+2zgGNx7Uda8NtmLJ06NL8jiHxUawbwC+hdSq1rrw/9CghCpEONor+l1e2gA==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.46.2.tgz",
+      "integrity": "sha512-t5B2loThlFEauloaQkZg9gxV05BYeITLvLkWOkRXogP4qHXLkWSbSHKM9S6H1schf/0YGP/qNKtiISlxvfmmZw==",
       "cpu": [
         "riscv64"
       ],
@@ -1471,9 +1445,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-s390x-gnu": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.1.tgz",
-      "integrity": "sha512-h8d28xzYb98fMQKUz0w2fMc1XuGzLLjdyxVIbhbil4ELfk5/orZlSTpF/xdI9C8K0I8lCkq+1En2RJsawZekkg==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.46.2.tgz",
+      "integrity": "sha512-YKjekwTEKgbB7n17gmODSmJVUIvj8CX7q5442/CK80L8nqOUbMtf8b01QkG3jOqyr1rotrAnW6B/qiHwfcuWQA==",
       "cpu": [
         "s390x"
       ],
@@ -1485,9 +1459,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-x64-gnu": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.1.tgz",
-      "integrity": "sha512-XiK5z70PEFEFqcNj3/zRSz/qX4bp4QIraTy9QjwJAb/Z8GM7kVUsD0Uk8maIPeTyPCP03ChdI+VVmJriKYbRHQ==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.2.tgz",
+      "integrity": "sha512-Jj5a9RUoe5ra+MEyERkDKLwTXVu6s3aACP51nkfnK9wJTraCC8IMe3snOfALkrjTYd2G1ViE1hICj0fZ7ALBPA==",
       "cpu": [
         "x64"
       ],
@@ -1499,9 +1473,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-x64-musl": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.1.tgz",
-      "integrity": "sha512-2BRORitq5rQ4Da9blVovzNCMaUlyKrzMSvkVR0D4qPuOy/+pMCrh1d7o01RATwVy+6Fa1WBw+da7QPeLWU/1mQ==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.46.2.tgz",
+      "integrity": "sha512-7kX69DIrBeD7yNp4A5b81izs8BqoZkCIaxQaOpumcJ1S/kmqNFjPhDu1LHeVXv0SexfHQv5cqHsxLOjETuqDuA==",
       "cpu": [
         "x64"
       ],
@@ -1513,9 +1487,9 @@
       ]
     },
     "node_modules/@rollup/rollup-win32-arm64-msvc": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.1.tgz",
-      "integrity": "sha512-b2bcNm9Kbde03H+q+Jjw9tSfhYkzrDUf2d5MAd1bOJuVplXvFhWz7tRtWvD8/ORZi7qSCy0idW6tf2HgxSXQSg==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.46.2.tgz",
+      "integrity": "sha512-wiJWMIpeaak/jsbaq2HMh/rzZxHVW1rU6coyeNNpMwk5isiPjSTx0a4YLSlYDwBH/WBvLz+EtsNqQScZTLJy3g==",
       "cpu": [
         "arm64"
       ],
@@ -1527,9 +1501,9 @@
       ]
     },
     "node_modules/@rollup/rollup-win32-ia32-msvc": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.1.tgz",
-      "integrity": "sha512-DfcogW8N7Zg7llVEfpqWMZcaErKfsj9VvmfSyRjCyo4BI3wPEfrzTtJkZG6gKP/Z92wFm6rz2aDO7/JfiR/whA==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.46.2.tgz",
+      "integrity": "sha512-gBgaUDESVzMgWZhcyjfs9QFK16D8K6QZpwAaVNJxYDLHWayOta4ZMjGm/vsAEy3hvlS2GosVFlBlP9/Wb85DqQ==",
       "cpu": [
         "ia32"
       ],
@@ -1541,9 +1515,9 @@
       ]
     },
     "node_modules/@rollup/rollup-win32-x64-msvc": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.1.tgz",
-      "integrity": "sha512-ECyOuDeH3C1I8jH2MK1RtBJW+YPMvSfT0a5NN0nHfQYnDSJ6tUiZH3gzwVP5/Kfh/+Tt7tpWVF9LXNTnhTJ3kA==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.46.2.tgz",
+      "integrity": "sha512-CvUo2ixeIQGtF6WvuB87XWqPQkoFAFqW+HUo/WzHwuHDvIwZCtjdWXoYCcr06iKGydiqTclC4jU/TNObC/xKZg==",
       "cpu": [
         "x64"
       ],
@@ -1555,9 +1529,9 @@
       ]
     },
     "node_modules/@tauri-apps/api": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.5.0.tgz",
-      "integrity": "sha512-Ldux4ip+HGAcPUmuLT8EIkk6yafl5vK0P0c0byzAKzxJh7vxelVtdPONjfgTm96PbN24yjZNESY8CKo8qniluA==",
+      "version": "2.7.0",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.7.0.tgz",
+      "integrity": "sha512-v7fVE8jqBl8xJFOcBafDzXFc8FnicoH3j8o8DNNs0tHuEBmXUDqrCOAzMRX0UkfpwqZLqvrvK0GNQ45DfnoVDg==",
       "license": "Apache-2.0 OR MIT",
       "funding": {
         "type": "opencollective",
@@ -1565,9 +1539,9 @@
       }
     },
     "node_modules/@tauri-apps/cli": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.5.0.tgz",
-      "integrity": "sha512-rAtHqG0Gh/IWLjN2zTf3nZqYqbo81oMbqop56rGTjrlWk9pTTAjkqOjSL9XQLIMZ3RbeVjveCqqCA0s8RnLdMg==",
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.7.1.tgz",
+      "integrity": "sha512-RcGWR4jOUEl92w3uvI0h61Llkfj9lwGD1iwvDRD2isMrDhOzjeeeVn9aGzeW1jubQ/kAbMYfydcA4BA0Cy733Q==",
       "dev": true,
       "license": "Apache-2.0 OR MIT",
       "bin": {
@@ -1581,23 +1555,23 @@
         "url": "https://opencollective.com/tauri"
       },
       "optionalDependencies": {
-        "@tauri-apps/cli-darwin-arm64": "2.5.0",
-        "@tauri-apps/cli-darwin-x64": "2.5.0",
-        "@tauri-apps/cli-linux-arm-gnueabihf": "2.5.0",
-        "@tauri-apps/cli-linux-arm64-gnu": "2.5.0",
-        "@tauri-apps/cli-linux-arm64-musl": "2.5.0",
-        "@tauri-apps/cli-linux-riscv64-gnu": "2.5.0",
-        "@tauri-apps/cli-linux-x64-gnu": "2.5.0",
-        "@tauri-apps/cli-linux-x64-musl": "2.5.0",
-        "@tauri-apps/cli-win32-arm64-msvc": "2.5.0",
-        "@tauri-apps/cli-win32-ia32-msvc": "2.5.0",
-        "@tauri-apps/cli-win32-x64-msvc": "2.5.0"
+        "@tauri-apps/cli-darwin-arm64": "2.7.1",
+        "@tauri-apps/cli-darwin-x64": "2.7.1",
+        "@tauri-apps/cli-linux-arm-gnueabihf": "2.7.1",
+        "@tauri-apps/cli-linux-arm64-gnu": "2.7.1",
+        "@tauri-apps/cli-linux-arm64-musl": "2.7.1",
+        "@tauri-apps/cli-linux-riscv64-gnu": "2.7.1",
+        "@tauri-apps/cli-linux-x64-gnu": "2.7.1",
+        "@tauri-apps/cli-linux-x64-musl": "2.7.1",
+        "@tauri-apps/cli-win32-arm64-msvc": "2.7.1",
+        "@tauri-apps/cli-win32-ia32-msvc": "2.7.1",
+        "@tauri-apps/cli-win32-x64-msvc": "2.7.1"
       }
     },
     "node_modules/@tauri-apps/cli-darwin-arm64": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.5.0.tgz",
-      "integrity": "sha512-VuVAeTFq86dfpoBDNYAdtQVLbP0+2EKCHIIhkaxjeoPARR0sLpFHz2zs0PcFU76e+KAaxtEtAJAXGNUc8E1PzQ==",
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.7.1.tgz",
+      "integrity": "sha512-j2NXQN6+08G03xYiyKDKqbCV2Txt+hUKg0a8hYr92AmoCU8fgCjHyva/p16lGFGUG3P2Yu0xiNe1hXL9ZuRMzA==",
       "cpu": [
         "arm64"
       ],
@@ -1612,9 +1586,9 @@
       }
     },
     "node_modules/@tauri-apps/cli-darwin-x64": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.5.0.tgz",
-      "integrity": "sha512-hUF01sC06cZVa8+I0/VtsHOk9BbO75rd+YdtHJ48xTdcYaQ5QIwL4yZz9OR1AKBTaUYhBam8UX9Pvd5V2/4Dpw==",
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.7.1.tgz",
+      "integrity": "sha512-CdYAefeM35zKsc91qIyKzbaO7FhzTyWKsE8hj7tEJ1INYpoh1NeNNyL/NSEA3Nebi5ilugioJ5tRK8ZXG8y3gw==",
       "cpu": [
         "x64"
       ],
@@ -1629,9 +1603,9 @@
       }
     },
     "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.5.0.tgz",
-      "integrity": "sha512-LQKqttsK252LlqYyX8R02MinUsfFcy3+NZiJwHFgi5Y3+ZUIAED9cSxJkyNtuY5KMnR4RlpgWyLv4P6akN1xhg==",
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.7.1.tgz",
+      "integrity": "sha512-dnvyJrTA1UJxJjQ8q1N/gWomjP8Twij1BUQu2fdcT3OPpqlrbOk5R1yT0oD/721xoKNjroB5BXCsmmlykllxNg==",
       "cpu": [
         "arm"
       ],
@@ -1646,9 +1620,9 @@
       }
     },
     "node_modules/@tauri-apps/cli-linux-arm64-gnu": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.5.0.tgz",
-      "integrity": "sha512-mTQufsPcpdHg5RW0zypazMo4L55EfeE5snTzrPqbLX4yCK2qalN7+rnP8O8GT06xhp6ElSP/Ku1M2MR297SByQ==",
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.7.1.tgz",
+      "integrity": "sha512-FtBW6LJPNRTws3qyUc294AqCWU91l/H0SsFKq6q4Q45MSS4x6wxLxou8zB53tLDGEPx3JSoPLcDaSfPlSbyujQ==",
       "cpu": [
         "arm64"
       ],
@@ -1663,9 +1637,9 @@
       }
     },
     "node_modules/@tauri-apps/cli-linux-arm64-musl": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.5.0.tgz",
-      "integrity": "sha512-rQO1HhRUQqyEaal5dUVOQruTRda/TD36s9kv1hTxZiFuSq3558lsTjAcUEnMAtBcBkps20sbyTJNMT0AwYIk8Q==",
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.7.1.tgz",
+      "integrity": "sha512-/HXY0t4FHkpFzjeYS5c16mlA6z0kzn5uKLWptTLTdFSnYpr8FCnOP4Sdkvm2TDQPF2ERxXtNCd+WR/jQugbGnA==",
       "cpu": [
         "arm64"
       ],
@@ -1680,9 +1654,9 @@
       }
     },
     "node_modules/@tauri-apps/cli-linux-riscv64-gnu": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.5.0.tgz",
-      "integrity": "sha512-7oS18FN46yDxyw1zX/AxhLAd7T3GrLj3Ai6s8hZKd9qFVzrAn36ESL7d3G05s8wEtsJf26qjXnVF4qleS3dYsA==",
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.7.1.tgz",
+      "integrity": "sha512-GeW5lVI2GhhnaYckiDzstG2j2Jwlud5d2XefRGwlOK+C/bVGLT1le8MNPYK8wgRlpeK8fG1WnJJYD6Ke7YQ8bg==",
       "cpu": [
         "riscv64"
       ],
@@ -1697,9 +1671,9 @@
       }
     },
     "node_modules/@tauri-apps/cli-linux-x64-gnu": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.5.0.tgz",
-      "integrity": "sha512-SG5sFNL7VMmDBdIg3nO3EzNRT306HsiEQ0N90ILe3ZABYAVoPDO/ttpCO37ApLInTzrq/DLN+gOlC/mgZvLw1w==",
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.7.1.tgz",
+      "integrity": "sha512-DprxKQkPxIPYwUgg+cscpv2lcIUhn2nxEPlk0UeaiV9vATxCXyytxr1gLcj3xgjGyNPlM0MlJyYaPy1JmRg1cA==",
       "cpu": [
         "x64"
       ],
@@ -1714,9 +1688,9 @@
       }
     },
     "node_modules/@tauri-apps/cli-linux-x64-musl": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.5.0.tgz",
-      "integrity": "sha512-QXDM8zp/6v05PNWju5ELsVwF0VH1n6b5pk2E6W/jFbbiwz80Vs1lACl9pv5kEHkrxBj+aWU/03JzGuIj2g3SkQ==",
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.7.1.tgz",
+      "integrity": "sha512-KLlq3kOK7OUyDR757c0zQjPULpGZpLhNB0lZmZpHXvoOUcqZoCXJHh4dT/mryWZJp5ilrem5l8o9ngrDo0X1AA==",
       "cpu": [
         "x64"
       ],
@@ -1731,9 +1705,9 @@
       }
     },
     "node_modules/@tauri-apps/cli-win32-arm64-msvc": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.5.0.tgz",
-      "integrity": "sha512-pFSHFK6b+o9y4Un8w0gGLwVyFTZaC3P0kQ7umRt/BLDkzD5RnQ4vBM7CF8BCU5nkwmEBUCZd7Wt3TWZxe41o6Q==",
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.7.1.tgz",
+      "integrity": "sha512-dH7KUjKkSypCeWPiainHyXoES3obS+JIZVoSwSZfKq2gWgs48FY3oT0hQNYrWveE+VR4VoR3b/F3CPGbgFvksA==",
       "cpu": [
         "arm64"
       ],
@@ -1748,9 +1722,9 @@
       }
     },
     "node_modules/@tauri-apps/cli-win32-ia32-msvc": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.5.0.tgz",
-      "integrity": "sha512-EArv1IaRlogdLAQyGlKmEqZqm5RfHCUMhJoedWu7GtdbOMUfSAz6FMX2boE1PtEmNO4An+g188flLeVErrxEKg==",
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.7.1.tgz",
+      "integrity": "sha512-1oeibfyWQPVcijOrTg709qhbXArjX3x1MPjrmA5anlygwrbByxLBcLXvotcOeULFcnH2FYUMMLLant8kgvwE5A==",
       "cpu": [
         "ia32"
       ],
@@ -1765,9 +1739,9 @@
       }
     },
     "node_modules/@tauri-apps/cli-win32-x64-msvc": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.5.0.tgz",
-      "integrity": "sha512-lj43EFYbnAta8pd9JnUq87o+xRUR0odz+4rixBtTUwUgdRdwQ2V9CzFtsMu6FQKpFQ6mujRK6P1IEwhL6ADRsQ==",
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.7.1.tgz",
+      "integrity": "sha512-D7Q9kDObutuirCNLxYQ7KAg2Xxg99AjcdYz/KuMw5HvyEPbkC9Q7JL0vOrQOrHEHxIQ2lYzFOZvKKoC2yyqXcg==",
       "cpu": [
         "x64"
       ],
@@ -1782,39 +1756,39 @@
       }
     },
     "node_modules/@tauri-apps/plugin-cli": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-cli/-/plugin-cli-2.2.0.tgz",
-      "integrity": "sha512-rvNhMog9rHr01Xk+trBFKJ0eZICIvPkm9GX6ogB89/0hROU/lf+a/sb4vC0wtSeR7zrJuCSxwxYuvHCZheaYFA==",
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-cli/-/plugin-cli-2.4.0.tgz",
+      "integrity": "sha512-3AUUaaqj3PkacFlErFUvzaApV6uZG5W8psM5AKWoPNkThwJJZskc9wqfot7PTY13fVublGszFWBNAL4I4iIZRg==",
       "license": "MIT OR Apache-2.0",
       "dependencies": {
-        "@tauri-apps/api": "^2.0.0"
+        "@tauri-apps/api": "^2.6.0"
       }
     },
     "node_modules/@tauri-apps/plugin-fs": {
-      "version": "2.2.1",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-fs/-/plugin-fs-2.2.1.tgz",
-      "integrity": "sha512-KdGzvvA4Eg0Dhw55MwczFbjxLxsTx0FvwwC/0StXlr6IxwPUxh5ziZQoaugkBFs8t+wfebdQrjBEzd8NmmDXNw==",
+      "version": "2.4.1",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-fs/-/plugin-fs-2.4.1.tgz",
+      "integrity": "sha512-vJlKZVGF3UAFGoIEVT6Oq5L4HGDCD78WmA4uhzitToqYiBKWAvZR61M6zAyQzHqLs0ADemkE4RSy/5sCmZm6ZQ==",
       "license": "MIT OR Apache-2.0",
       "dependencies": {
-        "@tauri-apps/api": "^2.0.0"
+        "@tauri-apps/api": "^2.6.0"
       }
     },
     "node_modules/@tauri-apps/plugin-opener": {
-      "version": "2.2.6",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-opener/-/plugin-opener-2.2.6.tgz",
-      "integrity": "sha512-bSdkuP71ZQRepPOn8BOEdBKYJQvl6+jb160QtJX/i2H9BF6ZySY/kYljh76N2Ne5fJMQRge7rlKoStYQY5Jq1w==",
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-opener/-/plugin-opener-2.4.0.tgz",
+      "integrity": "sha512-43VyN8JJtvKWJY72WI/KNZszTpDpzHULFxQs0CJBIYUdCRowQ6Q1feWTDb979N7nldqSuDOaBupZ6wz2nvuWwQ==",
       "license": "MIT OR Apache-2.0",
       "dependencies": {
-        "@tauri-apps/api": "^2.0.0"
+        "@tauri-apps/api": "^2.6.0"
       }
     },
     "node_modules/@tauri-apps/plugin-window-state": {
-      "version": "2.2.2",
-      "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-window-state/-/plugin-window-state-2.2.2.tgz",
-      "integrity": "sha512-7pFwmMtGhhhE/WgmM7PUrj0BSSWVAQMfDdYbRalphIqqF1tWBvxtlxclx8bTutpXHLJTQoCpIeWtBEIXsoAlGw==",
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-window-state/-/plugin-window-state-2.4.0.tgz",
+      "integrity": "sha512-hRSzPNi2NG0lPFthfVY0V5C1MyWN/gGaQtQYw7i9zZhLzrhZveHZ2omHG1rIiIsjfTGbO7fhjydSoeTTK9GqLw==",
       "license": "MIT OR Apache-2.0",
       "dependencies": {
-        "@tauri-apps/api": "^2.0.0"
+        "@tauri-apps/api": "^2.6.0"
       }
     },
     "node_modules/@types/babel__core": {
@@ -1872,9 +1846,9 @@
       }
     },
     "node_modules/@types/estree": {
-      "version": "1.0.7",
-      "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
-      "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
+      "version": "1.0.8",
+      "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
+      "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
       "license": "MIT"
     },
     "node_modules/@types/estree-jsx": {
@@ -1925,39 +1899,32 @@
       "license": "MIT"
     },
     "node_modules/@types/node": {
-      "version": "22.12.0",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-22.12.0.tgz",
-      "integrity": "sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==",
+      "version": "22.17.1",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-22.17.1.tgz",
+      "integrity": "sha512-y3tBaz+rjspDTylNjAX37jEC3TETEFGNJL6uQDxwF9/8GLLIjW1rvVHlynyuUKMnMr1Roq8jOv3vkopBjC4/VA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "undici-types": "~6.20.0"
+        "undici-types": "~6.21.0"
       }
     },
-    "node_modules/@types/prop-types": {
-      "version": "15.7.14",
-      "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz",
-      "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==",
-      "license": "MIT"
-    },
     "node_modules/@types/react": {
-      "version": "18.3.20",
-      "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.20.tgz",
-      "integrity": "sha512-IPaCZN7PShZK/3t6Q87pfTkRm6oLTd4vztyoj+cbHUF1g3FfVb2tFIL79uCRKEfv16AhqDMBywP2VW3KIZUvcg==",
+      "version": "19.1.10",
+      "resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.10.tgz",
+      "integrity": "sha512-EhBeSYX0Y6ye8pNebpKrwFJq7BoQ8J5SO6NlvNwwHjSj6adXJViPQrKlsyPw7hLBLvckEMO1yxeGdR82YBBlDg==",
       "license": "MIT",
       "dependencies": {
-        "@types/prop-types": "*",
         "csstype": "^3.0.2"
       }
     },
     "node_modules/@types/react-dom": {
-      "version": "18.3.7",
-      "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz",
-      "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==",
+      "version": "19.1.7",
+      "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.7.tgz",
+      "integrity": "sha512-i5ZzwYpqjmrKenzkoLM2Ibzt6mAsM7pxB6BCIouEVVmgiqaMj1TjaK7hnA36hbW5aZv20kx7Lw6hWzPWg0Rurw==",
       "dev": true,
       "license": "MIT",
       "peerDependencies": {
-        "@types/react": "^18.0.0"
+        "@types/react": "^19.0.0"
       }
     },
     "node_modules/@types/react-syntax-highlighter": {
@@ -1977,21 +1944,21 @@
       "license": "MIT"
     },
     "node_modules/@typescript-eslint/eslint-plugin": {
-      "version": "8.31.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.31.1.tgz",
-      "integrity": "sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==",
+      "version": "8.39.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.39.1.tgz",
+      "integrity": "sha512-yYegZ5n3Yr6eOcqgj2nJH8cH/ZZgF+l0YIdKILSDjYFRjgYQMgv/lRjV5Z7Up04b9VYUondt8EPMqg7kTWgJ2g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@eslint-community/regexpp": "^4.10.0",
-        "@typescript-eslint/scope-manager": "8.31.1",
-        "@typescript-eslint/type-utils": "8.31.1",
-        "@typescript-eslint/utils": "8.31.1",
-        "@typescript-eslint/visitor-keys": "8.31.1",
+        "@typescript-eslint/scope-manager": "8.39.1",
+        "@typescript-eslint/type-utils": "8.39.1",
+        "@typescript-eslint/utils": "8.39.1",
+        "@typescript-eslint/visitor-keys": "8.39.1",
         "graphemer": "^1.4.0",
-        "ignore": "^5.3.1",
+        "ignore": "^7.0.0",
         "natural-compare": "^1.4.0",
-        "ts-api-utils": "^2.0.1"
+        "ts-api-utils": "^2.1.0"
       },
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2001,22 +1968,32 @@
         "url": "https://opencollective.com/typescript-eslint"
       },
       "peerDependencies": {
-        "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0",
+        "@typescript-eslint/parser": "^8.39.1",
         "eslint": "^8.57.0 || ^9.0.0",
-        "typescript": ">=4.8.4 <5.9.0"
+        "typescript": ">=4.8.4 <6.0.0"
+      }
+    },
+    "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
+      "version": "7.0.5",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
+      "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 4"
       }
     },
     "node_modules/@typescript-eslint/parser": {
-      "version": "8.31.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.31.1.tgz",
-      "integrity": "sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==",
+      "version": "8.39.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.39.1.tgz",
+      "integrity": "sha512-pUXGCuHnnKw6PyYq93lLRiZm3vjuslIy7tus1lIQTYVK9bL8XBgJnCWm8a0KcTtHC84Yya1Q6rtll+duSMj0dg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/scope-manager": "8.31.1",
-        "@typescript-eslint/types": "8.31.1",
-        "@typescript-eslint/typescript-estree": "8.31.1",
-        "@typescript-eslint/visitor-keys": "8.31.1",
+        "@typescript-eslint/scope-manager": "8.39.1",
+        "@typescript-eslint/types": "8.39.1",
+        "@typescript-eslint/typescript-estree": "8.39.1",
+        "@typescript-eslint/visitor-keys": "8.39.1",
         "debug": "^4.3.4"
       },
       "engines": {
@@ -2028,18 +2005,40 @@
       },
       "peerDependencies": {
         "eslint": "^8.57.0 || ^9.0.0",
-        "typescript": ">=4.8.4 <5.9.0"
+        "typescript": ">=4.8.4 <6.0.0"
+      }
+    },
+    "node_modules/@typescript-eslint/project-service": {
+      "version": "8.39.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.39.1.tgz",
+      "integrity": "sha512-8fZxek3ONTwBu9ptw5nCKqZOSkXshZB7uAxuFF0J/wTMkKydjXCzqqga7MlFMpHi9DoG4BadhmTkITBcg8Aybw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@typescript-eslint/tsconfig-utils": "^8.39.1",
+        "@typescript-eslint/types": "^8.39.1",
+        "debug": "^4.3.4"
+      },
+      "engines": {
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/typescript-eslint"
+      },
+      "peerDependencies": {
+        "typescript": ">=4.8.4 <6.0.0"
       }
     },
     "node_modules/@typescript-eslint/scope-manager": {
-      "version": "8.31.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.31.1.tgz",
-      "integrity": "sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==",
+      "version": "8.39.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.39.1.tgz",
+      "integrity": "sha512-RkBKGBrjgskFGWuyUGz/EtD8AF/GW49S21J8dvMzpJitOF1slLEbbHnNEtAHtnDAnx8qDEdRrULRnWVx27wGBw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/types": "8.31.1",
-        "@typescript-eslint/visitor-keys": "8.31.1"
+        "@typescript-eslint/types": "8.39.1",
+        "@typescript-eslint/visitor-keys": "8.39.1"
       },
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2049,17 +2048,35 @@
         "url": "https://opencollective.com/typescript-eslint"
       }
     },
+    "node_modules/@typescript-eslint/tsconfig-utils": {
+      "version": "8.39.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.39.1.tgz",
+      "integrity": "sha512-ePUPGVtTMR8XMU2Hee8kD0Pu4NDE1CN9Q1sxGSGd/mbOtGZDM7pnhXNJnzW63zk/q+Z54zVzj44HtwXln5CvHA==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/typescript-eslint"
+      },
+      "peerDependencies": {
+        "typescript": ">=4.8.4 <6.0.0"
+      }
+    },
     "node_modules/@typescript-eslint/type-utils": {
-      "version": "8.31.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.31.1.tgz",
-      "integrity": "sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==",
+      "version": "8.39.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.39.1.tgz",
+      "integrity": "sha512-gu9/ahyatyAdQbKeHnhT4R+y3YLtqqHyvkfDxaBYk97EcbfChSJXyaJnIL3ygUv7OuZatePHmQvuH5ru0lnVeA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/typescript-estree": "8.31.1",
-        "@typescript-eslint/utils": "8.31.1",
+        "@typescript-eslint/types": "8.39.1",
+        "@typescript-eslint/typescript-estree": "8.39.1",
+        "@typescript-eslint/utils": "8.39.1",
         "debug": "^4.3.4",
-        "ts-api-utils": "^2.0.1"
+        "ts-api-utils": "^2.1.0"
       },
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2070,13 +2087,13 @@
       },
       "peerDependencies": {
         "eslint": "^8.57.0 || ^9.0.0",
-        "typescript": ">=4.8.4 <5.9.0"
+        "typescript": ">=4.8.4 <6.0.0"
       }
     },
     "node_modules/@typescript-eslint/types": {
-      "version": "8.31.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.31.1.tgz",
-      "integrity": "sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==",
+      "version": "8.39.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.39.1.tgz",
+      "integrity": "sha512-7sPDKQQp+S11laqTrhHqeAbsCfMkwJMrV7oTDvtDds4mEofJYir414bYKUEb8YPUm9QL3U+8f6L6YExSoAGdQw==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -2088,20 +2105,22 @@
       }
     },
     "node_modules/@typescript-eslint/typescript-estree": {
-      "version": "8.31.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.31.1.tgz",
-      "integrity": "sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==",
+      "version": "8.39.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.39.1.tgz",
+      "integrity": "sha512-EKkpcPuIux48dddVDXyQBlKdeTPMmALqBUbEk38McWv0qVEZwOpVJBi7ugK5qVNgeuYjGNQxrrnoM/5+TI/BPw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/types": "8.31.1",
-        "@typescript-eslint/visitor-keys": "8.31.1",
+        "@typescript-eslint/project-service": "8.39.1",
+        "@typescript-eslint/tsconfig-utils": "8.39.1",
+        "@typescript-eslint/types": "8.39.1",
+        "@typescript-eslint/visitor-keys": "8.39.1",
         "debug": "^4.3.4",
         "fast-glob": "^3.3.2",
         "is-glob": "^4.0.3",
         "minimatch": "^9.0.4",
         "semver": "^7.6.0",
-        "ts-api-utils": "^2.0.1"
+        "ts-api-utils": "^2.1.0"
       },
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2111,13 +2130,13 @@
         "url": "https://opencollective.com/typescript-eslint"
       },
       "peerDependencies": {
-        "typescript": ">=4.8.4 <5.9.0"
+        "typescript": ">=4.8.4 <6.0.0"
       }
     },
     "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
-      "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+      "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -2141,9 +2160,9 @@
       }
     },
     "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
-      "version": "7.7.1",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
-      "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
+      "version": "7.7.2",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
+      "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
       "dev": true,
       "license": "ISC",
       "bin": {
@@ -2154,16 +2173,16 @@
       }
     },
     "node_modules/@typescript-eslint/utils": {
-      "version": "8.31.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.31.1.tgz",
-      "integrity": "sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==",
+      "version": "8.39.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.39.1.tgz",
+      "integrity": "sha512-VF5tZ2XnUSTuiqZFXCZfZs1cgkdd3O/sSYmdo2EpSyDlC86UM/8YytTmKnehOW3TGAlivqTDT6bS87B/GQ/jyg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@eslint-community/eslint-utils": "^4.4.0",
-        "@typescript-eslint/scope-manager": "8.31.1",
-        "@typescript-eslint/types": "8.31.1",
-        "@typescript-eslint/typescript-estree": "8.31.1"
+        "@eslint-community/eslint-utils": "^4.7.0",
+        "@typescript-eslint/scope-manager": "8.39.1",
+        "@typescript-eslint/types": "8.39.1",
+        "@typescript-eslint/typescript-estree": "8.39.1"
       },
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2174,18 +2193,18 @@
       },
       "peerDependencies": {
         "eslint": "^8.57.0 || ^9.0.0",
-        "typescript": ">=4.8.4 <5.9.0"
+        "typescript": ">=4.8.4 <6.0.0"
       }
     },
     "node_modules/@typescript-eslint/visitor-keys": {
-      "version": "8.31.1",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.31.1.tgz",
-      "integrity": "sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==",
+      "version": "8.39.1",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.39.1.tgz",
+      "integrity": "sha512-W8FQi6kEh2e8zVhQ0eeRnxdvIoOkAp/CPAahcNio6nO9dsIwb9b34z90KOlheoyuVf6LSOEdjlkxSkapNEc+4A==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/types": "8.31.1",
-        "eslint-visitor-keys": "^4.2.0"
+        "@typescript-eslint/types": "8.39.1",
+        "eslint-visitor-keys": "^4.2.1"
       },
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2202,23 +2221,24 @@
       "license": "ISC"
     },
     "node_modules/@vitejs/plugin-react": {
-      "version": "4.4.1",
-      "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.4.1.tgz",
-      "integrity": "sha512-IpEm5ZmeXAP/osiBXVVP5KjFMzbWOonMs0NaQQl+xYnUAcq4oHUBsF2+p4MgKWG4YMmFYJU8A6sxRPuowllm6w==",
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.0.0.tgz",
+      "integrity": "sha512-Jx9JfsTa05bYkS9xo0hkofp2dCmp1blrKjw9JONs5BTHOvJCgLbaPSuZLGSVJW6u2qe0tc4eevY0+gSNNi0YCw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/core": "^7.26.10",
-        "@babel/plugin-transform-react-jsx-self": "^7.25.9",
-        "@babel/plugin-transform-react-jsx-source": "^7.25.9",
+        "@babel/core": "^7.28.0",
+        "@babel/plugin-transform-react-jsx-self": "^7.27.1",
+        "@babel/plugin-transform-react-jsx-source": "^7.27.1",
+        "@rolldown/pluginutils": "1.0.0-beta.30",
         "@types/babel__core": "^7.20.5",
         "react-refresh": "^0.17.0"
       },
       "engines": {
-        "node": "^14.18.0 || >=16.0.0"
+        "node": "^20.19.0 || >=22.12.0"
       },
       "peerDependencies": {
-        "vite": "^4.2.0 || ^5.0.0 || ^6.0.0"
+        "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
       }
     },
     "node_modules/@wooorm/starry-night": {
@@ -2264,24 +2284,10 @@
       "integrity": "sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==",
       "license": "MIT"
     },
-    "node_modules/accepts": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
-      "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "mime-types": "^3.0.0",
-        "negotiator": "^1.0.0"
-      },
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
     "node_modules/acorn": {
-      "version": "8.14.1",
-      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz",
-      "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==",
+      "version": "8.15.0",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
+      "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
       "dev": true,
       "license": "MIT",
       "bin": {
@@ -2384,27 +2390,6 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/body-parser": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz",
-      "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "bytes": "^3.1.2",
-        "content-type": "^1.0.5",
-        "debug": "^4.4.0",
-        "http-errors": "^2.0.0",
-        "iconv-lite": "^0.6.3",
-        "on-finished": "^2.4.1",
-        "qs": "^6.14.0",
-        "raw-body": "^3.0.0",
-        "type-is": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=18"
-      }
-    },
     "node_modules/boolbase": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
@@ -2437,9 +2422,9 @@
       }
     },
     "node_modules/browserslist": {
-      "version": "4.24.5",
-      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.5.tgz",
-      "integrity": "sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==",
+      "version": "4.25.1",
+      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz",
+      "integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==",
       "dev": true,
       "funding": [
         {
@@ -2457,8 +2442,8 @@
       ],
       "license": "MIT",
       "dependencies": {
-        "caniuse-lite": "^1.0.30001716",
-        "electron-to-chromium": "^1.5.149",
+        "caniuse-lite": "^1.0.30001726",
+        "electron-to-chromium": "^1.5.173",
         "node-releases": "^2.0.19",
         "update-browserslist-db": "^1.1.3"
       },
@@ -2476,47 +2461,6 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/bytes": {
-      "version": "3.1.2",
-      "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
-      "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
-    "node_modules/call-bind-apply-helpers": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
-      "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "es-errors": "^1.3.0",
-        "function-bind": "^1.1.2"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
-    "node_modules/call-bound": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
-      "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "call-bind-apply-helpers": "^1.0.2",
-        "get-intrinsic": "^1.3.0"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
     "node_modules/callsites": {
       "version": "3.1.0",
       "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -2539,9 +2483,9 @@
       }
     },
     "node_modules/caniuse-lite": {
-      "version": "1.0.30001716",
-      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001716.tgz",
-      "integrity": "sha512-49/c1+x3Kwz7ZIWt+4DvK3aMJy9oYXXG6/97JKsnjdCk/6n9vVyWL8NAwVt95Lwt9eigI10Hl782kDfZUUlRXw==",
+      "version": "1.0.30001727",
+      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001727.tgz",
+      "integrity": "sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q==",
       "dev": true,
       "funding": [
         {
@@ -2722,9 +2666,9 @@
       "license": "MIT"
     },
     "node_modules/concurrently": {
-      "version": "9.1.2",
-      "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.1.2.tgz",
-      "integrity": "sha512-H9MWcoPsYddwbOGM6difjVwVZHl63nwMEwDJG/L7VGtuaJhb12h2caPG2tVPWs7emuYix252iGfqOyrz1GczTQ==",
+      "version": "9.2.0",
+      "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.0.tgz",
+      "integrity": "sha512-IsB/fiXTupmagMW4MNp2lx2cdSN2FfZq78vF90LBB+zZHArbIQZjQtzXCiXnvTxCZSvXanTqFLWBjw2UkLx1SQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -2764,29 +2708,6 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/content-disposition": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz",
-      "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "safe-buffer": "5.2.1"
-      },
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
-    "node_modules/content-type": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
-      "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
     "node_modules/convert-source-map": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
@@ -2795,37 +2716,12 @@
       "license": "MIT"
     },
     "node_modules/cookie": {
-      "version": "0.7.2",
-      "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
-      "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
-    "node_modules/cookie-signature": {
-      "version": "1.2.2",
-      "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
-      "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=6.6.0"
-      }
-    },
-    "node_modules/cors": {
-      "version": "2.8.5",
-      "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
-      "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
-      "dev": true,
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz",
+      "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==",
       "license": "MIT",
-      "dependencies": {
-        "object-assign": "^4",
-        "vary": "^1"
-      },
       "engines": {
-        "node": ">= 0.10"
+        "node": ">=18"
       }
     },
     "node_modules/cross-spawn": {
@@ -2916,16 +2812,6 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/depd": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
-      "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
     "node_modules/dequal": {
       "version": "2.0.3",
       "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
@@ -3041,28 +2927,6 @@
         "node": ">=12"
       }
     },
-    "node_modules/dunder-proto": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
-      "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "call-bind-apply-helpers": "^1.0.1",
-        "es-errors": "^1.3.0",
-        "gopd": "^1.2.0"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
-    "node_modules/ee-first": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
-      "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/ejs": {
       "version": "3.1.10",
       "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz",
@@ -3080,9 +2944,9 @@
       }
     },
     "node_modules/electron-to-chromium": {
-      "version": "1.5.149",
-      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.149.tgz",
-      "integrity": "sha512-UyiO82eb9dVOx8YO3ajDf9jz2kKyt98DEITRdeLPstOEuTlLzDA4Gyq5K9he71TQziU5jUVu2OAu5N48HmQiyQ==",
+      "version": "1.5.180",
+      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.180.tgz",
+      "integrity": "sha512-ED+GEyEh3kYMwt2faNmgMB0b8O5qtATGgR4RmRsIp4T6p7B8vdMbIedYndnvZfsaXvSzegtpfqRMDNCjjiSduA==",
       "dev": true,
       "license": "ISC"
     },
@@ -3093,16 +2957,6 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/encodeurl": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
-      "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
     "node_modules/entities": {
       "version": "2.2.0",
       "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
@@ -3113,39 +2967,6 @@
         "url": "https://github.com/fb55/entities?sponsor=1"
       }
     },
-    "node_modules/es-define-property": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
-      "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
-    "node_modules/es-errors": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
-      "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
-    "node_modules/es-object-atoms": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
-      "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "es-errors": "^1.3.0"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
     "node_modules/esbuild": {
       "version": "0.25.3",
       "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.3.tgz",
@@ -3197,13 +3018,6 @@
         "node": ">=6"
       }
     },
-    "node_modules/escape-html": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
-      "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/escape-string-regexp": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
@@ -3218,24 +3032,23 @@
       }
     },
     "node_modules/eslint": {
-      "version": "9.26.0",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.26.0.tgz",
-      "integrity": "sha512-Hx0MOjPh6uK9oq9nVsATZKE/Wlbai7KFjfCuw9UHaguDW3x+HF0O5nIi3ud39TWgrTjTO5nHxmL3R1eANinWHQ==",
+      "version": "9.33.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.33.0.tgz",
+      "integrity": "sha512-TS9bTNIryDzStCpJN93aC5VRSW3uTx9sClUn4B87pwiCaJh220otoI0X8mJKr+VcPtniMdN8GKjlwgWGUv5ZKA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@eslint-community/eslint-utils": "^4.2.0",
         "@eslint-community/regexpp": "^4.12.1",
-        "@eslint/config-array": "^0.20.0",
-        "@eslint/config-helpers": "^0.2.1",
-        "@eslint/core": "^0.13.0",
+        "@eslint/config-array": "^0.21.0",
+        "@eslint/config-helpers": "^0.3.1",
+        "@eslint/core": "^0.15.2",
         "@eslint/eslintrc": "^3.3.1",
-        "@eslint/js": "9.26.0",
-        "@eslint/plugin-kit": "^0.2.8",
+        "@eslint/js": "9.33.0",
+        "@eslint/plugin-kit": "^0.3.5",
         "@humanfs/node": "^0.16.6",
         "@humanwhocodes/module-importer": "^1.0.1",
         "@humanwhocodes/retry": "^0.4.2",
-        "@modelcontextprotocol/sdk": "^1.8.0",
         "@types/estree": "^1.0.6",
         "@types/json-schema": "^7.0.15",
         "ajv": "^6.12.4",
@@ -3243,9 +3056,9 @@
         "cross-spawn": "^7.0.6",
         "debug": "^4.3.2",
         "escape-string-regexp": "^4.0.0",
-        "eslint-scope": "^8.3.0",
-        "eslint-visitor-keys": "^4.2.0",
-        "espree": "^10.3.0",
+        "eslint-scope": "^8.4.0",
+        "eslint-visitor-keys": "^4.2.1",
+        "espree": "^10.4.0",
         "esquery": "^1.5.0",
         "esutils": "^2.0.2",
         "fast-deep-equal": "^3.1.3",
@@ -3259,8 +3072,7 @@
         "lodash.merge": "^4.6.2",
         "minimatch": "^3.1.2",
         "natural-compare": "^1.4.0",
-        "optionator": "^0.9.3",
-        "zod": "^3.24.2"
+        "optionator": "^0.9.3"
       },
       "bin": {
         "eslint": "bin/eslint.js"
@@ -3304,9 +3116,9 @@
       }
     },
     "node_modules/eslint-scope": {
-      "version": "8.3.0",
-      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz",
-      "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==",
+      "version": "8.4.0",
+      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz",
+      "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==",
       "dev": true,
       "license": "BSD-2-Clause",
       "dependencies": {
@@ -3321,9 +3133,9 @@
       }
     },
     "node_modules/eslint-visitor-keys": {
-      "version": "4.2.0",
-      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz",
-      "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==",
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
+      "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
       "dev": true,
       "license": "Apache-2.0",
       "engines": {
@@ -3334,15 +3146,15 @@
       }
     },
     "node_modules/espree": {
-      "version": "10.3.0",
-      "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz",
-      "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==",
+      "version": "10.4.0",
+      "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",
+      "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==",
       "dev": true,
       "license": "BSD-2-Clause",
       "dependencies": {
-        "acorn": "^8.14.0",
+        "acorn": "^8.15.0",
         "acorn-jsx": "^5.3.2",
-        "eslint-visitor-keys": "^4.2.0"
+        "eslint-visitor-keys": "^4.2.1"
       },
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3414,98 +3226,6 @@
         "node": ">=0.10.0"
       }
     },
-    "node_modules/etag": {
-      "version": "1.8.1",
-      "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
-      "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
-    "node_modules/eventsource": {
-      "version": "3.0.6",
-      "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.6.tgz",
-      "integrity": "sha512-l19WpE2m9hSuyP06+FbuUUf1G+R0SFLrtQfbRb9PRr+oimOfxQhgGCbVaXg5IvZyyTThJsxh6L/srkMiCeBPDA==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "eventsource-parser": "^3.0.1"
-      },
-      "engines": {
-        "node": ">=18.0.0"
-      }
-    },
-    "node_modules/eventsource-parser": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.1.tgz",
-      "integrity": "sha512-VARTJ9CYeuQYb0pZEPbzi740OWFgpHe7AYJ2WFZVnUDUQp5Dk2yJUgF36YsZ81cOyxT0QxmXD2EQpapAouzWVA==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=18.0.0"
-      }
-    },
-    "node_modules/express": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz",
-      "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "accepts": "^2.0.0",
-        "body-parser": "^2.2.0",
-        "content-disposition": "^1.0.0",
-        "content-type": "^1.0.5",
-        "cookie": "^0.7.1",
-        "cookie-signature": "^1.2.1",
-        "debug": "^4.4.0",
-        "encodeurl": "^2.0.0",
-        "escape-html": "^1.0.3",
-        "etag": "^1.8.1",
-        "finalhandler": "^2.1.0",
-        "fresh": "^2.0.0",
-        "http-errors": "^2.0.0",
-        "merge-descriptors": "^2.0.0",
-        "mime-types": "^3.0.0",
-        "on-finished": "^2.4.1",
-        "once": "^1.4.0",
-        "parseurl": "^1.3.3",
-        "proxy-addr": "^2.0.7",
-        "qs": "^6.14.0",
-        "range-parser": "^1.2.1",
-        "router": "^2.2.0",
-        "send": "^1.1.0",
-        "serve-static": "^2.2.0",
-        "statuses": "^2.0.1",
-        "type-is": "^2.0.1",
-        "vary": "^1.1.2"
-      },
-      "engines": {
-        "node": ">= 18"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/express"
-      }
-    },
-    "node_modules/express-rate-limit": {
-      "version": "7.5.0",
-      "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.0.tgz",
-      "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 16"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/express-rate-limit"
-      },
-      "peerDependencies": {
-        "express": "^4.11 || 5 || ^5.0.0-beta.1"
-      }
-    },
     "node_modules/extend": {
       "version": "3.0.2",
       "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
@@ -3587,9 +3307,9 @@
       }
     },
     "node_modules/fdir": {
-      "version": "6.4.4",
-      "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz",
-      "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==",
+      "version": "6.4.6",
+      "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz",
+      "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
       "dev": true,
       "license": "MIT",
       "peerDependencies": {
@@ -3672,24 +3392,6 @@
         "node": ">=8"
       }
     },
-    "node_modules/finalhandler": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz",
-      "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "debug": "^4.4.0",
-        "encodeurl": "^2.0.0",
-        "escape-html": "^1.0.3",
-        "on-finished": "^2.4.1",
-        "parseurl": "^1.3.3",
-        "statuses": "^2.0.1"
-      },
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
     "node_modules/find-up": {
       "version": "5.0.0",
       "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
@@ -3745,26 +3447,6 @@
         "node": ">=0.4.x"
       }
     },
-    "node_modules/forwarded": {
-      "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
-      "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
-    "node_modules/fresh": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
-      "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
     "node_modules/fs-extra": {
       "version": "10.1.0",
       "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
@@ -3795,16 +3477,6 @@
         "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
       }
     },
-    "node_modules/function-bind": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
-      "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
-      "dev": true,
-      "license": "MIT",
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
     "node_modules/gensync": {
       "version": "1.0.0-beta.2",
       "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
@@ -3825,45 +3497,6 @@
         "node": "6.* || 8.* || >= 10.*"
       }
     },
-    "node_modules/get-intrinsic": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
-      "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "call-bind-apply-helpers": "^1.0.2",
-        "es-define-property": "^1.0.1",
-        "es-errors": "^1.3.0",
-        "es-object-atoms": "^1.1.1",
-        "function-bind": "^1.1.2",
-        "get-proto": "^1.0.1",
-        "gopd": "^1.2.0",
-        "has-symbols": "^1.1.0",
-        "hasown": "^2.0.2",
-        "math-intrinsics": "^1.1.0"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/get-proto": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
-      "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "dunder-proto": "^1.0.1",
-        "es-object-atoms": "^1.0.0"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
     "node_modules/glob-parent": {
       "version": "6.0.2",
       "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
@@ -3878,9 +3511,9 @@
       }
     },
     "node_modules/globals": {
-      "version": "16.0.0",
-      "resolved": "https://registry.npmjs.org/globals/-/globals-16.0.0.tgz",
-      "integrity": "sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==",
+      "version": "16.3.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-16.3.0.tgz",
+      "integrity": "sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -3890,19 +3523,6 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/gopd": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
-      "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
     "node_modules/graceful-fs": {
       "version": "4.2.11",
       "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
@@ -3927,32 +3547,6 @@
         "node": ">=8"
       }
     },
-    "node_modules/has-symbols": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
-      "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/hasown": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
-      "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "function-bind": "^1.1.2"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
     "node_modules/hast-util-parse-selector": {
       "version": "2.2.5",
       "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz",
@@ -4138,36 +3732,6 @@
         "url": "https://opencollective.com/unified"
       }
     },
-    "node_modules/http-errors": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
-      "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "depd": "2.0.0",
-        "inherits": "2.0.4",
-        "setprototypeof": "1.2.0",
-        "statuses": "2.0.1",
-        "toidentifier": "1.0.1"
-      },
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
-    "node_modules/iconv-lite": {
-      "version": "0.6.3",
-      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
-      "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "safer-buffer": ">= 2.1.2 < 3.0.0"
-      },
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
     "node_modules/ignore": {
       "version": "5.3.2",
       "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
@@ -4215,29 +3779,12 @@
         "node": ">=0.8.19"
       }
     },
-    "node_modules/inherits": {
-      "version": "2.0.4",
-      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
-      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
-      "dev": true,
-      "license": "ISC"
-    },
     "node_modules/inline-style-parser": {
       "version": "0.2.4",
       "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.4.tgz",
       "integrity": "sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==",
       "license": "MIT"
     },
-    "node_modules/ipaddr.js": {
-      "version": "1.9.1",
-      "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
-      "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.10"
-      }
-    },
     "node_modules/is-alphabetical": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz",
@@ -4337,13 +3884,6 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/is-promise": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
-      "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/isexe": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@@ -4611,16 +4151,6 @@
         "lz-string": "bin/bin.js"
       }
     },
-    "node_modules/math-intrinsics": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
-      "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
     "node_modules/mdast-util-from-markdown": {
       "version": "2.0.2",
       "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz",
@@ -4774,29 +4304,6 @@
         "url": "https://opencollective.com/unified"
       }
     },
-    "node_modules/media-typer": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
-      "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
-    "node_modules/merge-descriptors": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
-      "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=18"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
     "node_modules/merge2": {
       "version": "1.4.1",
       "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -5276,29 +4783,6 @@
         "url": "https://github.com/sponsors/jonschlinkert"
       }
     },
-    "node_modules/mime-db": {
-      "version": "1.54.0",
-      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
-      "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
-    "node_modules/mime-types": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz",
-      "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "mime-db": "^1.54.0"
-      },
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
     "node_modules/minimatch": {
       "version": "3.1.2",
       "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
@@ -5361,16 +4845,6 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/negotiator": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
-      "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
     "node_modules/no-case": {
       "version": "3.0.4",
       "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
@@ -5422,42 +4896,6 @@
         "node": ">=0.10.0"
       }
     },
-    "node_modules/object-inspect": {
-      "version": "1.13.4",
-      "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
-      "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/on-finished": {
-      "version": "2.4.1",
-      "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
-      "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ee-first": "1.1.1"
-      },
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
-    "node_modules/once": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
-      "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "wrappy": "1"
-      }
-    },
     "node_modules/optionator": {
       "version": "0.9.4",
       "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
@@ -5569,16 +5007,6 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/parseurl": {
-      "version": "1.3.3",
-      "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
-      "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
     "node_modules/pascal-case": {
       "version": "3.1.2",
       "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
@@ -5610,16 +5038,6 @@
         "node": ">=8"
       }
     },
-    "node_modules/path-to-regexp": {
-      "version": "8.2.0",
-      "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz",
-      "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=16"
-      }
-    },
     "node_modules/pathe": {
       "version": "0.2.0",
       "resolved": "https://registry.npmjs.org/pathe/-/pathe-0.2.0.tgz",
@@ -5635,9 +5053,9 @@
       "license": "ISC"
     },
     "node_modules/picomatch": {
-      "version": "4.0.2",
-      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
-      "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+      "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -5647,24 +5065,14 @@
         "url": "https://github.com/sponsors/jonschlinkert"
       }
     },
-    "node_modules/pkce-challenge": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz",
-      "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=16.20.0"
-      }
-    },
     "node_modules/playwright": {
-      "version": "1.52.0",
-      "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.52.0.tgz",
-      "integrity": "sha512-JAwMNMBlxJ2oD1kce4KPtMkDeKGHQstdpFPcPH3maElAXon/QZeTvtsfXmTMRyO9TslfoYOXkSsvao2nE1ilTw==",
+      "version": "1.54.2",
+      "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.54.2.tgz",
+      "integrity": "sha512-Hu/BMoA1NAdRUuulyvQC0pEqZ4vQbGfn8f7wPXcnqQmM+zct9UliKxsIkLNmz/ku7LElUNqmaiv1TG/aL5ACsw==",
       "dev": true,
       "license": "Apache-2.0",
       "dependencies": {
-        "playwright-core": "1.52.0"
+        "playwright-core": "1.54.2"
       },
       "bin": {
         "playwright": "cli.js"
@@ -5677,9 +5085,9 @@
       }
     },
     "node_modules/playwright-core": {
-      "version": "1.52.0",
-      "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.52.0.tgz",
-      "integrity": "sha512-l2osTgLXSMeuLZOML9qYODUQoPPnUsKsb5/P6LJ2e6uPKXUdPK5WYhN4z03G+YNbWmGDY4YENauNu4ZKczreHg==",
+      "version": "1.54.2",
+      "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.54.2.tgz",
+      "integrity": "sha512-n5r4HFbMmWsB4twG7tJLDN9gmBUeSPcsBZiWSE4DnYz9mJMAFqr2ID7+eGC9kpEnxExJ1epttwR59LEWCk8mtA==",
       "dev": true,
       "license": "Apache-2.0",
       "bin": {
@@ -5690,9 +5098,9 @@
       }
     },
     "node_modules/postcss": {
-      "version": "8.5.3",
-      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz",
-      "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",
+      "version": "8.5.6",
+      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
+      "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
       "dev": true,
       "funding": [
         {
@@ -5710,7 +5118,7 @@
       ],
       "license": "MIT",
       "dependencies": {
-        "nanoid": "^3.3.8",
+        "nanoid": "^3.3.11",
         "picocolors": "^1.1.1",
         "source-map-js": "^1.2.1"
       },
@@ -5729,9 +5137,9 @@
       }
     },
     "node_modules/prettier": {
-      "version": "3.5.3",
-      "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz",
-      "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==",
+      "version": "3.6.2",
+      "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz",
+      "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
       "dev": true,
       "license": "MIT",
       "bin": {
@@ -5745,9 +5153,9 @@
       }
     },
     "node_modules/pretty-bytes": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-7.0.0.tgz",
-      "integrity": "sha512-U5otLYPR3L0SVjHGrkEUx5mf7MxV2ceXeE7VwWPk+hyzC5drNohsOGNPDZqxCqyX1lkbEN4kl1LiI8QFd7r0ZA==",
+      "version": "7.0.1",
+      "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-7.0.1.tgz",
+      "integrity": "sha512-285/jRCYIbMGDciDdrw0KPNC4LKEEwz/bwErcYNxSJOi4CpGUuLpb9gQpg3XJP0XYj9ldSRluXxih4lX2YN8Xw==",
       "license": "MIT",
       "engines": {
         "node": ">=20"
@@ -5801,20 +5209,6 @@
         "url": "https://github.com/sponsors/wooorm"
       }
     },
-    "node_modules/proxy-addr": {
-      "version": "2.0.7",
-      "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
-      "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "forwarded": "0.2.0",
-        "ipaddr.js": "1.9.1"
-      },
-      "engines": {
-        "node": ">= 0.10"
-      }
-    },
     "node_modules/punycode": {
       "version": "2.3.1",
       "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
@@ -5825,22 +5219,6 @@
         "node": ">=6"
       }
     },
-    "node_modules/qs": {
-      "version": "6.14.0",
-      "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
-      "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
-      "dev": true,
-      "license": "BSD-3-Clause",
-      "dependencies": {
-        "side-channel": "^1.1.0"
-      },
-      "engines": {
-        "node": ">=0.6"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
     "node_modules/queue-microtask": {
       "version": "1.2.3",
       "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -5862,55 +5240,25 @@
       ],
       "license": "MIT"
     },
-    "node_modules/range-parser": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
-      "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
-    "node_modules/raw-body": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz",
-      "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "bytes": "3.1.2",
-        "http-errors": "2.0.0",
-        "iconv-lite": "0.6.3",
-        "unpipe": "1.0.0"
-      },
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
     "node_modules/react": {
-      "version": "18.3.1",
-      "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
-      "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
+      "version": "19.1.1",
+      "resolved": "https://registry.npmjs.org/react/-/react-19.1.1.tgz",
+      "integrity": "sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==",
       "license": "MIT",
-      "dependencies": {
-        "loose-envify": "^1.1.0"
-      },
       "engines": {
         "node": ">=0.10.0"
       }
     },
     "node_modules/react-dom": {
-      "version": "18.3.1",
-      "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
-      "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
+      "version": "19.1.1",
+      "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.1.tgz",
+      "integrity": "sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw==",
       "license": "MIT",
       "dependencies": {
-        "loose-envify": "^1.1.0",
-        "scheduler": "^0.23.2"
+        "scheduler": "^0.26.0"
       },
       "peerDependencies": {
-        "react": "^18.3.1"
+        "react": "^19.1.1"
       }
     },
     "node_modules/react-dropzone": {
@@ -5974,14 +5322,13 @@
       }
     },
     "node_modules/react-router": {
-      "version": "7.5.3",
-      "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.5.3.tgz",
-      "integrity": "sha512-3iUDM4/fZCQ89SXlDa+Ph3MevBrozBAI655OAfWQlTm9nBR0IKlrmNwFow5lPHttbwvITZfkeeeZFP6zt3F7pw==",
+      "version": "7.8.0",
+      "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.8.0.tgz",
+      "integrity": "sha512-r15M3+LHKgM4SOapNmsH3smAizWds1vJ0Z9C4mWaKnT9/wD7+d/0jYcj6LmOvonkrO4Rgdyp4KQ/29gWN2i1eg==",
       "license": "MIT",
       "dependencies": {
         "cookie": "^1.0.1",
-        "set-cookie-parser": "^2.6.0",
-        "turbo-stream": "2.4.0"
+        "set-cookie-parser": "^2.6.0"
       },
       "engines": {
         "node": ">=20.0.0"
@@ -5996,15 +5343,6 @@
         }
       }
     },
-    "node_modules/react-router/node_modules/cookie": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz",
-      "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=18"
-      }
-    },
     "node_modules/react-syntax-highlighter": {
       "version": "15.6.1",
       "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.6.1.tgz",
@@ -6231,13 +5569,13 @@
       }
     },
     "node_modules/rollup": {
-      "version": "4.40.1",
-      "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.1.tgz",
-      "integrity": "sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==",
+      "version": "4.46.2",
+      "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.46.2.tgz",
+      "integrity": "sha512-WMmLFI+Boh6xbop+OAGo9cQ3OgX9MIg7xOQjn+pTCwOkk+FNDAeAemXkJ3HzDJrVXleLOFVa1ipuc1AmEx1Dwg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@types/estree": "1.0.7"
+        "@types/estree": "1.0.8"
       },
       "bin": {
         "rollup": "dist/bin/rollup"
@@ -6247,46 +5585,29 @@
         "npm": ">=8.0.0"
       },
       "optionalDependencies": {
-        "@rollup/rollup-android-arm-eabi": "4.40.1",
-        "@rollup/rollup-android-arm64": "4.40.1",
-        "@rollup/rollup-darwin-arm64": "4.40.1",
-        "@rollup/rollup-darwin-x64": "4.40.1",
-        "@rollup/rollup-freebsd-arm64": "4.40.1",
-        "@rollup/rollup-freebsd-x64": "4.40.1",
-        "@rollup/rollup-linux-arm-gnueabihf": "4.40.1",
-        "@rollup/rollup-linux-arm-musleabihf": "4.40.1",
-        "@rollup/rollup-linux-arm64-gnu": "4.40.1",
-        "@rollup/rollup-linux-arm64-musl": "4.40.1",
-        "@rollup/rollup-linux-loongarch64-gnu": "4.40.1",
-        "@rollup/rollup-linux-powerpc64le-gnu": "4.40.1",
-        "@rollup/rollup-linux-riscv64-gnu": "4.40.1",
-        "@rollup/rollup-linux-riscv64-musl": "4.40.1",
-        "@rollup/rollup-linux-s390x-gnu": "4.40.1",
-        "@rollup/rollup-linux-x64-gnu": "4.40.1",
-        "@rollup/rollup-linux-x64-musl": "4.40.1",
-        "@rollup/rollup-win32-arm64-msvc": "4.40.1",
-        "@rollup/rollup-win32-ia32-msvc": "4.40.1",
-        "@rollup/rollup-win32-x64-msvc": "4.40.1",
+        "@rollup/rollup-android-arm-eabi": "4.46.2",
+        "@rollup/rollup-android-arm64": "4.46.2",
+        "@rollup/rollup-darwin-arm64": "4.46.2",
+        "@rollup/rollup-darwin-x64": "4.46.2",
+        "@rollup/rollup-freebsd-arm64": "4.46.2",
+        "@rollup/rollup-freebsd-x64": "4.46.2",
+        "@rollup/rollup-linux-arm-gnueabihf": "4.46.2",
+        "@rollup/rollup-linux-arm-musleabihf": "4.46.2",
+        "@rollup/rollup-linux-arm64-gnu": "4.46.2",
+        "@rollup/rollup-linux-arm64-musl": "4.46.2",
+        "@rollup/rollup-linux-loongarch64-gnu": "4.46.2",
+        "@rollup/rollup-linux-ppc64-gnu": "4.46.2",
+        "@rollup/rollup-linux-riscv64-gnu": "4.46.2",
+        "@rollup/rollup-linux-riscv64-musl": "4.46.2",
+        "@rollup/rollup-linux-s390x-gnu": "4.46.2",
+        "@rollup/rollup-linux-x64-gnu": "4.46.2",
+        "@rollup/rollup-linux-x64-musl": "4.46.2",
+        "@rollup/rollup-win32-arm64-msvc": "4.46.2",
+        "@rollup/rollup-win32-ia32-msvc": "4.46.2",
+        "@rollup/rollup-win32-x64-msvc": "4.46.2",
         "fsevents": "~2.3.2"
       }
     },
-    "node_modules/router": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
-      "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "debug": "^4.4.0",
-        "depd": "^2.0.0",
-        "is-promise": "^4.0.0",
-        "parseurl": "^1.3.3",
-        "path-to-regexp": "^8.0.0"
-      },
-      "engines": {
-        "node": ">= 18"
-      }
-    },
     "node_modules/run-parallel": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
@@ -6321,42 +5642,11 @@
         "tslib": "^2.1.0"
       }
     },
-    "node_modules/safe-buffer": {
-      "version": "5.2.1",
-      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
-      "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/feross"
-        },
-        {
-          "type": "patreon",
-          "url": "https://www.patreon.com/feross"
-        },
-        {
-          "type": "consulting",
-          "url": "https://feross.org/support"
-        }
-      ],
-      "license": "MIT"
-    },
-    "node_modules/safer-buffer": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
-      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/scheduler": {
-      "version": "0.23.2",
-      "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
-      "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
-      "license": "MIT",
-      "dependencies": {
-        "loose-envify": "^1.1.0"
-      }
+      "version": "0.26.0",
+      "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz",
+      "integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==",
+      "license": "MIT"
     },
     "node_modules/semver": {
       "version": "6.3.1",
@@ -6368,58 +5658,12 @@
         "semver": "bin/semver.js"
       }
     },
-    "node_modules/send": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz",
-      "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "debug": "^4.3.5",
-        "encodeurl": "^2.0.0",
-        "escape-html": "^1.0.3",
-        "etag": "^1.8.1",
-        "fresh": "^2.0.0",
-        "http-errors": "^2.0.0",
-        "mime-types": "^3.0.1",
-        "ms": "^2.1.3",
-        "on-finished": "^2.4.1",
-        "range-parser": "^1.2.1",
-        "statuses": "^2.0.1"
-      },
-      "engines": {
-        "node": ">= 18"
-      }
-    },
-    "node_modules/serve-static": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz",
-      "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "encodeurl": "^2.0.0",
-        "escape-html": "^1.0.3",
-        "parseurl": "^1.3.3",
-        "send": "^1.2.0"
-      },
-      "engines": {
-        "node": ">= 18"
-      }
-    },
     "node_modules/set-cookie-parser": {
       "version": "2.7.1",
       "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz",
       "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==",
       "license": "MIT"
     },
-    "node_modules/setprototypeof": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
-      "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
-      "dev": true,
-      "license": "ISC"
-    },
     "node_modules/shebang-command": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -6456,82 +5700,6 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/side-channel": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
-      "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "es-errors": "^1.3.0",
-        "object-inspect": "^1.13.3",
-        "side-channel-list": "^1.0.0",
-        "side-channel-map": "^1.0.1",
-        "side-channel-weakmap": "^1.0.2"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/side-channel-list": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
-      "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "es-errors": "^1.3.0",
-        "object-inspect": "^1.13.3"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/side-channel-map": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
-      "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "call-bound": "^1.0.2",
-        "es-errors": "^1.3.0",
-        "get-intrinsic": "^1.2.5",
-        "object-inspect": "^1.13.3"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/side-channel-weakmap": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
-      "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "call-bound": "^1.0.2",
-        "es-errors": "^1.3.0",
-        "get-intrinsic": "^1.2.5",
-        "object-inspect": "^1.13.3",
-        "side-channel-map": "^1.0.1"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
     "node_modules/source-map": {
       "version": "0.6.1",
       "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@@ -6579,16 +5747,6 @@
       "integrity": "sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==",
       "license": "MIT"
     },
-    "node_modules/statuses": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
-      "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
     "node_modules/string-comparison": {
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/string-comparison/-/string-comparison-1.3.0.tgz",
@@ -6739,9 +5897,9 @@
       "license": "MIT"
     },
     "node_modules/tinyglobby": {
-      "version": "0.2.13",
-      "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.13.tgz",
-      "integrity": "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==",
+      "version": "0.2.14",
+      "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz",
+      "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -6768,16 +5926,6 @@
         "node": ">=8.0"
       }
     },
-    "node_modules/toidentifier": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
-      "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.6"
-      }
-    },
     "node_modules/tree-kill": {
       "version": "1.2.2",
       "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
@@ -6822,9 +5970,9 @@
       }
     },
     "node_modules/ts-pattern": {
-      "version": "5.7.0",
-      "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-5.7.0.tgz",
-      "integrity": "sha512-0/FvIG4g3kNkYgbNwBBW5pZBkfpeYQnH+2AA3xmjkCAit/DSDPKmgwC3fKof4oYUq6gupClVOJlFl+939VRBMg==",
+      "version": "5.8.0",
+      "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-5.8.0.tgz",
+      "integrity": "sha512-kIjN2qmWiHnhgr5DAkAafF9fwb0T5OhMVSWrm8XEdTFnX6+wfXwYOFjeF86UZ54vduqiR7BfqScFmXSzSaH8oA==",
       "license": "MIT"
     },
     "node_modules/tslib": {
@@ -6833,12 +5981,6 @@
       "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
       "license": "0BSD"
     },
-    "node_modules/turbo-stream": {
-      "version": "2.4.0",
-      "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz",
-      "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==",
-      "license": "ISC"
-    },
     "node_modules/type-check": {
       "version": "0.4.0",
       "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@@ -6852,25 +5994,10 @@
         "node": ">= 0.8.0"
       }
     },
-    "node_modules/type-is": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
-      "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "content-type": "^1.0.5",
-        "media-typer": "^1.1.0",
-        "mime-types": "^3.0.0"
-      },
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
     "node_modules/typescript": {
-      "version": "5.8.3",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
-      "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
+      "version": "5.9.2",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz",
+      "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
       "dev": true,
       "license": "Apache-2.0",
       "bin": {
@@ -6882,15 +6009,16 @@
       }
     },
     "node_modules/typescript-eslint": {
-      "version": "8.31.1",
-      "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.31.1.tgz",
-      "integrity": "sha512-j6DsEotD/fH39qKzXTQRwYYWlt7D+0HmfpOK+DVhwJOFLcdmn92hq3mBb7HlKJHbjjI/gTOqEcc9d6JfpFf/VA==",
+      "version": "8.39.1",
+      "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.39.1.tgz",
+      "integrity": "sha512-GDUv6/NDYngUlNvwaHM1RamYftxf782IyEDbdj3SeaIHHv8fNQVRC++fITT7kUJV/5rIA/tkoRSSskt6osEfqg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/eslint-plugin": "8.31.1",
-        "@typescript-eslint/parser": "8.31.1",
-        "@typescript-eslint/utils": "8.31.1"
+        "@typescript-eslint/eslint-plugin": "8.39.1",
+        "@typescript-eslint/parser": "8.39.1",
+        "@typescript-eslint/typescript-estree": "8.39.1",
+        "@typescript-eslint/utils": "8.39.1"
       },
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -6901,13 +6029,13 @@
       },
       "peerDependencies": {
         "eslint": "^8.57.0 || ^9.0.0",
-        "typescript": ">=4.8.4 <5.9.0"
+        "typescript": ">=4.8.4 <6.0.0"
       }
     },
     "node_modules/undici-types": {
-      "version": "6.20.0",
-      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
-      "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
+      "version": "6.21.0",
+      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
+      "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
       "dev": true,
       "license": "MIT"
     },
@@ -7008,16 +6136,6 @@
         "node": ">= 10.0.0"
       }
     },
-    "node_modules/unpipe": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
-      "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
     "node_modules/update-browserslist-db": {
       "version": "1.1.3",
       "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
@@ -7059,16 +6177,6 @@
         "punycode": "^2.1.0"
       }
     },
-    "node_modules/vary": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
-      "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
     "node_modules/vfile": {
       "version": "6.0.3",
       "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz",
@@ -7098,24 +6206,24 @@
       }
     },
     "node_modules/vite": {
-      "version": "6.3.4",
-      "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.4.tgz",
-      "integrity": "sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==",
+      "version": "7.1.2",
+      "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.2.tgz",
+      "integrity": "sha512-J0SQBPlQiEXAF7tajiH+rUooJPo0l8KQgyg4/aMunNtrOa7bwuZJsJbDWzeljqQpgftxuq5yNJxQ91O9ts29UQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "esbuild": "^0.25.0",
-        "fdir": "^6.4.4",
-        "picomatch": "^4.0.2",
-        "postcss": "^8.5.3",
-        "rollup": "^4.34.9",
-        "tinyglobby": "^0.2.13"
+        "fdir": "^6.4.6",
+        "picomatch": "^4.0.3",
+        "postcss": "^8.5.6",
+        "rollup": "^4.43.0",
+        "tinyglobby": "^0.2.14"
       },
       "bin": {
         "vite": "bin/vite.js"
       },
       "engines": {
-        "node": "^18.0.0 || ^20.0.0 || >=22.0.0"
+        "node": "^20.19.0 || >=22.12.0"
       },
       "funding": {
         "url": "https://github.com/vitejs/vite?sponsor=1"
@@ -7124,14 +6232,14 @@
         "fsevents": "~2.3.3"
       },
       "peerDependencies": {
-        "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
+        "@types/node": "^20.19.0 || >=22.12.0",
         "jiti": ">=1.21.0",
-        "less": "*",
+        "less": "^4.0.0",
         "lightningcss": "^1.21.0",
-        "sass": "*",
-        "sass-embedded": "*",
-        "stylus": "*",
-        "sugarss": "*",
+        "sass": "^1.70.0",
+        "sass-embedded": "^1.70.0",
+        "stylus": ">=0.54.8",
+        "sugarss": "^5.0.0",
         "terser": "^5.16.0",
         "tsx": "^4.8.1",
         "yaml": "^2.4.2"
@@ -7267,13 +6375,6 @@
         "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
       }
     },
-    "node_modules/wrappy": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
-      "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
-      "dev": true,
-      "license": "ISC"
-    },
     "node_modules/xtend": {
       "version": "4.0.2",
       "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
@@ -7301,15 +6402,15 @@
       "license": "ISC"
     },
     "node_modules/yaml": {
-      "version": "2.7.1",
-      "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz",
-      "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==",
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz",
+      "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==",
       "license": "ISC",
       "bin": {
         "yaml": "bin.mjs"
       },
       "engines": {
-        "node": ">= 14"
+        "node": ">= 14.6"
       }
     },
     "node_modules/yargs": {
@@ -7354,26 +6455,6 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/zod": {
-      "version": "3.24.3",
-      "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.3.tgz",
-      "integrity": "sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==",
-      "dev": true,
-      "license": "MIT",
-      "funding": {
-        "url": "https://github.com/sponsors/colinhacks"
-      }
-    },
-    "node_modules/zod-to-json-schema": {
-      "version": "3.24.5",
-      "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz",
-      "integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==",
-      "dev": true,
-      "license": "ISC",
-      "peerDependencies": {
-        "zod": "^3.24.1"
-      }
-    },
     "node_modules/zwitch": {
       "version": "2.0.4",
       "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz",
diff --git a/pdl-live-react/package.json b/pdl-live-react/package.json
index cf5adcb8a..1b5bb5f5f 100644
--- a/pdl-live-react/package.json
+++ b/pdl-live-react/package.json
@@ -36,8 +36,8 @@
     "lz-string": "^1.5.0",
     "pretty-bytes": "^7.0.0",
     "pretty-ms": "^9.2.0",
-    "react": "^18.3.1",
-    "react-dom": "^18.3.1",
+    "react": "^19.0.0",
+    "react-dom": "^19.0.0",
     "react-markdown": "^10.0.0",
     "react-router": "^7.1.5",
     "react-syntax-highlighter": "^15.6.1",
@@ -51,11 +51,11 @@
     "@eslint/js": "^9.19.0",
     "@playwright/test": "^1.50.0",
     "@tauri-apps/cli": "^2.3.0",
-    "@types/node": "22.12.0",
-    "@types/react": "^18.3.18",
-    "@types/react-dom": "^18.3.5",
+    "@types/node": "22.17.1",
+    "@types/react": "^19.0.0",
+    "@types/react-dom": "^19.0.0",
     "@types/react-syntax-highlighter": "^15.5.13",
-    "@vitejs/plugin-react": "^4.3.4",
+    "@vitejs/plugin-react": "^5.0.0",
     "concurrently": "^9.1.2",
     "eslint": "^9.19.0",
     "eslint-plugin-react-hooks": "^5.1.0",
@@ -63,9 +63,9 @@
     "globals": "^16.0.0",
     "json-schema-to-typescript": "^15.0.4",
     "prettier": "^3.4.2",
-    "typescript": "5.8",
+    "typescript": "5.9",
     "typescript-eslint": "^8.27.0",
-    "vite": "^6.2.3",
+    "vite": "^7.0.0",
     "vite-plugin-html": "^3.2.2"
   },
   "prettier": {
diff --git a/pdl-live-react/src-tauri/Cargo.lock b/pdl-live-react/src-tauri/Cargo.lock
index c6c6192f2..1baa18526 100644
--- a/pdl-live-react/src-tauri/Cargo.lock
+++ b/pdl-live-react/src-tauri/Cargo.lock
@@ -224,9 +224,9 @@ dependencies = [
 
 [[package]]
 name = "async-openai"
-version = "0.28.1"
+version = "0.29.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14d76e2f5af19477d6254415acc95ba97c6cc6f3b1e3cb4676b7f0fab8194298"
+checksum = "31acf814d6b499e33ec894bb0fd7ddaf2665b44fbdd42b858d736449271fde0c"
 dependencies = [
  "async-openai-macros",
  "backoff",
@@ -433,9 +433,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
 
 [[package]]
 name = "base64ct"
-version = "1.7.3"
+version = "1.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3"
+checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba"
 
 [[package]]
 name = "bitflags"
@@ -503,9 +503,9 @@ dependencies = [
 
 [[package]]
 name = "brotli"
-version = "7.0.0"
+version = "8.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd"
+checksum = "9991eea70ea4f293524138648e41ee89b0b2b12ddef3b255effa43c8056e0e0d"
 dependencies = [
  "alloc-no-stdlib",
  "alloc-stdlib",
@@ -514,9 +514,9 @@ dependencies = [
 
 [[package]]
 name = "brotli-decompressor"
-version = "4.0.3"
+version = "5.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a334ef7c9e23abf0ce748e8cd309037da93e606ad52eb372e4ce327a0dcfbdfd"
+checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03"
 dependencies = [
  "alloc-no-stdlib",
  "alloc-stdlib",
@@ -794,7 +794,7 @@ checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32"
 dependencies = [
  "castaway",
  "cfg-if",
- "itoa 1.0.15",
+ "itoa",
  "rustversion",
  "ryu",
  "static_assertions",
@@ -951,15 +951,15 @@ dependencies = [
 
 [[package]]
 name = "cssparser"
-version = "0.27.2"
+version = "0.29.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a"
+checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa"
 dependencies = [
  "cssparser-macros",
  "dtoa-short",
- "itoa 0.4.8",
+ "itoa",
  "matches",
- "phf 0.8.0",
+ "phf 0.10.1",
  "proc-macro2",
  "quote",
  "smallvec",
@@ -1174,7 +1174,7 @@ checksum = "e5766087c2235fec47fafa4cfecc81e494ee679d0fd4a59887ea0919bfb0e4fc"
 dependencies = [
  "cfg-if",
  "libc",
- "socket2",
+ "socket2 0.5.9",
  "windows-sys 0.48.0",
 ]
 
@@ -1210,14 +1210,14 @@ dependencies = [
 
 [[package]]
 name = "duct"
-version = "0.13.7"
+version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4ab5718d1224b63252cd0c6f74f6480f9ffeb117438a2e0f5cf6d9a4798929c"
+checksum = "d7478638a31d1f1f3d6c9f5e57c76b906a04ac4879d6fd0fb6245bc88f73fd0b"
 dependencies = [
  "libc",
- "once_cell",
  "os_pipe",
  "shared_child",
+ "shared_thread",
 ]
 
 [[package]]
@@ -1329,7 +1329,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e"
 dependencies = [
  "libc",
- "windows-sys 0.59.0",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -1390,7 +1390,7 @@ checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78"
 dependencies = [
  "cfg-if",
  "rustix 1.0.7",
- "windows-sys 0.59.0",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -2035,16 +2035,14 @@ dependencies = [
 
 [[package]]
 name = "html5ever"
-version = "0.26.0"
+version = "0.29.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7"
+checksum = "3b7410cae13cbc75623c98ac4cbfd1f0bedddf3227afc24f370cf0f50a44a11c"
 dependencies = [
  "log",
  "mac",
  "markup5ever",
- "proc-macro2",
- "quote",
- "syn 1.0.109",
+ "match_token",
 ]
 
 [[package]]
@@ -2055,7 +2053,7 @@ checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565"
 dependencies = [
  "bytes",
  "fnv",
- "itoa 1.0.15",
+ "itoa",
 ]
 
 [[package]]
@@ -2099,7 +2097,7 @@ dependencies = [
  "http",
  "http-body",
  "httparse",
- "itoa 1.0.15",
+ "itoa",
  "pin-project-lite",
  "smallvec",
  "tokio",
@@ -2142,19 +2140,23 @@ dependencies = [
 
 [[package]]
 name = "hyper-util"
-version = "0.1.11"
+version = "0.1.15"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2"
+checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df"
 dependencies = [
+ "base64 0.22.1",
  "bytes",
  "futures-channel",
+ "futures-core",
  "futures-util",
  "http",
  "http-body",
  "hyper",
+ "ipnet",
  "libc",
+ "percent-encoding",
  "pin-project-lite",
- "socket2",
+ "socket2 0.5.9",
  "tokio",
  "tower-service",
  "tracing",
@@ -2352,9 +2354,9 @@ dependencies = [
 
 [[package]]
 name = "indexmap"
-version = "2.9.0"
+version = "2.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
+checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661"
 dependencies = [
  "equivalent",
  "hashbrown 0.15.3",
@@ -2379,12 +2381,33 @@ dependencies = [
  "cfg-if",
 ]
 
+[[package]]
+name = "io-uring"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013"
+dependencies = [
+ "bitflags 2.9.0",
+ "cfg-if",
+ "libc",
+]
+
 [[package]]
 name = "ipnet"
 version = "2.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
 
+[[package]]
+name = "iri-string"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2"
+dependencies = [
+ "memchr",
+ "serde",
+]
+
 [[package]]
 name = "is-docker"
 version = "0.2.0"
@@ -2431,12 +2454,6 @@ dependencies = [
  "either",
 ]
 
-[[package]]
-name = "itoa"
-version = "0.4.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
-
 [[package]]
 name = "itoa"
 version = "1.0.15"
@@ -2552,14 +2569,13 @@ dependencies = [
 
 [[package]]
 name = "kuchikiki"
-version = "0.8.2"
+version = "0.8.8-speedreader"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8"
+checksum = "02cb977175687f33fa4afa0c95c112b987ea1443e5a51c8f8ff27dc618270cc2"
 dependencies = [
  "cssparser",
  "html5ever",
- "indexmap 1.9.3",
- "matches",
+ "indexmap 2.10.0",
  "selectors",
 ]
 
@@ -2671,7 +2687,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
 dependencies = [
  "cfg-if",
- "windows-targets 0.52.6",
+ "windows-targets 0.48.5",
 ]
 
 [[package]]
@@ -2813,18 +2829,29 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
 
 [[package]]
 name = "markup5ever"
-version = "0.11.0"
+version = "0.14.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016"
+checksum = "c7a7213d12e1864c0f002f52c2923d4556935a43dec5e71355c2760e0f6e7a18"
 dependencies = [
  "log",
- "phf 0.10.1",
- "phf_codegen 0.10.0",
+ "phf 0.11.3",
+ "phf_codegen 0.11.3",
  "string_cache",
  "string_cache_codegen",
  "tendril",
 ]
 
+[[package]]
+name = "match_token"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+]
+
 [[package]]
 name = "matches"
 version = "0.1.10"
@@ -2883,9 +2910,9 @@ dependencies = [
 
 [[package]]
 name = "minijinja"
-version = "2.9.0"
+version = "2.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "98642a6dfca91122779a307b77cd07a4aa951fbe32232aaf5bad9febc66be754"
+checksum = "4e60ac08614cc09062820e51d5d94c2fce16b94ea4e5003bb81b99a95f84e876"
 dependencies = [
  "aho-corasick",
  "serde",
@@ -2929,9 +2956,9 @@ dependencies = [
 
 [[package]]
 name = "muda"
-version = "0.16.1"
+version = "0.17.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4de14a9b5d569ca68d7c891d613b390cf5ab4f851c77aaa2f9e435555d3d9492"
+checksum = "58b89bf91c19bf036347f1ab85a81c560f08c0667c8601bece664d860a600988"
 dependencies = [
  "crossbeam-channel",
  "dpi",
@@ -3340,14 +3367,14 @@ dependencies = [
 
 [[package]]
 name = "ollama-rs"
-version = "0.3.1"
+version = "0.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0bd0e2c30868e72ffca8143873c6c1e288b2efda9d3950e9ae0d0b4039c49c3"
+checksum = "659dd1460a1079db751a236b301e78e63486758fee7e2db1ddcd2372c264be36"
 dependencies = [
  "async-stream",
  "log",
  "reqwest",
- "schemars",
+ "schemars 1.0.4",
  "serde",
  "serde_json",
  "static_assertions",
@@ -3453,9 +3480,9 @@ dependencies = [
 
 [[package]]
 name = "os_pipe"
-version = "1.2.1"
+version = "1.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982"
+checksum = "db335f4760b14ead6290116f2427bf33a14d4f0617d49f78a246de10c1831224"
 dependencies = [
  "libc",
  "windows-sys 0.59.0",
@@ -3463,9 +3490,9 @@ dependencies = [
 
 [[package]]
 name = "owo-colors"
-version = "4.2.0"
+version = "4.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1036865bb9422d3300cf723f657c2851d0e9ab12567854b1f4eba3d77decf564"
+checksum = "48dd4f4a2c8405440fd0462561f0e5806bd0f77e86f51c761481bdd4018b545e"
 
 [[package]]
 name = "page_size"
@@ -3556,7 +3583,7 @@ dependencies = [
  "fs4",
  "futures",
  "iana-time-zone",
- "indexmap 2.9.0",
+ "indexmap 2.10.0",
  "minijinja",
  "ollama-rs",
  "owo-colors",
@@ -3565,7 +3592,7 @@ dependencies = [
  "rustpython-pylib",
  "rustpython-stdlib",
  "rustpython-vm",
- "schemars",
+ "schemars 0.8.22",
  "serde",
  "serde_json",
  "serde_norway",
@@ -3595,9 +3622,7 @@ version = "0.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
 dependencies = [
- "phf_macros 0.8.0",
  "phf_shared 0.8.0",
- "proc-macro-hack",
 ]
 
 [[package]]
@@ -3606,7 +3631,9 @@ version = "0.10.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
 dependencies = [
+ "phf_macros 0.10.0",
  "phf_shared 0.10.0",
+ "proc-macro-hack",
 ]
 
 [[package]]
@@ -3629,16 +3656,6 @@ dependencies = [
  "phf_shared 0.8.0",
 ]
 
-[[package]]
-name = "phf_codegen"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
-dependencies = [
- "phf_generator 0.10.0",
- "phf_shared 0.10.0",
-]
-
 [[package]]
 name = "phf_codegen"
 version = "0.11.3"
@@ -3681,12 +3698,12 @@ dependencies = [
 
 [[package]]
 name = "phf_macros"
-version = "0.8.0"
+version = "0.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c"
+checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0"
 dependencies = [
- "phf_generator 0.8.0",
- "phf_shared 0.8.0",
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
  "proc-macro-hack",
  "proc-macro2",
  "quote",
@@ -3769,7 +3786,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "eac26e981c03a6e53e0aee43c113e3202f5581d5360dae7bd2c70e800dd0451d"
 dependencies = [
  "base64 0.22.1",
- "indexmap 2.9.0",
+ "indexmap 2.10.0",
  "quick-xml",
  "serde",
  "time",
@@ -3956,7 +3973,7 @@ dependencies = [
  "quinn-udp",
  "rustc-hash",
  "rustls",
- "socket2",
+ "socket2 0.5.9",
  "thiserror 2.0.12",
  "tokio",
  "tracing",
@@ -3992,9 +4009,9 @@ dependencies = [
  "cfg_aliases 0.2.1",
  "libc",
  "once_cell",
- "socket2",
+ "socket2 0.5.9",
  "tracing",
- "windows-sys 0.59.0",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -4187,6 +4204,26 @@ dependencies = [
  "thiserror 2.0.12",
 ]
 
+[[package]]
+name = "ref-cast"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf"
+dependencies = [
+ "ref-cast-impl",
+]
+
+[[package]]
+name = "ref-cast-impl"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+]
+
 [[package]]
 name = "regex"
 version = "1.11.1"
@@ -4218,9 +4255,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
 
 [[package]]
 name = "reqwest"
-version = "0.12.15"
+version = "0.12.22"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb"
+checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531"
 dependencies = [
  "base64 0.22.1",
  "bytes",
@@ -4233,19 +4270,15 @@ dependencies = [
  "hyper-rustls",
  "hyper-tls",
  "hyper-util",
- "ipnet",
  "js-sys",
  "log",
- "mime",
  "mime_guess",
  "native-tls",
- "once_cell",
  "percent-encoding",
  "pin-project-lite",
  "quinn",
  "rustls",
  "rustls-native-certs",
- "rustls-pemfile",
  "rustls-pki-types",
  "serde",
  "serde_json",
@@ -4256,13 +4289,13 @@ dependencies = [
  "tokio-rustls",
  "tokio-util",
  "tower",
+ "tower-http",
  "tower-service",
  "url",
  "wasm-bindgen",
  "wasm-bindgen-futures",
  "wasm-streams",
  "web-sys",
- "windows-registry",
 ]
 
 [[package]]
@@ -4408,7 +4441,7 @@ dependencies = [
  "errno",
  "libc",
  "linux-raw-sys 0.4.15",
- "windows-sys 0.59.0",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -4421,7 +4454,7 @@ dependencies = [
  "errno",
  "libc",
  "linux-raw-sys 0.9.4",
- "windows-sys 0.59.0",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -4450,15 +4483,6 @@ dependencies = [
  "security-framework 3.2.0",
 ]
 
-[[package]]
-name = "rustls-pemfile"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50"
-dependencies = [
- "rustls-pki-types",
-]
-
 [[package]]
 name = "rustls-pki-types"
 version = "1.11.0"
@@ -4486,7 +4510,7 @@ source = "git+https://github.com/RustPython/RustPython.git#85f7ba51f4f9eb8d46f45
 dependencies = [
  "ahash",
  "bitflags 2.9.0",
- "indexmap 2.9.0",
+ "indexmap 2.10.0",
  "itertools",
  "log",
  "malachite-bigint",
@@ -4662,7 +4686,7 @@ dependencies = [
  "foreign-types-shared 0.1.1",
  "gethostname",
  "hex",
- "indexmap 2.9.0",
+ "indexmap 2.10.0",
  "itertools",
  "junction",
  "libc",
@@ -4694,7 +4718,7 @@ dependencies = [
  "sha-1",
  "sha2",
  "sha3",
- "socket2",
+ "socket2 0.5.9",
  "system-configuration",
  "termios",
  "ucd",
@@ -4732,7 +4756,7 @@ dependencies = [
  "glob",
  "half",
  "hex",
- "indexmap 2.9.0",
+ "indexmap 2.10.0",
  "is-macro",
  "itertools",
  "junction",
@@ -4860,13 +4884,26 @@ checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615"
 dependencies = [
  "dyn-clone",
  "indexmap 1.9.3",
- "schemars_derive",
+ "schemars_derive 0.8.22",
  "serde",
  "serde_json",
  "url",
  "uuid",
 ]
 
+[[package]]
+name = "schemars"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0"
+dependencies = [
+ "dyn-clone",
+ "ref-cast",
+ "schemars_derive 1.0.4",
+ "serde",
+ "serde_json",
+]
+
 [[package]]
 name = "schemars_derive"
 version = "0.8.22"
@@ -4879,6 +4916,18 @@ dependencies = [
  "syn 2.0.101",
 ]
 
+[[package]]
+name = "schemars_derive"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33d020396d1d138dc19f1165df7545479dcd58d93810dc5d646a16e55abefa80"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde_derive_internals",
+ "syn 2.0.101",
+]
+
 [[package]]
 name = "scopeguard"
 version = "1.2.0"
@@ -4933,22 +4982,20 @@ dependencies = [
 
 [[package]]
 name = "selectors"
-version = "0.22.0"
+version = "0.24.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe"
+checksum = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416"
 dependencies = [
  "bitflags 1.3.2",
  "cssparser",
  "derive_more",
  "fxhash",
  "log",
- "matches",
  "phf 0.8.0",
  "phf_codegen 0.8.0",
  "precomputed-hash",
  "servo_arc",
  "smallvec",
- "thin-slice",
 ]
 
 [[package]]
@@ -5004,11 +5051,12 @@ dependencies = [
 
 [[package]]
 name = "serde_json"
-version = "1.0.140"
+version = "1.0.142"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
+checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7"
 dependencies = [
- "itoa 1.0.15",
+ "indexmap 2.10.0",
+ "itoa",
  "memchr",
  "ryu",
  "serde",
@@ -5020,8 +5068,8 @@ version = "0.9.42"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "e408f29489b5fd500fab51ff1484fc859bb655f32c671f307dcd733b72e8168c"
 dependencies = [
- "indexmap 2.9.0",
- "itoa 1.0.15",
+ "indexmap 2.10.0",
+ "itoa",
  "ryu",
  "serde",
  "unsafe-libyaml-norway",
@@ -5054,7 +5102,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
 dependencies = [
  "form_urlencoded",
- "itoa 1.0.15",
+ "itoa",
  "ryu",
  "serde",
 ]
@@ -5069,7 +5117,7 @@ dependencies = [
  "chrono",
  "hex",
  "indexmap 1.9.3",
- "indexmap 2.9.0",
+ "indexmap 2.10.0",
  "serde",
  "serde_derive",
  "serde_json",
@@ -5124,9 +5172,9 @@ dependencies = [
 
 [[package]]
 name = "servo_arc"
-version = "0.1.1"
+version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432"
+checksum = "d52aa42f8fdf0fed91e5ce7f23d8138441002fa31dca008acf47e6fd4721f741"
 dependencies = [
  "nodrop",
  "stable_deref_trait",
@@ -5166,12 +5214,13 @@ dependencies = [
 
 [[package]]
 name = "shared_child"
-version = "1.0.2"
+version = "1.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e297bd52991bbe0686c086957bee142f13df85d1e79b0b21630a99d374ae9dc"
+checksum = "1e362d9935bc50f019969e2f9ecd66786612daae13e8f277be7bfb66e8bed3f7"
 dependencies = [
  "libc",
- "windows-sys 0.59.0",
+ "sigchld",
+ "windows-sys 0.60.2",
 ]
 
 [[package]]
@@ -5184,6 +5233,12 @@ dependencies = [
  "libc",
 ]
 
+[[package]]
+name = "shared_thread"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52b86057fcb5423f5018e331ac04623e32d6b5ce85e33300f92c79a1973928b0"
+
 [[package]]
 name = "shell-words"
 version = "1.1.0"
@@ -5196,6 +5251,27 @@ version = "1.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
 
+[[package]]
+name = "sigchld"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47106eded3c154e70176fc83df9737335c94ce22f821c32d17ed1db1f83badb1"
+dependencies = [
+ "libc",
+ "os_pipe",
+ "signal-hook",
+]
+
+[[package]]
+name = "signal-hook"
+version = "0.3.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2"
+dependencies = [
+ "libc",
+ "signal-hook-registry",
+]
+
 [[package]]
 name = "signal-hook-registry"
 version = "1.4.5"
@@ -5248,6 +5324,16 @@ dependencies = [
  "windows-sys 0.52.0",
 ]
 
+[[package]]
+name = "socket2"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807"
+dependencies = [
+ "libc",
+ "windows-sys 0.59.0",
+]
+
 [[package]]
 name = "softbuffer"
 version = "0.4.6"
@@ -5464,9 +5550,9 @@ dependencies = [
 
 [[package]]
 name = "tao"
-version = "0.33.0"
+version = "0.34.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e59c1f38e657351a2e822eadf40d6a2ad4627b9c25557bc1180ec1b3295ef82"
+checksum = "49c380ca75a231b87b6c9dd86948f035012e7171d1a7c40a9c2890489a7ffd8a"
 dependencies = [
  "bitflags 2.9.0",
  "core-foundation 0.10.0",
@@ -5520,17 +5606,16 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
 
 [[package]]
 name = "tauri"
-version = "2.5.1"
+version = "2.7.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7b0bc1aec81bda6bc455ea98fcaed26b3c98c1648c627ad6ff1c704e8bf8cbc"
+checksum = "352a4bc7bf6c25f5624227e3641adf475a6535707451b09bb83271df8b7a6ac7"
 dependencies = [
  "anyhow",
  "bytes",
  "dirs",
  "dunce",
  "embed_plist",
- "futures-util",
- "getrandom 0.2.16",
+ "getrandom 0.3.2",
  "glob",
  "gtk",
  "heck 0.5.0",
@@ -5571,9 +5656,9 @@ dependencies = [
 
 [[package]]
 name = "tauri-build"
-version = "2.2.0"
+version = "2.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7a0350f0df1db385ca5c02888a83e0e66655c245b7443db8b78a70da7d7f8fc"
+checksum = "182d688496c06bf08ea896459bf483eb29cdff35c1c4c115fb14053514303064"
 dependencies = [
  "anyhow",
  "cargo_toml",
@@ -5581,7 +5666,7 @@ dependencies = [
  "glob",
  "heck 0.5.0",
  "json-patch",
- "schemars",
+ "schemars 0.8.22",
  "semver",
  "serde",
  "serde_json",
@@ -5593,9 +5678,9 @@ dependencies = [
 
 [[package]]
 name = "tauri-codegen"
-version = "2.2.0"
+version = "2.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f93f035551bf7b11b3f51ad9bc231ebbe5e085565527991c16cf326aa38cdf47"
+checksum = "b54a99a6cd8e01abcfa61508177e6096a4fe2681efecee9214e962f2f073ae4a"
 dependencies = [
  "base64 0.22.1",
  "brotli",
@@ -5620,9 +5705,9 @@ dependencies = [
 
 [[package]]
 name = "tauri-macros"
-version = "2.2.0"
+version = "2.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8db4df25e2d9d45de0c4c910da61cd5500190da14ae4830749fee3466dddd112"
+checksum = "7945b14dc45e23532f2ded6e120170bbdd4af5ceaa45784a6b33d250fbce3f9e"
 dependencies = [
  "heck 0.5.0",
  "proc-macro2",
@@ -5634,14 +5719,14 @@ dependencies = [
 
 [[package]]
 name = "tauri-plugin"
-version = "2.2.0"
+version = "2.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37a5ebe6a610d1b78a94650896e6f7c9796323f408800cef436e0fa0539de601"
+checksum = "1d9a0bd00bf1930ad1a604d08b0eb6b2a9c1822686d65d7f4731a7723b8901d3"
 dependencies = [
  "anyhow",
  "glob",
  "plist",
- "schemars",
+ "schemars 0.8.22",
  "serde",
  "serde_json",
  "tauri-utils",
@@ -5651,9 +5736,9 @@ dependencies = [
 
 [[package]]
 name = "tauri-plugin-cli"
-version = "2.2.0"
+version = "2.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5458ae16eac81bdbe8d9da2a9f3e01e8cdedbc381cc1727c01127542c8a61c5"
+checksum = "53e76101cc9848adfb6a04aae48a389062be457a785bb4349ae1423ddab5a82d"
 dependencies = [
  "clap",
  "log",
@@ -5666,23 +5751,23 @@ dependencies = [
 
 [[package]]
 name = "tauri-plugin-opener"
-version = "2.2.6"
+version = "2.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2fdc6cb608e04b7d2b6d1f21e9444ad49245f6d03465ba53323d692d1ceb1a30"
+checksum = "ecee219f11cdac713ab32959db5d0cceec4810ba4f4458da992292ecf9660321"
 dependencies = [
  "dunce",
  "glob",
  "objc2-app-kit",
  "objc2-foundation 0.3.1",
  "open",
- "schemars",
+ "schemars 0.8.22",
  "serde",
  "serde_json",
  "tauri",
  "tauri-plugin",
  "thiserror 2.0.12",
  "url",
- "windows 0.60.0",
+ "windows 0.61.1",
  "zbus",
 ]
 
@@ -5701,9 +5786,9 @@ dependencies = [
 
 [[package]]
 name = "tauri-plugin-window-state"
-version = "2.2.2"
+version = "2.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a27a3fe49de72adbe0d84aee33c89a0b059722cd0b42aaeab29eaaee7f7535cd"
+checksum = "2d5f6fe3291bfa609c7e0b0ee3bedac294d94c7018934086ce782c1d0f2a468e"
 dependencies = [
  "bitflags 2.9.0",
  "log",
@@ -5716,9 +5801,9 @@ dependencies = [
 
 [[package]]
 name = "tauri-runtime"
-version = "2.6.0"
+version = "2.7.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00f004905d549854069e6774533d742b03cacfd6f03deb08940a8677586cbe39"
+checksum = "2b1cc885be806ea15ff7b0eb47098a7b16323d9228876afda329e34e2d6c4676"
 dependencies = [
  "cookie",
  "dpi",
@@ -5738,9 +5823,9 @@ dependencies = [
 
 [[package]]
 name = "tauri-runtime-wry"
-version = "2.6.0"
+version = "2.7.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f85d056f4d4b014fe874814034f3416d57114b617a493a4fe552580851a3f3a2"
+checksum = "fe653a2fbbef19fe898efc774bc52c8742576342a33d3d028c189b57eb1d2439"
 dependencies = [
  "gtk",
  "http",
@@ -5765,9 +5850,9 @@ dependencies = [
 
 [[package]]
 name = "tauri-utils"
-version = "2.4.0"
+version = "2.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2900399c239a471bcff7f15c4399eb1a8c4fe511ba2853e07c996d771a5e0a4"
+checksum = "9330c15cabfe1d9f213478c9e8ec2b0c76dab26bb6f314b8ad1c8a568c1d186e"
 dependencies = [
  "anyhow",
  "brotli",
@@ -5786,7 +5871,7 @@ dependencies = [
  "proc-macro2",
  "quote",
  "regex",
- "schemars",
+ "schemars 0.8.22",
  "semver",
  "serde",
  "serde-untagged",
@@ -5808,21 +5893,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "e8d321dbc6f998d825ab3f0d62673e810c861aac2d0de2cc2c395328f1d113b4"
 dependencies = [
  "embed-resource",
- "indexmap 2.9.0",
+ "indexmap 2.10.0",
  "toml",
 ]
 
 [[package]]
 name = "tempfile"
-version = "3.19.1"
+version = "3.20.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf"
+checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1"
 dependencies = [
  "fastrand",
  "getrandom 0.3.2",
  "once_cell",
  "rustix 1.0.7",
- "windows-sys 0.59.0",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -5851,12 +5936,6 @@ version = "0.16.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057"
 
-[[package]]
-name = "thin-slice"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
-
 [[package]]
 name = "thiserror"
 version = "1.0.69"
@@ -5914,7 +5993,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
 dependencies = [
  "deranged",
- "itoa 1.0.15",
+ "itoa",
  "num-conv",
  "powerfmt",
  "serde",
@@ -5971,20 +6050,22 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
 
 [[package]]
 name = "tokio"
-version = "1.44.2"
+version = "1.47.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48"
+checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038"
 dependencies = [
  "backtrace",
  "bytes",
+ "io-uring",
  "libc",
  "mio",
  "parking_lot",
  "pin-project-lite",
  "signal-hook-registry",
- "socket2",
+ "slab",
+ "socket2 0.6.0",
  "tokio-macros",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
 ]
 
 [[package]]
@@ -6069,7 +6150,7 @@ version = "0.19.15"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
 dependencies = [
- "indexmap 2.9.0",
+ "indexmap 2.10.0",
  "toml_datetime",
  "winnow 0.5.40",
 ]
@@ -6080,7 +6161,7 @@ version = "0.20.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
 dependencies = [
- "indexmap 2.9.0",
+ "indexmap 2.10.0",
  "toml_datetime",
  "winnow 0.5.40",
 ]
@@ -6091,7 +6172,7 @@ version = "0.22.26"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e"
 dependencies = [
- "indexmap 2.9.0",
+ "indexmap 2.10.0",
  "serde",
  "serde_spanned",
  "toml_datetime",
@@ -6120,6 +6201,24 @@ dependencies = [
  "tower-service",
 ]
 
+[[package]]
+name = "tower-http"
+version = "0.6.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2"
+dependencies = [
+ "bitflags 2.9.0",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "iri-string",
+ "pin-project-lite",
+ "tower",
+ "tower-layer",
+ "tower-service",
+]
+
 [[package]]
 name = "tower-layer"
 version = "0.3.3"
@@ -6165,9 +6264,9 @@ dependencies = [
 
 [[package]]
 name = "tray-icon"
-version = "0.20.1"
+version = "0.21.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f7eee98ec5c90daf179d55c20a49d8c0d043054ce7c26336c09a24d31f14fa0"
+checksum = "2da75ec677957aa21f6e0b361df0daab972f13a5bee3606de0638fd4ee1c666a"
 dependencies = [
  "crossbeam-channel",
  "dirs",
@@ -6716,15 +6815,15 @@ dependencies = [
 
 [[package]]
 name = "webview2-com"
-version = "0.37.0"
+version = "0.38.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b542b5cfbd9618c46c2784e4d41ba218c336ac70d44c55e47b251033e7d85601"
+checksum = "d4ba622a989277ef3886dd5afb3e280e3dd6d974b766118950a08f8f678ad6a4"
 dependencies = [
  "webview2-com-macros",
  "webview2-com-sys",
  "windows 0.61.1",
  "windows-core 0.61.0",
- "windows-implement 0.60.0",
+ "windows-implement",
  "windows-interface",
 ]
 
@@ -6741,9 +6840,9 @@ dependencies = [
 
 [[package]]
 name = "webview2-com-sys"
-version = "0.37.0"
+version = "0.38.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ae2d11c4a686e4409659d7891791254cf9286d3cfe0eef54df1523533d22295"
+checksum = "36695906a1b53a3bf5c4289621efedac12b73eeb0b89e7e1a89b517302d5d75c"
 dependencies = [
  "thiserror 2.0.12",
  "windows 0.61.1",
@@ -6790,7 +6889,7 @@ version = "0.1.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
 dependencies = [
- "windows-sys 0.59.0",
+ "windows-sys 0.48.0",
 ]
 
 [[package]]
@@ -6824,39 +6923,17 @@ dependencies = [
  "windows-targets 0.52.6",
 ]
 
-[[package]]
-name = "windows"
-version = "0.60.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddf874e74c7a99773e62b1c671427abf01a425e77c3d3fb9fb1e4883ea934529"
-dependencies = [
- "windows-collections 0.1.1",
- "windows-core 0.60.1",
- "windows-future 0.1.1",
- "windows-link",
- "windows-numerics 0.1.1",
-]
-
 [[package]]
 name = "windows"
 version = "0.61.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419"
 dependencies = [
- "windows-collections 0.2.0",
+ "windows-collections",
  "windows-core 0.61.0",
- "windows-future 0.2.0",
+ "windows-future",
  "windows-link",
- "windows-numerics 0.2.0",
-]
-
-[[package]]
-name = "windows-collections"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5467f79cc1ba3f52ebb2ed41dbb459b8e7db636cc3429458d9a852e15bc24dec"
-dependencies = [
- "windows-core 0.60.1",
+ "windows-numerics",
 ]
 
 [[package]]
@@ -6877,40 +6954,17 @@ dependencies = [
  "windows-targets 0.52.6",
 ]
 
-[[package]]
-name = "windows-core"
-version = "0.60.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca21a92a9cae9bf4ccae5cf8368dce0837100ddf6e6d57936749e85f152f6247"
-dependencies = [
- "windows-implement 0.59.0",
- "windows-interface",
- "windows-link",
- "windows-result",
- "windows-strings 0.3.1",
-]
-
 [[package]]
 name = "windows-core"
 version = "0.61.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
 dependencies = [
- "windows-implement 0.60.0",
+ "windows-implement",
  "windows-interface",
  "windows-link",
  "windows-result",
- "windows-strings 0.4.0",
-]
-
-[[package]]
-name = "windows-future"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a787db4595e7eb80239b74ce8babfb1363d8e343ab072f2ffe901400c03349f0"
-dependencies = [
- "windows-core 0.60.1",
- "windows-link",
+ "windows-strings",
 ]
 
 [[package]]
@@ -6923,17 +6977,6 @@ dependencies = [
  "windows-link",
 ]
 
-[[package]]
-name = "windows-implement"
-version = "0.59.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.101",
-]
-
 [[package]]
 name = "windows-implement"
 version = "0.60.0"
@@ -6962,16 +7005,6 @@ version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
 
-[[package]]
-name = "windows-numerics"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "005dea54e2f6499f2cee279b8f703b3cf3b5734a2d8d21867c8f44003182eeed"
-dependencies = [
- "windows-core 0.60.1",
- "windows-link",
-]
-
 [[package]]
 name = "windows-numerics"
 version = "0.2.0"
@@ -6982,17 +7015,6 @@ dependencies = [
  "windows-link",
 ]
 
-[[package]]
-name = "windows-registry"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3"
-dependencies = [
- "windows-result",
- "windows-strings 0.3.1",
- "windows-targets 0.53.0",
-]
-
 [[package]]
 name = "windows-result"
 version = "0.3.2"
@@ -7002,15 +7024,6 @@ dependencies = [
  "windows-link",
 ]
 
-[[package]]
-name = "windows-strings"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319"
-dependencies = [
- "windows-link",
-]
-
 [[package]]
 name = "windows-strings"
 version = "0.4.0"
@@ -7056,6 +7069,15 @@ dependencies = [
  "windows-targets 0.52.6",
 ]
 
+[[package]]
+name = "windows-sys"
+version = "0.60.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
+dependencies = [
+ "windows-targets 0.53.2",
+]
+
 [[package]]
 name = "windows-targets"
 version = "0.42.2"
@@ -7104,9 +7126,9 @@ dependencies = [
 
 [[package]]
 name = "windows-targets"
-version = "0.53.0"
+version = "0.53.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b"
+checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef"
 dependencies = [
  "windows_aarch64_gnullvm 0.53.0",
  "windows_aarch64_msvc 0.53.0",
@@ -7383,9 +7405,9 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
 
 [[package]]
 name = "wry"
-version = "0.51.2"
+version = "0.52.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c886a0a9d2a94fd90cfa1d929629b79cfefb1546e2c7430c63a47f0664c0e4e2"
+checksum = "12a714d9ba7075aae04a6e50229d6109e3d584774b99a6a8c60de1698ca111b9"
 dependencies = [
  "base64 0.22.1",
  "block2 0.6.1",
@@ -7464,9 +7486,9 @@ checksum = "a62ce76d9b56901b19a74f19431b0d8b3bc7ca4ad685a746dfd78ca8f4fc6bda"
 
 [[package]]
 name = "yaml-rust2"
-version = "0.10.1"
+version = "0.10.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "818913695e83ece1f8d2a1c52d54484b7b46d0f9c06beeb2649b9da50d9b512d"
+checksum = "4ce2a4ff45552406d02501cea6c18d8a7e50228e7736a872951fe2fe75c91be7"
 dependencies = [
  "arraydeque",
  "encoding_rs",
diff --git a/pdl-live-react/src-tauri/Cargo.toml b/pdl-live-react/src-tauri/Cargo.toml
index c477183ea..d06bc85d6 100644
--- a/pdl-live-react/src-tauri/Cargo.toml
+++ b/pdl-live-react/src-tauri/Cargo.toml
@@ -14,6 +14,9 @@ edition = "2024"
 name = "tauri_app_lib"
 crate-type = ["staticlib", "cdylib", "rlib"]
 
+[features]
+interpreter = ["dep:rustpython-vm", "dep:rustpython-stdlib", "dep:rustpython-pylib"]
+
 [build-dependencies]
 tauri-build = { version = "2", features = [] }
 
@@ -26,7 +29,7 @@ serde = { version = "1", features = ["derive"] }
 serde_json = "1"
 urlencoding = "2.1.3"
 tempfile = "3.16.0"
-duct = "0.13.7"
+duct = "1.0.0"
 rayon = "1.10.0"
 yaml-rust2 = "0.10.0"
 futures = "0.3.31"
@@ -37,18 +40,18 @@ serde_norway = "0.9.42"
 minijinja = { version = "2.9.0", features = ["custom_syntax"] }
 ollama-rs = { version = "0.3.1", features = ["stream"] }
 owo-colors = "4.2.0"
-rustpython-vm = { git="https://github.com/RustPython/RustPython.git", features= ["importlib", "threading", "encodings"] } # "0.4.0"
+rustpython-vm = { git="https://github.com/RustPython/RustPython.git", features= ["importlib", "threading", "encodings"], optional = true } # "0.4.0"
 async-recursion = "1.1.1"
 tokio-stream = "0.1.17"
 tokio = { version = "1.44.1", features = ["io-std"] }
 indexmap = { version = "2.9.0", features = ["serde"] }
-rustpython-stdlib = { git="https://github.com/RustPython/RustPython.git", features = ["ssl-vendor"] } # 0.4.0
-rustpython-pylib = { git="https://github.com/RustPython/RustPython.git", features = ["freeze-stdlib"] } # 0.4.0
+rustpython-stdlib = { git="https://github.com/RustPython/RustPython.git", features = ["ssl-vendor"], optional = true } # 0.4.0
+rustpython-pylib = { git="https://github.com/RustPython/RustPython.git", features = ["freeze-stdlib"], optional = true } # 0.4.0
 schemars = "0.8.22"
 fs4 = "0.13.1"
 derive_builder = "0.20.2"
 iana-time-zone = "0.1.63"
-async-openai = "0.28.1"
+async-openai = "0.29.0"
 regex = "1.11.1"
 
 [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
diff --git a/pdl-live-react/src-tauri/src/cli.rs b/pdl-live-react/src-tauri/src/cli.rs
index a85a6b6fd..9aba03a0e 100644
--- a/pdl-live-react/src-tauri/src/cli.rs
+++ b/pdl-live-react/src-tauri/src/cli.rs
@@ -5,6 +5,7 @@ use urlencoding::encode;
 
 use crate::compile;
 use crate::gui::new_window;
+#[cfg(feature = "interpreter")]
 use crate::pdl::interpreter::{RunOptions, load_scope, run_file_sync};
 
 #[cfg(desktop)]
@@ -49,6 +50,7 @@ pub fn setup(app: &mut tauri::App) -> Result>
                 _ => Err(Box::from("Unsupported compile command")),
             }
         }
+        #[cfg(feature = "interpreter")]
         "run" => run_file_sync(
             subcommand_args
                 .get("source")
diff --git a/pdl-live-react/src-tauri/src/commands/mod.rs b/pdl-live-react/src-tauri/src/commands/mod.rs
index 5c98f7441..f78e96cdd 100644
--- a/pdl-live-react/src-tauri/src/commands/mod.rs
+++ b/pdl-live-react/src-tauri/src/commands/mod.rs
@@ -1,3 +1,5 @@
+#[cfg(feature = "interpreter")]
 pub mod interpreter;
+
 pub mod read_trace;
 pub mod replay_prep;
diff --git a/pdl-live-react/src-tauri/src/lib.rs b/pdl-live-react/src-tauri/src/lib.rs
index 86b0b444c..1589720de 100644
--- a/pdl-live-react/src-tauri/src/lib.rs
+++ b/pdl-live-react/src-tauri/src/lib.rs
@@ -33,6 +33,7 @@ pub fn run() {
         .invoke_handler(tauri::generate_handler![
             commands::read_trace::read_trace,
             commands::replay_prep::replay_prep,
+            #[cfg(feature = "interpreter")]
             commands::interpreter::run_pdl_program,
         ])
         .run(tauri::generate_context!())
diff --git a/pdl-live-react/src-tauri/src/pdl/mod.rs b/pdl-live-react/src-tauri/src/pdl/mod.rs
index 179cb9e10..b8580f387 100644
--- a/pdl-live-react/src-tauri/src/pdl/mod.rs
+++ b/pdl-live-react/src-tauri/src/pdl/mod.rs
@@ -1,6 +1,8 @@
 pub mod ast;
 pub mod extract;
+#[cfg(feature = "interpreter")]
 pub mod interpreter;
+#[cfg(feature = "interpreter")]
 mod interpreter_tests;
 pub mod pip;
 pub mod pull;
diff --git a/pdl-live-react/src/helpers.ts b/pdl-live-react/src/helpers.ts
index 10edab5df..b63cfa1ef 100644
--- a/pdl-live-react/src/helpers.ts
+++ b/pdl-live-react/src/helpers.ts
@@ -6,7 +6,7 @@ import type {
   TextBlock,
   ArgsBlock,
   CodeBlock,
-  PdlModelInput,
+  ModelInput,
   LocalizedExpression,
 } from "./pdl_ast"
 import { match, P } from "ts-pattern"
@@ -232,10 +232,10 @@ export function hasMessage(block: PdlBlock): block is MessageBearing {
 
 export function hasInput(block: PdlBlock): block is
   | (Omit & {
-      pdl__model_input: NonNullable
+      pdl__model_input: NonNullable
     })
   | (Omit & {
-      pdl__model_input: NonNullable
+      pdl__model_input: NonNullable
     }) {
   const mb = block as ModelBlock
   return Array.isArray(mb.pdl__model_input) && mb.pdl__model_input.length > 0
diff --git a/pdl-live-react/src/pdl_ast.d.ts b/pdl-live-react/src/pdl_ast.d.ts
index f15502b41..148e0a0aa 100644
--- a/pdl-live-react/src/pdl_ast.d.ts
+++ b/pdl-live-react/src/pdl_ast.d.ts
@@ -24,6 +24,7 @@ export type Program =
   | IfBlock
   | MatchBlock
   | RepeatBlock
+  | MapBlock
   | TextBlock
   | LastOfBlock
   | ArrayBlock
@@ -35,11 +36,6 @@ export type Program =
   | ErrorBlock
   | EmptyBlock
   | null
-/**
- * Documentation associated to the block.
- *
- */
-export type Description = string | null
 export type Enum = unknown[]
 export type PdlTypeType =
   | (
@@ -67,2499 +63,570 @@ export type PdlTypeType =
     }
   | null
 export type Type = string | string[]
+export type BlockType =
+  | boolean
+  | number
+  | string
+  | FunctionBlock
+  | CallBlock
+  | LitellmModelBlock
+  | GraniteioModelBlock
+  | CodeBlock
+  | ArgsBlock
+  | GetBlock
+  | DataBlock
+  | IfBlock
+  | MatchBlock
+  | RepeatBlock
+  | MapBlock
+  | TextBlock
+  | LastOfBlock
+  | ArrayBlock
+  | ObjectBlock
+  | MessageBlock
+  | ReadBlock
+  | IncludeBlock
+  | ImportBlock
+  | ErrorBlock
+  | EmptyBlock
+  | null
 /**
- * Documentation associated to the block.
- *
+ * Values allowed in the `contribute` field.
  */
-export type Description1 = string | null
+export type ContributeTarget = "result" | "context"
+export type Value = LocalizedExpression | unknown[] | string
+export type Path = string[]
+export type File = string
 /**
- * Documentation associated to the block.
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type Description2 = string | null
+export type ContributeType = (
+  | ContributeTarget
+  | {
+      [k: string]: ContributeValue
+    }
+)[]
+export type ParserType = ("json" | "jsonl" | "yaml") | PdlParser | RegexParser
+export type Regex = string
+export type Mode = "search" | "match" | "fullmatch" | "split" | "findall"
+export type Evaluate = LocalizedExpression | FunctionBlock | string | null
+export type Transformcontext =
+  | LocalizedExpression
+  | FunctionBlock
+  | string
+  | null
 /**
- * Documentation associated to the block.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type Description3 = string | null
+export type RequirementsType = RequirementType[]
+export type ModelInput = {
+  [k: string]: unknown
+}[]
+export type PdlIsLeaf = true
+export type Kind = "call"
 /**
- * Documentation associated to the block.
+ * Function to call.
  *
  */
-export type Description4 = string | null
+export type Call = LocalizedExpression | FunctionBlock | string
 /**
- * Documentation associated to the block.
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type Description5 = string | null
+export type ContributeType1 = (
+  | ContributeTarget
+  | {
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Documentation associated to the block.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type Description6 = string | null
+export type RequirementsType1 = RequirementType[]
+export type PdlIsLeaf1 = true
+export type Kind1 = "model"
 /**
- * Documentation associated to the block.
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type Description7 = string | null
+export type ContributeType2 = (
+  | ContributeTarget
+  | {
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Documentation associated to the block.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type Description8 = string | null
+export type RequirementsType2 = RequirementType[]
+export type PdlIsLeaf2 = true
+export type Kind2 = "model"
 /**
- * Documentation associated to the block.
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type Description9 = string | null
+export type ContributeType3 = (
+  | ContributeTarget
+  | {
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Documentation associated to the block.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type Description10 = string | null
+export type RequirementsType3 = RequirementType[]
+export type PdlIsLeaf3 = true
+export type Kind3 = "code"
 /**
- * Documentation associated to the block.
+ * Programming language of the code.
  *
  */
-export type Description11 = string | null
+export type Lang = "python" | "command" | "jinja" | "pdl" | "ipython"
 /**
- * Documentation associated to the block.
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type Description12 = string | null
+export type ContributeType4 = (
+  | ContributeTarget
+  | {
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Documentation associated to the block.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type Description13 = string | null
+export type RequirementsType4 = RequirementType[]
+export type PdlIsLeaf4 = true
+export type Kind4 = "code"
+export type Lang1 = "command"
+export type ExpressionStr = LocalizedExpression | string
 /**
- * Documentation associated to the block.
+ * The argument vector to spawn.
  *
  */
-export type Description14 = string | null
+export type Args1 = ExpressionStr[]
 /**
- * Documentation associated to the block.
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type Description15 = string | null
+export type ContributeType5 = (
+  | ContributeTarget
+  | {
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Documentation associated to the block.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type Description16 = string | null
+export type RequirementsType5 = RequirementType[]
+export type PdlIsLeaf5 = true
+export type Kind5 = "get"
 /**
- * Documentation associated to the block.
- *
+ * Name of the variable to access.
  */
-export type Description17 = string | null
+export type Get = string
 /**
- * Documentation associated to the block.
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type Description18 = string | null
+export type ContributeType6 = (
+  | ContributeTarget
+  | {
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Documentation associated to the block.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type Description19 = string | null
+export type RequirementsType6 = RequirementType[]
+export type PdlIsLeaf6 = true
+export type Kind6 = "data"
 /**
- * Documentation associated to the block.
- *
+ * Do not evaluate expressions inside strings.
  */
-export type Description20 = string | null
+export type Raw = boolean
 /**
- * Name of the variable used to store the result of the execution of the block.
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type Def = string | null
+export type ContributeType7 = (
+  | ContributeTarget
+  | {
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Values allowed in the `contribute` field.
+ * Specify any requirements that the result of the block must satisfy.
+ *
  */
-export type ContributeTarget = "result" | "context"
-export type Value = LocalizedExpression | unknown[] | string
-export type Path = string[]
-export type File = string
+export type RequirementsType7 = RequirementType[]
+export type PdlIsLeaf7 = false
+export type IndependentEnum = "independent" | "dependent"
+export type Kind7 = "if"
 /**
  * Indicate if the block contributes to the result and background context.
  *
  */
-export type Contribute = (
+export type ContributeType8 = (
   | ContributeTarget
   | {
       [k: string]: ContributeValue
     }
 )[]
 /**
- * Parser to use to construct a value out of a string result.
+ * Specify any requirements that the result of the block must satisfy.
+ *
  */
-export type Parser =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-export type Description21 = string | null
-export type Pdl =
+export type RequirementsType8 = RequirementType[]
+export type PdlIsLeaf8 = false
+export type IndependentEnum1 = "independent" | "dependent"
+export type Kind8 = "match"
+export type PatternType =
   | boolean
   | number
   | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
+  | OrPattern
+  | ArrayPattern
+  | ObjectPattern
+  | AnyPattern
   | null
-export type Description22 = string | null
-export type Regex = string
-export type Mode = "search" | "match" | "fullmatch" | "split" | "findall"
+export type Anyof = PatternType[]
+export type Array = PatternType[]
+export type Any = null
+export type ExpressionBool = LocalizedExpression | boolean | string
+export type PdlCaseResult = boolean | null
+export type PdlIfResult = boolean | null
+export type PdlMatched = boolean | null
 /**
- * Block to execute in case of error.
+ * List of cases to match.
  *
  */
-export type Fallback =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
+export type With = MatchCase[]
 /**
- * The maximum number of times to retry when an error occurs within a block.
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type Retry = number | null
+export type ContributeType9 = (
+  | ContributeTarget
+  | {
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type TraceErrorOnRetry = boolean | string | null
+export type RequirementsType9 = RequirementType[]
+export type PdlIsLeaf9 = false
+export type IndependentEnum2 = "independent" | "dependent"
+export type Kind9 = "repeat"
 /**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
+ * Arrays to iterate over.
+ *
  */
-export type Role = string | null
+export type For = {
+  [k: string]: LocalizedExpression | unknown[] | string
+} | null
 /**
- * Current context
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type PdlContext =
+export type ContributeType10 = (
+  | ContributeTarget
   | {
-      [k: string]: unknown
-    }[]
-  | null
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Unique identifier for this block
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type PdlId = string | null
-export type StartNanos = number | null
-export type EndNanos = number | null
-export type FirstUseNanos = number | null
-export type Timezone = string | null
-export type PdlIsLeaf = true
-export type Kind = "empty"
+export type RequirementsType10 = RequirementType[]
+export type PdlIsLeaf10 = false
+export type IndependentEnum3 = "independent" | "dependent"
+export type Kind10 = "map"
 /**
- * Name of the variable used to store the result of the execution of the block.
+ * Arrays to iterate over.
  *
  */
-export type Def1 = string | null
+export type For1 = {
+  [k: string]: LocalizedExpression | unknown[] | string
+} | null
 /**
  * Indicate if the block contributes to the result and background context.
  *
  */
-export type Contribute1 = (
+export type ContributeType11 = (
   | ContributeTarget
   | {
       [k: string]: ContributeValue
     }
 )[]
 /**
- * Parser to use to construct a value out of a string result.
+ * Specify any requirements that the result of the block must satisfy.
+ *
  */
-export type Parser1 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
+export type RequirementsType11 = RequirementType[]
+export type PdlIsLeaf11 = false
+export type IndependentEnum4 = "independent" | "dependent"
+export type Kind11 = "text"
 /**
- * Block to execute in case of error.
+ * Body of the text.
  *
  */
-export type Fallback1 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
+export type Text = BlockType | BlockType[]
 /**
- * The maximum number of times to retry when an error occurs within a block.
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type Retry1 = number | null
+export type ContributeType12 = (
+  | ContributeTarget
+  | {
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type TraceErrorOnRetry1 = boolean | string | null
+export type RequirementsType12 = RequirementType[]
+export type PdlIsLeaf12 = false
+export type IndependentEnum5 = "independent" | "dependent"
+export type Kind12 = "lastOf"
 /**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
+ * Sequence of blocks to execute.
  */
-export type Role1 = string | null
+export type Lastof = BlockType[]
 /**
- * Current context
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type PdlContext1 =
+export type ContributeType13 = (
+  | ContributeTarget
   | {
-      [k: string]: unknown
-    }[]
-  | null
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Unique identifier for this block
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type PdlId1 = string | null
-export type PdlIsLeaf1 = true
-export type Kind1 = "error"
+export type RequirementsType13 = RequirementType[]
+export type PdlIsLeaf13 = false
+export type IndependentEnum6 = "independent" | "dependent"
+export type Kind13 = "array"
 /**
- * Error message.
- *
+ * Elements of the array.
  */
-export type Msg = string
+export type Array1 = BlockType[]
 /**
- * Block that raised the error.
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type Program1 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def2 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute2 = (
+export type ContributeType14 = (
   | ContributeTarget
   | {
       [k: string]: ContributeValue
     }
 )[]
 /**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser2 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback2 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry2 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry2 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role2 = string | null
-/**
- * Current context
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type PdlContext2 =
+export type RequirementsType14 = RequirementType[]
+export type PdlIsLeaf14 = false
+export type IndependentEnum7 = "independent" | "dependent"
+export type Kind14 = "object"
+export type Object2 =
   | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId2 = string | null
-export type PdlIsLeaf2 = true
-export type Kind2 = "import"
+      [k: string]: BlockType
+    }
+  | BlockType[]
 /**
- * Name of the file to import.
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type Import = string
-export type PdlTrace =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
+export type ContributeType15 = (
+  | ContributeTarget
+  | {
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Name of the variable used to store the result of the execution of the block.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type Def3 = string | null
+export type RequirementsType15 = RequirementType[]
+export type PdlIsLeaf15 = true
+export type Kind15 = "message"
 /**
  * Indicate if the block contributes to the result and background context.
  *
  */
-export type Contribute3 = (
+export type ContributeType16 = (
   | ContributeTarget
   | {
       [k: string]: ContributeValue
     }
 )[]
 /**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser3 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback3 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type Retry3 = number | null
+export type RequirementsType16 = RequirementType[]
+export type PdlIsLeaf16 = true
+export type Kind16 = "read"
 /**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+ * Indicate if one or multiple lines should be read.
  *
  */
-export type TraceErrorOnRetry3 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role3 = string | null
+export type Multiline = boolean
 /**
- * Current context
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type PdlContext3 =
+export type ContributeType17 = (
+  | ContributeTarget
   | {
-      [k: string]: unknown
-    }[]
-  | null
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Unique identifier for this block
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type PdlId3 = string | null
-export type PdlIsLeaf3 = false
-export type IndependentEnum = "independent" | "dependent"
-export type Kind3 = "include"
+export type RequirementsType17 = RequirementType[]
+export type PdlIsLeaf17 = false
+export type IndependentEnum8 = "independent" | "dependent"
+export type Kind17 = "include"
 /**
  * Name of the file to include.
  *
  */
 export type Include = string
-export type PdlTrace1 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def4 = string | null
 /**
  * Indicate if the block contributes to the result and background context.
  *
  */
-export type Contribute4 = (
+export type ContributeType18 = (
   | ContributeTarget
   | {
       [k: string]: ContributeValue
     }
 )[]
 /**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser4 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback4 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type Retry4 = number | null
+export type RequirementsType18 = RequirementType[]
+export type PdlIsLeaf18 = true
+export type Kind18 = "import"
 /**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+ * Name of the file to import.
  *
  */
-export type TraceErrorOnRetry4 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role4 = string | null
+export type Import = string
 /**
- * Current context
+ * Indicate if the block contributes to the result and background context.
  *
  */
-export type PdlContext4 =
+export type ContributeType19 = (
+  | ContributeTarget
   | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId4 = string | null
-export type PdlIsLeaf4 = true
-export type Kind4 = "read"
-/**
- * Name of the file to read. If `None`, read the standard input.
- *
- */
-export type Read = LocalizedExpression | string | null
-/**
- * Message to prompt the user to enter a value.
- *
- */
-export type Message = string | null
+      [k: string]: ContributeValue
+    }
+)[]
 /**
- * Indicate if one or multiple lines should be read.
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type Multiline = boolean
+export type RequirementsType19 = RequirementType[]
+export type PdlIsLeaf19 = true
+export type Kind19 = "error"
 /**
- * Name of the variable used to store the result of the execution of the block.
+ * Error message.
  *
  */
-export type Def5 = string | null
+export type Msg = string
 /**
  * Indicate if the block contributes to the result and background context.
  *
  */
-export type Contribute5 = (
+export type ContributeType20 = (
   | ContributeTarget
   | {
       [k: string]: ContributeValue
     }
 )[]
 /**
- * Parser to use to construct a value out of a string result.
+ * Specify any requirements that the result of the block must satisfy.
+ *
  */
-export type Parser5 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
+export type RequirementsType20 = RequirementType[]
+export type PdlIsLeaf20 = true
+export type Kind20 = "empty"
+export type ExpressionInt = LocalizedExpression | number | string
 /**
- * Block to execute in case of error.
+ * String concatenation of the result of each iteration.
  *
  */
-export type Fallback5 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry5 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry5 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role5 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext5 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId5 = string | null
-export type PdlIsLeaf5 = true
-export type Kind5 = "message"
-/**
- * Content of the message.
- */
-export type Content =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * For example, the name of the tool that was invoked, for which this message is the tool response.
- */
-export type Name = LocalizedExpression | string | null
-/**
- * The id of the tool invocation for which this message is the tool response.
- */
-export type ToolCallId = LocalizedExpression | string | null
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def6 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute6 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser6 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback6 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry6 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry6 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role6 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext6 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId6 = string | null
-export type PdlIsLeaf6 = false
-export type IndependentEnum1 = "independent" | "dependent"
-export type Kind6 = "object"
-export type Object1 =
-  | {
-      [k: string]:
-        | boolean
-        | number
-        | string
-        | FunctionBlock
-        | CallBlock
-        | LitellmModelBlock
-        | GraniteioModelBlock
-        | CodeBlock
-        | ArgsBlock
-        | GetBlock
-        | DataBlock
-        | IfBlock
-        | MatchBlock
-        | RepeatBlock
-        | TextBlock
-        | LastOfBlock
-        | ArrayBlock
-        | ObjectBlock
-        | MessageBlock
-        | ReadBlock
-        | IncludeBlock
-        | ImportBlock
-        | ErrorBlock
-        | EmptyBlock
-        | null
-    }
-  | (
-      | boolean
-      | number
-      | string
-      | FunctionBlock
-      | CallBlock
-      | LitellmModelBlock
-      | GraniteioModelBlock
-      | CodeBlock
-      | ArgsBlock
-      | GetBlock
-      | DataBlock
-      | IfBlock
-      | MatchBlock
-      | RepeatBlock
-      | TextBlock
-      | LastOfBlock
-      | ArrayBlock
-      | ObjectBlock
-      | MessageBlock
-      | ReadBlock
-      | IncludeBlock
-      | ImportBlock
-      | ErrorBlock
-      | EmptyBlock
-      | null
-    )[]
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def7 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute7 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser7 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback7 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry7 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry7 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role7 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext7 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId7 = string | null
-export type PdlIsLeaf7 = false
-export type IndependentEnum2 = "independent" | "dependent"
-export type Kind7 = "array"
-/**
- * Elements of the array.
- */
-export type Array = (
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-)[]
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def8 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute8 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser8 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback8 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry8 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry8 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role8 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext8 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId8 = string | null
-export type PdlIsLeaf8 = false
-export type IndependentEnum3 = "independent" | "dependent"
-export type Kind8 = "lastOf"
-/**
- * Sequence of blocks to execute.
- */
-export type Lastof = (
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-)[]
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def9 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute9 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser9 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback9 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry9 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry9 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role9 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext9 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId9 = string | null
-export type PdlIsLeaf9 = false
-export type IndependentEnum4 = "independent" | "dependent"
-export type Kind9 = "text"
-/**
- * Body of the text.
- *
- */
-export type Text =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | (
-      | boolean
-      | number
-      | string
-      | FunctionBlock
-      | CallBlock
-      | LitellmModelBlock
-      | GraniteioModelBlock
-      | CodeBlock
-      | ArgsBlock
-      | GetBlock
-      | DataBlock
-      | IfBlock
-      | MatchBlock
-      | RepeatBlock
-      | TextBlock
-      | LastOfBlock
-      | ArrayBlock
-      | ObjectBlock
-      | MessageBlock
-      | ReadBlock
-      | IncludeBlock
-      | ImportBlock
-      | ErrorBlock
-      | EmptyBlock
-      | null
-    )[]
-  | null
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def10 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute10 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser10 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback10 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry10 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry10 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role10 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext10 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId10 = string | null
-export type PdlIsLeaf10 = false
-export type IndependentEnum5 = "independent" | "dependent"
-export type Kind10 = "repeat"
-/**
- * Arrays to iterate over.
- *
- */
-export type For = {
-  [k: string]: LocalizedExpression | unknown[] | string
-} | null
-/**
- * Name of the variable containing the loop iteration.
- *
- */
-export type Index = string | null
-/**
- * Condition to stay at the beginning of the loop.
- *
- */
-export type While = LocalizedExpression | boolean | string
-/**
- * Body of the loop.
- *
- */
-export type Repeat =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * Condition to exit at the end of the loop.
- *
- */
-export type Until = LocalizedExpression | boolean | string
-/**
- * Maximal number of iterations to perform.
- *
- */
-export type Maxiterations = LocalizedExpression | number | string | null
-/**
- * Define how to combine the result of each iteration.
- *
- */
-export type Join = JoinText | JoinArray | JoinObject | JoinLastOf
-/**
- * String concatenation of the result of each iteration.
- *
- */
-export type As = "text"
-/**
- * String used to concatenate each iteration of the loop.
- *
- */
-export type With = string
-/**
- * Return the result of each iteration as an array.
- *
- */
-export type As1 = "array"
-/**
- * Return the union of the objects created at each iteration.
- *
- */
-export type As2 = "object"
-/**
- * Return the result of the last iteration.
- *
- */
-export type As3 = "lastOf"
-export type PdlTrace2 =
-  | (
-      | boolean
-      | number
-      | string
-      | FunctionBlock
-      | CallBlock
-      | LitellmModelBlock
-      | GraniteioModelBlock
-      | CodeBlock
-      | ArgsBlock
-      | GetBlock
-      | DataBlock
-      | IfBlock
-      | MatchBlock
-      | RepeatBlock
-      | TextBlock
-      | LastOfBlock
-      | ArrayBlock
-      | ObjectBlock
-      | MessageBlock
-      | ReadBlock
-      | IncludeBlock
-      | ImportBlock
-      | ErrorBlock
-      | EmptyBlock
-      | null
-    )[]
-  | null
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def11 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute11 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser11 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback11 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry11 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry11 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role11 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext11 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId11 = string | null
-export type PdlIsLeaf11 = false
-export type IndependentEnum6 = "independent" | "dependent"
-export type Kind11 = "match"
-export type Case =
-  | boolean
-  | number
-  | string
-  | OrPattern
-  | ArrayPattern
-  | ObjectPattern
-  | AnyPattern
-  | null
-export type Def12 = string | null
-export type Def13 = string | null
-export type Def14 = string | null
-export type Def15 = string | null
-export type Any = null
-export type Array1 = (
-  | boolean
-  | number
-  | string
-  | OrPattern
-  | ArrayPattern
-  | ObjectPattern
-  | AnyPattern
-  | null
-)[]
-export type Anyof = (
-  | boolean
-  | number
-  | string
-  | OrPattern
-  | ArrayPattern
-  | ObjectPattern
-  | AnyPattern
-  | null
-)[]
-export type If = LocalizedExpression | boolean | string | null
-export type Then =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-export type PdlCaseResult = boolean | null
-export type PdlIfResult = boolean | null
-export type PdlMatched = boolean | null
-/**
- * List of cases to match.
- *
- */
-export type With1 = MatchCase[]
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def16 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute12 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser12 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback12 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry12 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry12 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role12 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext12 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId12 = string | null
-export type PdlIsLeaf12 = false
-export type IndependentEnum7 = "independent" | "dependent"
-export type Kind12 = "if"
-/**
- * Condition.
- *
- */
-export type If1 = LocalizedExpression | boolean | string
-/**
- * Branch to execute if the condition is true.
- *
- */
-export type Then1 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * Branch to execute if the condition is false.
- *
- */
-export type Else =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def17 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute13 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser13 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback13 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry13 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry13 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role13 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext13 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId13 = string | null
-export type PdlIsLeaf13 = true
-export type Kind13 = "data"
-/**
- * Do not evaluate expressions inside strings.
- */
-export type Raw = boolean
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def18 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute14 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser14 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback14 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry14 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry14 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role14 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext14 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId14 = string | null
-export type PdlIsLeaf14 = true
-export type Kind14 = "get"
-/**
- * Name of the variable to access.
- */
-export type Get = string
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def19 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute15 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser15 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback15 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry15 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry15 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role15 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext15 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId15 = string | null
-export type PdlIsLeaf15 = true
-export type Kind15 = "code"
-export type Lang = "command"
-/**
- * The argument vector to spawn.
- *
- */
-export type Args = (LocalizedExpression | string)[]
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def20 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute16 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser16 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback16 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry16 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry16 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role16 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext16 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId16 = string | null
-export type PdlIsLeaf16 = true
-export type Kind16 = "code"
-/**
- * Programming language of the code.
- *
- */
-export type Lang1 = "python" | "command" | "jinja" | "pdl" | "ipython"
-/**
- * Code to execute.
- *
- */
-export type Code =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def21 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute17 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser17 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback17 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry17 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry17 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role17 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext17 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId17 = string | null
-export type PdlIsLeaf17 = true
-export type Kind17 = "model"
-/**
- * Messages to send to the model.
- *
- */
-export type Input =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * Variable where to store the raw response of the model.
- *
- */
-export type Modelresponse = string | null
-export type CompletionTokens = number | null
-export type PromptTokens = number | null
-export type PdlModelInput =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Optional field to ensure that the block is using granite-io.
- *
- */
-export type Platform = "granite-io"
-/**
- * Parameters sent to the model.
- *
- */
-export type Parameters =
-  | LocalizedExpression
-  | {
-      [k: string]: unknown
-    }
-  | string
-  | null
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def22 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute18 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser18 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback18 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry18 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry18 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role18 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext18 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId18 = string | null
-export type PdlIsLeaf18 = true
-export type Kind18 = "model"
+export type As = "text"
 /**
- * Messages to send to the model.
+ * String used to concatenate each iteration of the loop.
  *
  */
-export type Input1 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
+export type With1 = string
 /**
- * Variable where to store the raw response of the model.
+ * Return the result of each iteration as an array.
+ *
+ */
+export type As1 = "array"
+/**
+ * Return the union of the objects created at each iteration.
+ *
+ */
+export type As2 = "object"
+/**
+ * Return the result of the last iteration.
+ *
+ */
+export type As3 = "lastOf"
+export type As4 = "reduce"
+/**
+ * Function used to combine the results.
+ */
+export type Reduce = LocalizedExpression | string
+export type PdlTrace = BlockType[] | null
+export type PdlTrace1 = BlockType[] | null
+/**
+ * Optional field to ensure that the block is using granite-io.
+ *
+ */
+export type Platform = "granite-io"
+/**
+ * Parameters sent to the model.
  *
  */
-export type Modelresponse1 = string | null
-export type PdlModelInput1 =
+export type Parameters =
+  | LocalizedExpression
   | {
       [k: string]: unknown
-    }[]
+    }
+  | string
   | null
 /**
  * Optional field to ensure that the block is using LiteLLM.
  *
  */
 export type Platform1 = "litellm"
-/**
- * Name of the model following the LiteLLM convention.
- *
- */
-export type Model1 = LocalizedExpression | string
 /**
  * Parameters to send to the model.
  *
@@ -2619,207 +686,23 @@ export type ModelList = unknown[] | string | null
 export type MockResponse = string | null
 export type CustomLlmProvider = string | null
 export type MaxRetries = number | string | null
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def23 = string | null
-/**
- * Indicate if the block contributes to the result and background context.
- *
- */
-export type Contribute19 = (
-  | ContributeTarget
-  | {
-      [k: string]: ContributeValue
-    }
-)[]
-/**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser19 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback19 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry19 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry19 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role19 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext19 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
- *
- */
-export type PdlId19 = string | null
-export type PdlIsLeaf19 = true
-export type Kind19 = "call"
-/**
- * Function to call.
- *
- */
-export type Call = LocalizedExpression | FunctionBlock | string
-export type PdlTrace3 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * Name of the variable used to store the result of the execution of the block.
- *
- */
-export type Def24 = string | null
 /**
  * Indicate if the block contributes to the result and background context.
  *
  */
-export type Contribute20 = (
+export type ContributeType21 = (
   | ContributeTarget
   | {
       [k: string]: ContributeValue
     }
 )[]
 /**
- * Parser to use to construct a value out of a string result.
- */
-export type Parser20 =
-  | ("json" | "jsonl" | "yaml")
-  | PdlParser
-  | RegexParser
-  | null
-/**
- * Block to execute in case of error.
- *
- */
-export type Fallback20 =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
-/**
- * The maximum number of times to retry when an error occurs within a block.
- *
- */
-export type Retry20 = number | null
-/**
- * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
- *
- */
-export type TraceErrorOnRetry20 = boolean | string | null
-/**
- * Role associated to the block and sub-blocks.
- * Typical roles are `system`, `user`, and `assistant`,
- * but there may be other roles such as `available_tools`.
- */
-export type Role20 = string | null
-/**
- * Current context
- *
- */
-export type PdlContext20 =
-  | {
-      [k: string]: unknown
-    }[]
-  | null
-/**
- * Unique identifier for this block
+ * Specify any requirements that the result of the block must satisfy.
  *
  */
-export type PdlId20 = string | null
-export type PdlIsLeaf20 = true
-export type Kind20 = "function"
+export type RequirementsType21 = RequirementType[]
+export type PdlIsLeaf21 = true
+export type Kind21 = "function"
 /**
  * Functions parameters with their types.
  *
@@ -2827,36 +710,6 @@ export type Kind20 = "function"
 export type Function = {
   [k: string]: PdlTypeType
 } | null
-/**
- * Body of the function.
- *
- */
-export type Return =
-  | boolean
-  | number
-  | string
-  | FunctionBlock
-  | CallBlock
-  | LitellmModelBlock
-  | GraniteioModelBlock
-  | CodeBlock
-  | ArgsBlock
-  | GetBlock
-  | DataBlock
-  | IfBlock
-  | MatchBlock
-  | RepeatBlock
-  | TextBlock
-  | LastOfBlock
-  | ArrayBlock
-  | ObjectBlock
-  | MessageBlock
-  | ReadBlock
-  | IncludeBlock
-  | ImportBlock
-  | ErrorBlock
-  | EmptyBlock
-  | null
 /**
  * Function signature computed from the function definition.
  *
@@ -2877,6 +730,7 @@ export type PdlBlock =
   | IfBlock
   | MatchBlock
   | RepeatBlock
+  | MapBlock
   | TextBlock
   | LastOfBlock
   | ArrayBlock
@@ -2893,7 +747,11 @@ export type PdlBlock =
  * Function declaration.
  */
 export interface FunctionBlock {
-  description?: Description
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -2923,23 +781,88 @@ export interface FunctionBlock {
         [k: string]: PdlTypeType
       }
     | null
-  defs?: Defs
-  def?: Def24
-  contribute?: Contribute20
-  parser?: Parser20
-  fallback?: Fallback20
-  retry?: Retry20
-  trace_error_on_retry?: TraceErrorOnRetry20
-  role?: Role20
-  pdl__context?: PdlContext20
-  pdl__id?: PdlId20
-  pdl__result?: unknown
-  pdl__location?: PdlLocationType | null
-  pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf20
-  kind?: Kind20
-  function: Function
-  return: Return
+  defs?: Defs
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType21
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType21
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
+  pdl__result?: unknown
+  pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
+  pdl__timing?: PdlTiming | null
+  pdl__is_leaf?: PdlIsLeaf21
+  kind?: Kind21
+  function: Function
+  /**
+   * Body of the function.
+   *
+   */
+  return:
+    | boolean
+    | number
+    | number
+    | string
+    | FunctionBlock
+    | CallBlock
+    | LitellmModelBlock
+    | GraniteioModelBlock
+    | CodeBlock
+    | ArgsBlock
+    | GetBlock
+    | DataBlock
+    | IfBlock
+    | MatchBlock
+    | RepeatBlock
+    | MapBlock
+    | TextBlock
+    | LastOfBlock
+    | ArrayBlock
+    | ObjectBlock
+    | MessageBlock
+    | ReadBlock
+    | IncludeBlock
+    | ImportBlock
+    | ErrorBlock
+    | EmptyBlock
+    | null
   signature?: Signature
 }
 /**
@@ -2976,38 +899,17 @@ export interface Object {
  *
  */
 export interface Defs {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
-    | null
+  [k: string]: BlockType
 }
 /**
  * Calling a function.
  */
 export interface CallBlock {
-  description?: Description1
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -3038,55 +940,171 @@ export interface CallBlock {
       }
     | null
   defs?: Defs1
-  def?: Def23
-  contribute?: Contribute19
-  parser?: Parser19
-  fallback?: Fallback19
-  retry?: Retry19
-  trace_error_on_retry?: TraceErrorOnRetry19
-  role?: Role19
-  pdl__context?: PdlContext19
-  pdl__id?: PdlId19
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf19
-  kind?: Kind19
+  pdl__is_leaf?: PdlIsLeaf
+  kind?: Kind
   call: Call
   args?: unknown
-  pdl__trace?: PdlTrace3
+  pdl__trace?: BlockType | null
 }
 /**
  * Set of definitions executed before the execution of the block.
  *
  */
 export interface Defs1 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
+  [k: string]: BlockType
+}
+/**
+ * Contribution of a specific value instead of the default one.
+ */
+export interface ContributeValue {
+  value: Value
+}
+export interface LocalizedExpression {
+  pdl__expr: PdlExpr
+  pdl__result?: unknown
+  pdl__location?: PdlLocationType | null
+}
+export interface PdlExpr {
+  [k: string]: unknown
+}
+/**
+ * Internal data structure to keep track of the source location information.
+ */
+export interface PdlLocationType {
+  path: Path
+  file: File
+  table: Table
+}
+export interface Table {
+  [k: string]: number
+}
+/**
+ * Use a PDL program as a parser specification (experimental).
+ */
+export interface PdlParser {
+  description?: string | null
+  spec?:
+    | (
+        | "null"
+        | "boolean"
+        | "string"
+        | "number"
+        | "integer"
+        | "array"
+        | "object"
+        | "bool"
+        | "str"
+        | "float"
+        | "int"
+        | "list"
+        | "obj"
+      )
+    | EnumPdlType
+    | PdlTypeType[]
+    | OptionalPdlType
+    | JsonSchemaTypePdlType
+    | ObjectPdlType
+    | {
+        [k: string]: PdlTypeType
+      }
+    | null
+  pdl: BlockType
+}
+/**
+ * A regular expression parser.
+ */
+export interface RegexParser {
+  description?: string | null
+  spec?:
+    | (
+        | "null"
+        | "boolean"
+        | "string"
+        | "number"
+        | "integer"
+        | "array"
+        | "object"
+        | "bool"
+        | "str"
+        | "float"
+        | "int"
+        | "list"
+        | "obj"
+      )
+    | EnumPdlType
+    | PdlTypeType[]
+    | OptionalPdlType
+    | JsonSchemaTypePdlType
+    | ObjectPdlType
+    | {
+        [k: string]: PdlTypeType
+      }
     | null
+  regex: Regex
+  mode?: Mode
+}
+/**
+ * Single requirement definition.
+ */
+export interface RequirementType {
+  description: unknown
+  evaluate: Evaluate
+  transformContext: Transformcontext
+}
+/**
+ * Internal data structure to record timing information in the trace.
+ */
+export interface PdlTiming {
+  start_nanos?: number | null
+  end_nanos?: number | null
+  first_use_nanos?: number | null
+  timezone?: string | null
 }
 /**
  * Call an LLM through [the LiteLLM API](https://docs.litellm.ai/).
@@ -3099,7 +1117,11 @@ export interface Defs1 {
  * ```
  */
 export interface LitellmModelBlock {
-  description?: Description2
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -3130,38 +1152,59 @@ export interface LitellmModelBlock {
       }
     | null
   defs?: Defs2
-  def?: Def22
-  contribute?: Contribute18
-  parser?: Parser18
-  fallback?: Fallback18
-  retry?: Retry18
-  trace_error_on_retry?: TraceErrorOnRetry18
-  role?: Role18
-  pdl__context?: PdlContext18
-  pdl__id?: PdlId18
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType1
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType1
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf18
-  kind?: Kind18
-  input?: Input1
-  modelResponse?: Modelresponse1
+  pdl__is_leaf?: PdlIsLeaf1
+  kind?: Kind1
   /**
-   * Tokens consumed during model call
+   * Messages to send to the model.
    *
    */
-  pdl__usage?: PdlUsage | null
-  pdl__model_input?: PdlModelInput1
-  platform?: Platform1
-  model: Model1
-  parameters?: Parameters1
-}
-/**
- * Set of definitions executed before the execution of the block.
- *
- */
-export interface Defs2 {
-  [k: string]:
+  input?:
     | boolean
     | number
     | string
@@ -3176,6 +1219,7 @@ export interface Defs2 {
     | IfBlock
     | MatchBlock
     | RepeatBlock
+    | MapBlock
     | TextBlock
     | LastOfBlock
     | ArrayBlock
@@ -3187,12 +1231,41 @@ export interface Defs2 {
     | ErrorBlock
     | EmptyBlock
     | null
+  /**
+   * Variable where to store the raw response of the model.
+   *
+   */
+  modelResponse?: string | null
+  /**
+   * Tokens consumed during model call
+   *
+   */
+  pdl__usage?: PdlUsage | null
+  pdl__model_input?: ModelInput | null
+  platform?: Platform1
+  /**
+   * Name of the model following the LiteLLM convention.
+   *
+   */
+  model: LocalizedExpression | string
+  parameters?: Parameters1
+}
+/**
+ * Set of definitions executed before the execution of the block.
+ *
+ */
+export interface Defs2 {
+  [k: string]: BlockType
 }
 /**
  * Call an LLM through the granite-io API.
  */
 export interface GraniteioModelBlock {
-  description?: Description3
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -3223,38 +1296,59 @@ export interface GraniteioModelBlock {
       }
     | null
   defs?: Defs3
-  def?: Def21
-  contribute?: Contribute17
-  parser?: Parser17
-  fallback?: Fallback17
-  retry?: Retry17
-  trace_error_on_retry?: TraceErrorOnRetry17
-  role?: Role17
-  pdl__context?: PdlContext17
-  pdl__id?: PdlId17
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType2
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType2
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf17
-  kind?: Kind17
-  input?: Input
-  modelResponse?: Modelresponse
+  pdl__is_leaf?: PdlIsLeaf2
+  kind?: Kind2
   /**
-   * Tokens consumed during model call
+   * Messages to send to the model.
    *
    */
-  pdl__usage?: PdlUsage | null
-  pdl__model_input?: PdlModelInput
-  platform?: Platform
-  processor: unknown
-  parameters?: Parameters
-}
-/**
- * Set of definitions executed before the execution of the block.
- *
- */
-export interface Defs3 {
-  [k: string]:
+  input?:
     | boolean
     | number
     | string
@@ -3269,6 +1363,7 @@ export interface Defs3 {
     | IfBlock
     | MatchBlock
     | RepeatBlock
+    | MapBlock
     | TextBlock
     | LastOfBlock
     | ArrayBlock
@@ -3280,6 +1375,27 @@ export interface Defs3 {
     | ErrorBlock
     | EmptyBlock
     | null
+  /**
+   * Variable where to store the raw response of the model.
+   *
+   */
+  modelResponse?: string | null
+  /**
+   * Tokens consumed during model call
+   *
+   */
+  pdl__usage?: PdlUsage | null
+  pdl__model_input?: ModelInput | null
+  platform?: Platform
+  processor: unknown
+  parameters?: Parameters
+}
+/**
+ * Set of definitions executed before the execution of the block.
+ *
+ */
+export interface Defs3 {
+  [k: string]: BlockType
 }
 /**
  * Execute a piece of code.
@@ -3294,7 +1410,11 @@ export interface Defs3 {
  * ```
  */
 export interface CodeBlock {
-  description?: Description4
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -3325,29 +1445,60 @@ export interface CodeBlock {
       }
     | null
   defs?: Defs4
-  def?: Def20
-  contribute?: Contribute16
-  parser?: Parser16
-  fallback?: Fallback16
-  retry?: Retry16
-  trace_error_on_retry?: TraceErrorOnRetry16
-  role?: Role16
-  pdl__context?: PdlContext16
-  pdl__id?: PdlId16
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType3
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType3
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf16
-  kind?: Kind16
-  lang: Lang1
-  code: Code
-}
-/**
- * Set of definitions executed before the execution of the block.
- *
- */
-export interface Defs4 {
-  [k: string]:
+  pdl__is_leaf?: PdlIsLeaf3
+  kind?: Kind3
+  lang: Lang
+  /**
+   * Code to execute.
+   *
+   */
+  code:
     | boolean
     | number
     | string
@@ -3362,6 +1513,7 @@ export interface Defs4 {
     | IfBlock
     | MatchBlock
     | RepeatBlock
+    | MapBlock
     | TextBlock
     | LastOfBlock
     | ArrayBlock
@@ -3374,6 +1526,13 @@ export interface Defs4 {
     | EmptyBlock
     | null
 }
+/**
+ * Set of definitions executed before the execution of the block.
+ *
+ */
+export interface Defs4 {
+  [k: string]: BlockType
+}
 /**
  * Execute a command line, which will spawn a subprocess with the given argument vector. Note: if you need a shell script execution, you must wrap your command line in /bin/sh or some shell of your choosing.
  *
@@ -3386,7 +1545,11 @@ export interface Defs4 {
  * ```
  */
 export interface ArgsBlock {
-  description?: Description5
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -3417,54 +1580,63 @@ export interface ArgsBlock {
       }
     | null
   defs?: Defs5
-  def?: Def19
-  contribute?: Contribute15
-  parser?: Parser15
-  fallback?: Fallback15
-  retry?: Retry15
-  trace_error_on_retry?: TraceErrorOnRetry15
-  role?: Role15
-  pdl__context?: PdlContext15
-  pdl__id?: PdlId15
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType4
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType4
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf15
-  kind?: Kind15
-  lang?: Lang
-  args: Args
+  pdl__is_leaf?: PdlIsLeaf4
+  kind?: Kind4
+  lang?: Lang1
+  args: Args1
 }
 /**
  * Set of definitions executed before the execution of the block.
  *
  */
 export interface Defs5 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
-    | null
+  [k: string]: BlockType
 }
 /**
  * Get the value of a variable.
@@ -3472,7 +1644,11 @@ export interface Defs5 {
  * The GetBlock is deprecated.  Use DataBlock instead.
  */
 export interface GetBlock {
-  description?: Description6
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -3503,20 +1679,54 @@ export interface GetBlock {
       }
     | null
   defs?: Defs6
-  def?: Def18
-  contribute?: Contribute14
-  parser?: Parser14
-  fallback?: Fallback14
-  retry?: Retry14
-  trace_error_on_retry?: TraceErrorOnRetry14
-  role?: Role14
-  pdl__context?: PdlContext14
-  pdl__id?: PdlId14
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType5
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType5
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf14
-  kind?: Kind14
+  pdl__is_leaf?: PdlIsLeaf5
+  kind?: Kind5
   get: Get
 }
 /**
@@ -3524,32 +1734,7 @@ export interface GetBlock {
  *
  */
 export interface Defs6 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
-    | null
+  [k: string]: BlockType
 }
 /**
  * Arbitrary value, equivalent to JSON.
@@ -3576,7 +1761,11 @@ export interface Defs6 {
  * ```
  */
 export interface DataBlock {
-  description?: Description7
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -3607,20 +1796,54 @@ export interface DataBlock {
       }
     | null
   defs?: Defs7
-  def?: Def17
-  contribute?: Contribute13
-  parser?: Parser13
-  fallback?: Fallback13
-  retry?: Retry13
-  trace_error_on_retry?: TraceErrorOnRetry13
-  role?: Role13
-  pdl__context?: PdlContext13
-  pdl__id?: PdlId13
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType6
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType6
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf13
-  kind?: Kind13
+  pdl__is_leaf?: PdlIsLeaf6
+  kind?: Kind6
   data: unknown
   raw?: Raw
 }
@@ -3629,32 +1852,7 @@ export interface DataBlock {
  *
  */
 export interface Defs7 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
-    | null
+  [k: string]: BlockType
 }
 /**
  * Conditional control structure.
@@ -3670,7 +1868,11 @@ export interface Defs7 {
  * ```
  */
 export interface IfBlock {
-  description?: Description8
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -3701,31 +1903,65 @@ export interface IfBlock {
       }
     | null
   defs?: Defs8
-  def?: Def16
-  contribute?: Contribute12
-  parser?: Parser12
-  fallback?: Fallback12
-  retry?: Retry12
-  trace_error_on_retry?: TraceErrorOnRetry12
-  role?: Role12
-  pdl__context?: PdlContext12
-  pdl__id?: PdlId12
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType7
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType7
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf12
-  context?: IndependentEnum7
-  kind?: Kind12
-  if: If1
-  then: Then1
-  else?: Else
-}
-/**
- * Set of definitions executed before the execution of the block.
- *
- */
-export interface Defs8 {
-  [k: string]:
+  pdl__is_leaf?: PdlIsLeaf7
+  context?: IndependentEnum
+  kind?: Kind7
+  /**
+   * Condition.
+   *
+   */
+  if: LocalizedExpression | boolean | string
+  /**
+   * Branch to execute if the condition is true.
+   *
+   */
+  then:
     | boolean
     | number
     | string
@@ -3740,6 +1976,7 @@ export interface Defs8 {
     | IfBlock
     | MatchBlock
     | RepeatBlock
+    | MapBlock
     | TextBlock
     | LastOfBlock
     | ArrayBlock
@@ -3751,6 +1988,18 @@ export interface Defs8 {
     | ErrorBlock
     | EmptyBlock
     | null
+  /**
+   * Branch to execute if the condition is false.
+   *
+   */
+  else?: BlockType | null
+}
+/**
+ * Set of definitions executed before the execution of the block.
+ *
+ */
+export interface Defs8 {
+  [k: string]: BlockType
 }
 /**
  * Match control structure.
@@ -3773,7 +2022,11 @@ export interface Defs8 {
  * - then: Too low
  */
 export interface MatchBlock {
-  description?: Description9
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -3804,30 +2057,234 @@ export interface MatchBlock {
       }
     | null
   defs?: Defs9
-  def?: Def11
-  contribute?: Contribute11
-  parser?: Parser11
-  fallback?: Fallback11
-  retry?: Retry11
-  trace_error_on_retry?: TraceErrorOnRetry11
-  role?: Role11
-  pdl__context?: PdlContext11
-  pdl__id?: PdlId11
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType8
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType8
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf11
-  context?: IndependentEnum6
-  kind?: Kind11
+  pdl__is_leaf?: PdlIsLeaf8
+  context?: IndependentEnum1
+  kind?: Kind8
   match: unknown
-  with: With1
+  with: With
 }
 /**
  * Set of definitions executed before the execution of the block.
  *
  */
 export interface Defs9 {
-  [k: string]:
+  [k: string]: BlockType
+}
+/**
+ * Case of a match.
+ */
+export interface MatchCase {
+  case?: PatternType | null
+  if?: ExpressionBool | null
+  then: BlockType
+  pdl__case_result?: PdlCaseResult
+  pdl__if_result?: PdlIfResult
+  pdl__matched?: PdlMatched
+}
+/**
+ * Match any of the patterns.
+ */
+export interface OrPattern {
+  def?: string | null
+  anyOf: Anyof
+}
+/**
+ * Match an array.
+ */
+export interface ArrayPattern {
+  def?: string | null
+  array: Array
+}
+/**
+ * Match an object.
+ */
+export interface ObjectPattern {
+  def?: string | null
+  object: Object1
+}
+export interface Object1 {
+  [k: string]: PatternType
+}
+/**
+ * Match any value.
+ */
+export interface AnyPattern {
+  def?: string | null
+  any: Any
+}
+/**
+ * Repeat the execution of a block sequentially.
+ * The scope and `pdl_context` are accumulated in between iterations.
+ *
+ * For loop example:
+ * ```PDL
+ * for:
+ *     number: [1, 2, 3, 4]
+ *     name: ["Bob", "Carol", "David", "Ernest"]
+ * repeat:
+ *     "${ name }'s number is ${ number }\n"
+ * ```
+ *
+ * While loop:
+ * ```PDL
+ * defs:
+ *   i: 0
+ * while: ${i < 5}
+ * repeat:
+ *     defs:
+ *       i: ${ i + 1}
+ *     data: ${ i }
+ * join:
+ *   as: array
+ * ```
+ */
+export interface RepeatBlock {
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
+  /**
+   * Type specification of the result of the block.
+   *
+   */
+  spec?:
+    | (
+        | "null"
+        | "boolean"
+        | "string"
+        | "number"
+        | "integer"
+        | "array"
+        | "object"
+        | "bool"
+        | "str"
+        | "float"
+        | "int"
+        | "list"
+        | "obj"
+      )
+    | EnumPdlType
+    | PdlTypeType[]
+    | OptionalPdlType
+    | JsonSchemaTypePdlType
+    | ObjectPdlType
+    | {
+        [k: string]: PdlTypeType
+      }
+    | null
+  defs?: Defs10
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType9
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType9
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
+  pdl__result?: unknown
+  pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
+  pdl__timing?: PdlTiming | null
+  pdl__is_leaf?: PdlIsLeaf9
+  context?: IndependentEnum2
+  kind?: Kind9
+  for?: For
+  /**
+   * Name of the variable containing the loop iteration.
+   *
+   */
+  index?: string | null
+  /**
+   * Condition to stay at the beginning of the loop.
+   *
+   */
+  while?: LocalizedExpression | boolean | string
+  /**
+   * Body of the loop.
+   *
+   */
+  repeat:
     | boolean
     | number
     | string
@@ -3842,6 +2299,7 @@ export interface Defs9 {
     | IfBlock
     | MatchBlock
     | RepeatBlock
+    | MapBlock
     | TextBlock
     | LastOfBlock
     | ArrayBlock
@@ -3853,16 +2311,41 @@ export interface Defs9 {
     | ErrorBlock
     | EmptyBlock
     | null
+  /**
+   * Condition to exit at the end of the loop.
+   *
+   */
+  until?: LocalizedExpression | boolean | string
+  /**
+   * Maximal number of iterations to perform.
+   *
+   */
+  maxIterations?: ExpressionInt | null
+  /**
+   * Define how to combine the result of each iteration.
+   *
+   */
+  join?: JoinText | JoinArray | JoinObject | JoinLastOf | JoinReduce
+  pdl__trace?: PdlTrace1
+}
+/**
+ * Set of definitions executed before the execution of the block.
+ *
+ */
+export interface Defs10 {
+  [k: string]: BlockType
 }
 /**
- * Repeat the execution of a block.
+ * Independent executions of  a block.
+ * Repeat the execution of a block starting from the initial scope
+ * and `pdl_context`.
  *
  * For loop example:
  * ```PDL
  * for:
  *     number: [1, 2, 3, 4]
  *     name: ["Bob", "Carol", "David", "Ernest"]
- * repeat:
+ * map:
  *     "${ name }'s number is ${ number }\n"
  * ```
  *
@@ -3870,14 +2353,18 @@ export interface Defs9 {
  * ```PDL
  * index: i
  * maxIterations: 5
- * repeat:
+ * map:
  *     ${ i }
  * join:
  *   as: array
  * ```
  */
-export interface RepeatBlock {
-  description?: Description10
+export interface MapBlock {
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -3907,37 +2394,67 @@ export interface RepeatBlock {
         [k: string]: PdlTypeType
       }
     | null
-  defs?: Defs10
-  def?: Def10
-  contribute?: Contribute10
-  parser?: Parser10
-  fallback?: Fallback10
-  retry?: Retry10
-  trace_error_on_retry?: TraceErrorOnRetry10
-  role?: Role10
-  pdl__context?: PdlContext10
-  pdl__id?: PdlId10
+  defs?: Defs11
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType10
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType10
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
   pdl__is_leaf?: PdlIsLeaf10
-  context?: IndependentEnum5
+  context?: IndependentEnum3
   kind?: Kind10
-  for?: For
-  index?: Index
-  while?: While
-  repeat: Repeat
-  until?: Until
-  maxIterations?: Maxiterations
-  join?: Join
-  pdl__trace?: PdlTrace2
-}
-/**
- * Set of definitions executed before the execution of the block.
- *
- */
-export interface Defs10 {
-  [k: string]:
+  for?: For1
+  /**
+   * Name of the variable containing the loop iteration.
+   *
+   */
+  index?: string | null
+  /**
+   * Body of the iterator.
+   *
+   */
+  map:
     | boolean
     | number
     | string
@@ -3952,6 +2469,7 @@ export interface Defs10 {
     | IfBlock
     | MatchBlock
     | RepeatBlock
+    | MapBlock
     | TextBlock
     | LastOfBlock
     | ArrayBlock
@@ -3963,12 +2481,39 @@ export interface Defs10 {
     | ErrorBlock
     | EmptyBlock
     | null
+  /**
+   * Maximal number of iterations to perform.
+   *
+   */
+  maxIterations?: ExpressionInt | null
+  /**
+   * Define how to combine the result of each iteration.
+   *
+   */
+  join?: JoinText | JoinArray | JoinObject | JoinLastOf | JoinReduce
+  /**
+   * Maximal number of workers to execute the map in parallel. Is it is set to `0`, the execution is sequential otherwise it is given as argument to the `ThreadPoolExecutor`.
+   *
+   */
+  maxWorkers?: number | null
+  pdl__trace?: PdlTrace
+}
+/**
+ * Set of definitions executed before the execution of the block.
+ *
+ */
+export interface Defs11 {
+  [k: string]: BlockType
 }
 /**
  * Create the concatenation of the stringify version of the result of each block of the list of blocks.
  */
 export interface TextBlock {
-  description?: Description11
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -3998,61 +2543,74 @@ export interface TextBlock {
         [k: string]: PdlTypeType
       }
     | null
-  defs?: Defs11
-  def?: Def9
-  contribute?: Contribute9
-  parser?: Parser9
-  fallback?: Fallback9
-  retry?: Retry9
-  trace_error_on_retry?: TraceErrorOnRetry9
-  role?: Role9
-  pdl__context?: PdlContext9
-  pdl__id?: PdlId9
+  defs?: Defs12
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType11
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType11
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf9
+  pdl__is_leaf?: PdlIsLeaf11
   context?: IndependentEnum4
-  kind?: Kind9
+  kind?: Kind11
   text: Text
 }
 /**
  * Set of definitions executed before the execution of the block.
  *
  */
-export interface Defs11 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
-    | null
+export interface Defs12 {
+  [k: string]: BlockType
 }
 /**
  * Return the value of the last block if the list of blocks.
  */
 export interface LastOfBlock {
-  description?: Description12
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -4082,61 +2640,74 @@ export interface LastOfBlock {
         [k: string]: PdlTypeType
       }
     | null
-  defs?: Defs12
-  def?: Def8
-  contribute?: Contribute8
-  parser?: Parser8
-  fallback?: Fallback8
-  retry?: Retry8
-  trace_error_on_retry?: TraceErrorOnRetry8
-  role?: Role8
-  pdl__context?: PdlContext8
-  pdl__id?: PdlId8
+  defs?: Defs13
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType12
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType12
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf8
-  context?: IndependentEnum3
-  kind?: Kind8
+  pdl__is_leaf?: PdlIsLeaf12
+  context?: IndependentEnum5
+  kind?: Kind12
   lastOf: Lastof
 }
 /**
  * Set of definitions executed before the execution of the block.
  *
  */
-export interface Defs12 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
-    | null
+export interface Defs13 {
+  [k: string]: BlockType
 }
 /**
  * Return the array of values computed by each block of the list of blocks.
  */
 export interface ArrayBlock {
-  description?: Description13
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -4166,61 +2737,74 @@ export interface ArrayBlock {
         [k: string]: PdlTypeType
       }
     | null
-  defs?: Defs13
-  def?: Def7
-  contribute?: Contribute7
-  parser?: Parser7
-  fallback?: Fallback7
-  retry?: Retry7
-  trace_error_on_retry?: TraceErrorOnRetry7
-  role?: Role7
-  pdl__context?: PdlContext7
-  pdl__id?: PdlId7
+  defs?: Defs14
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType13
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType13
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf7
-  context?: IndependentEnum2
-  kind?: Kind7
-  array: Array
+  pdl__is_leaf?: PdlIsLeaf13
+  context?: IndependentEnum6
+  kind?: Kind13
+  array: Array1
 }
 /**
  * Set of definitions executed before the execution of the block.
  *
  */
-export interface Defs13 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
-    | null
+export interface Defs14 {
+  [k: string]: BlockType
 }
 /**
  * Return the object where the value of each field is defined by a block. If the body of the object is an array, the resulting object is the union of the objects computed by each element of the array.
  */
 export interface ObjectBlock {
-  description?: Description14
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -4250,61 +2834,74 @@ export interface ObjectBlock {
         [k: string]: PdlTypeType
       }
     | null
-  defs?: Defs14
-  def?: Def6
-  contribute?: Contribute6
-  parser?: Parser6
-  fallback?: Fallback6
-  retry?: Retry6
-  trace_error_on_retry?: TraceErrorOnRetry6
-  role?: Role6
-  pdl__context?: PdlContext6
-  pdl__id?: PdlId6
-  pdl__result?: unknown
-  pdl__location?: PdlLocationType | null
-  pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf6
-  context?: IndependentEnum1
-  kind?: Kind6
-  object: Object1
-}
-/**
- * Set of definitions executed before the execution of the block.
- *
- */
-export interface Defs14 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
-    | null
+  defs?: Defs15
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType14
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType14
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
+  pdl__result?: unknown
+  pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
+  pdl__timing?: PdlTiming | null
+  pdl__is_leaf?: PdlIsLeaf14
+  context?: IndependentEnum7
+  kind?: Kind14
+  object: Object2
+}
+/**
+ * Set of definitions executed before the execution of the block.
+ *
+ */
+export interface Defs15 {
+  [k: string]: BlockType
 }
 /**
  * Create a message.
  */
 export interface MessageBlock {
-  description?: Description15
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -4334,31 +2931,59 @@ export interface MessageBlock {
         [k: string]: PdlTypeType
       }
     | null
-  defs?: Defs15
-  def?: Def5
-  contribute?: Contribute5
-  parser?: Parser5
-  fallback?: Fallback5
-  retry?: Retry5
-  trace_error_on_retry?: TraceErrorOnRetry5
-  role?: Role5
-  pdl__context?: PdlContext5
-  pdl__id?: PdlId5
+  defs?: Defs16
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType15
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType15
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf5
-  kind?: Kind5
-  content: Content
-  name?: Name
-  tool_call_id?: ToolCallId
-}
-/**
- * Set of definitions executed before the execution of the block.
- *
- */
-export interface Defs15 {
-  [k: string]:
+  pdl__is_leaf?: PdlIsLeaf15
+  kind?: Kind15
+  /**
+   * Content of the message.
+   */
+  content:
     | boolean
     | number
     | string
@@ -4373,6 +2998,7 @@ export interface Defs15 {
     | IfBlock
     | MatchBlock
     | RepeatBlock
+    | MapBlock
     | TextBlock
     | LastOfBlock
     | ArrayBlock
@@ -4384,6 +3010,21 @@ export interface Defs15 {
     | ErrorBlock
     | EmptyBlock
     | null
+  /**
+   * For example, the name of the tool that was invoked, for which this message is the tool response.
+   */
+  name?: ExpressionStr | null
+  /**
+   * The id of the tool invocation for which this message is the tool response.
+   */
+  tool_call_id?: ExpressionStr | null
+}
+/**
+ * Set of definitions executed before the execution of the block.
+ *
+ */
+export interface Defs16 {
+  [k: string]: BlockType
 }
 /**
  * Read from a file or standard input.
@@ -4401,7 +3042,11 @@ export interface Defs15 {
  * ```
  */
 export interface ReadBlock {
-  description?: Description16
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -4431,147 +3076,83 @@ export interface ReadBlock {
         [k: string]: PdlTypeType
       }
     | null
-  defs?: Defs16
-  def?: Def4
-  contribute?: Contribute4
-  parser?: Parser4
-  fallback?: Fallback4
-  retry?: Retry4
-  trace_error_on_retry?: TraceErrorOnRetry4
-  role?: Role4
-  pdl__context?: PdlContext4
-  pdl__id?: PdlId4
+  defs?: Defs17
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType16
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType16
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf4
-  kind?: Kind4
-  read: Read
-  message?: Message
+  pdl__is_leaf?: PdlIsLeaf16
+  kind?: Kind16
+  /**
+   * Name of the file to read. If `None`, read the standard input.
+   *
+   */
+  read: ExpressionStr | null
+  /**
+   * Message to prompt the user to enter a value.
+   *
+   */
+  message?: string | null
   multiline?: Multiline
 }
 /**
  * Set of definitions executed before the execution of the block.
  *
  */
-export interface Defs16 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
-    | null
+export interface Defs17 {
+  [k: string]: BlockType
 }
 /**
  * Include a PDL file.
  */
 export interface IncludeBlock {
-  description?: Description17
   /**
-   * Type specification of the result of the block.
+   * Documentation associated to the block.
    *
    */
-  spec?:
-    | (
-        | "null"
-        | "boolean"
-        | "string"
-        | "number"
-        | "integer"
-        | "array"
-        | "object"
-        | "bool"
-        | "str"
-        | "float"
-        | "int"
-        | "list"
-        | "obj"
-      )
-    | EnumPdlType
-    | PdlTypeType[]
-    | OptionalPdlType
-    | JsonSchemaTypePdlType
-    | ObjectPdlType
-    | {
-        [k: string]: PdlTypeType
-      }
-    | null
-  defs?: Defs17
-  def?: Def3
-  contribute?: Contribute3
-  parser?: Parser3
-  fallback?: Fallback3
-  retry?: Retry3
-  trace_error_on_retry?: TraceErrorOnRetry3
-  role?: Role3
-  pdl__context?: PdlContext3
-  pdl__id?: PdlId3
-  pdl__result?: unknown
-  pdl__location?: PdlLocationType | null
-  pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf3
-  context?: IndependentEnum
-  kind?: Kind3
-  include: Include
-  pdl__trace?: PdlTrace1
-}
-/**
- * Set of definitions executed before the execution of the block.
- *
- */
-export interface Defs17 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
-    | null
-}
-/**
- * Import a PDL file.
- */
-export interface ImportBlock {
-  description?: Description18
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -4602,60 +3183,74 @@ export interface ImportBlock {
       }
     | null
   defs?: Defs18
-  def?: Def2
-  contribute?: Contribute2
-  parser?: Parser2
-  fallback?: Fallback2
-  retry?: Retry2
-  trace_error_on_retry?: TraceErrorOnRetry2
-  role?: Role2
-  pdl__context?: PdlContext2
-  pdl__id?: PdlId2
-  pdl__result?: unknown
-  pdl__location?: PdlLocationType | null
-  pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf2
-  kind?: Kind2
-  import: Import
-  pdl__trace?: PdlTrace
-}
-/**
- * Set of definitions executed before the execution of the block.
- *
- */
-export interface Defs18 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
-    | null
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType17
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType17
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
+  pdl__result?: unknown
+  pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
+  pdl__timing?: PdlTiming | null
+  pdl__is_leaf?: PdlIsLeaf17
+  context?: IndependentEnum8
+  kind?: Kind17
+  include: Include
+  pdl__trace?: BlockType | null
 }
 /**
- * Block representing an error generated at runtime.
+ * Set of definitions executed before the execution of the block.
+ *
  */
-export interface ErrorBlock {
-  description?: Description19
+export interface Defs18 {
+  [k: string]: BlockType
+}
+/**
+ * Import a PDL file.
+ */
+export interface ImportBlock {
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -4686,60 +3281,73 @@ export interface ErrorBlock {
       }
     | null
   defs?: Defs19
-  def?: Def1
-  contribute?: Contribute1
-  parser?: Parser1
-  fallback?: Fallback1
-  retry?: Retry1
-  trace_error_on_retry?: TraceErrorOnRetry1
-  role?: Role1
-  pdl__context?: PdlContext1
-  pdl__id?: PdlId1
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType18
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType18
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf1
-  kind?: Kind1
-  msg: Msg
-  program: Program1
+  pdl__is_leaf?: PdlIsLeaf18
+  kind?: Kind18
+  import: Import
+  pdl__trace?: BlockType | null
 }
 /**
  * Set of definitions executed before the execution of the block.
  *
  */
 export interface Defs19 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | FunctionBlock
-    | CallBlock
-    | LitellmModelBlock
-    | GraniteioModelBlock
-    | CodeBlock
-    | ArgsBlock
-    | GetBlock
-    | DataBlock
-    | IfBlock
-    | MatchBlock
-    | RepeatBlock
-    | TextBlock
-    | LastOfBlock
-    | ArrayBlock
-    | ObjectBlock
-    | MessageBlock
-    | ReadBlock
-    | IncludeBlock
-    | ImportBlock
-    | ErrorBlock
-    | EmptyBlock
-    | null
+  [k: string]: BlockType
 }
 /**
- * Block without an action. It can contain definitions.
+ * Block representing an error generated at runtime.
  */
-export interface EmptyBlock {
-  description?: Description20
+export interface ErrorBlock {
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
   /**
    * Type specification of the result of the block.
    *
@@ -4770,27 +3378,60 @@ export interface EmptyBlock {
       }
     | null
   defs?: Defs20
-  def?: Def
-  contribute?: Contribute
-  parser?: Parser
-  fallback?: Fallback
-  retry?: Retry
-  trace_error_on_retry?: TraceErrorOnRetry
-  role?: Role
-  pdl__context?: PdlContext
-  pdl__id?: PdlId
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType19
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType19
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
   pdl__result?: unknown
   pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
   pdl__timing?: PdlTiming | null
-  pdl__is_leaf?: PdlIsLeaf
-  kind?: Kind
-}
-/**
- * Set of definitions executed before the execution of the block.
- *
- */
-export interface Defs20 {
-  [k: string]:
+  pdl__is_leaf?: PdlIsLeaf19
+  kind?: Kind19
+  msg: Msg
+  /**
+   * Block that raised the error.
+   *
+   */
+  program:
     | boolean
     | number
     | string
@@ -4805,6 +3446,7 @@ export interface Defs20 {
     | IfBlock
     | MatchBlock
     | RepeatBlock
+    | MapBlock
     | TextBlock
     | LastOfBlock
     | ArrayBlock
@@ -4818,67 +3460,25 @@ export interface Defs20 {
     | null
 }
 /**
- * Contribution of a specific value instead of the default one.
- */
-export interface ContributeValue {
-  value: Value
-}
-export interface LocalizedExpression {
-  pdl__expr: PdlExpr
-  pdl__result?: unknown
-  pdl__location?: PdlLocationType | null
-}
-export interface PdlExpr {
-  [k: string]: unknown
-}
-/**
- * Internal data structure to keep track of the source location information.
- */
-export interface PdlLocationType {
-  path: Path
-  file: File
-  table: Table
-}
-export interface Table {
-  [k: string]: number
-}
-/**
- * Use a PDL program as a parser specification (experimental).
+ * Set of definitions executed before the execution of the block.
+ *
  */
-export interface PdlParser {
-  description?: Description21
-  spec?:
-    | (
-        | "null"
-        | "boolean"
-        | "string"
-        | "number"
-        | "integer"
-        | "array"
-        | "object"
-        | "bool"
-        | "str"
-        | "float"
-        | "int"
-        | "list"
-        | "obj"
-      )
-    | EnumPdlType
-    | PdlTypeType[]
-    | OptionalPdlType
-    | JsonSchemaTypePdlType
-    | ObjectPdlType
-    | {
-        [k: string]: PdlTypeType
-      }
-    | null
-  pdl: Pdl
+export interface Defs20 {
+  [k: string]: BlockType
 }
 /**
- * A regular expression parser.
+ * Block without an action. It can contain definitions.
  */
-export interface RegexParser {
-  description?: Description22
+export interface EmptyBlock {
+  /**
+   * Documentation associated to the block.
+   *
+   */
+  description?: string | null
+  /**
+   * Type specification of the result of the block.
+   *
+   */
   spec?:
     | (
         | "null"
@@ -4904,24 +3504,69 @@ export interface RegexParser {
         [k: string]: PdlTypeType
       }
     | null
-  regex: Regex
-  mode?: Mode
+  defs?: Defs21
+  /**
+   * Name of the variable used to store the result of the execution of the block.
+   *
+   */
+  def?: string | null
+  contribute?: ContributeType20
+  /**
+   * Parser to use to construct a value out of a string result.
+   */
+  parser?: ParserType | null
+  /**
+   * Block to execute in case of error.
+   *
+   */
+  fallback?: BlockType | null
+  /**
+   * The maximum number of times to retry when an error occurs within a block.
+   *
+   */
+  retry?: number | null
+  /**
+   * Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
+   *
+   */
+  trace_error_on_retry?: boolean | string | null
+  requirements?: RequirementsType20
+  /**
+   * Role associated to the block and sub-blocks.
+   * Typical roles are `system`, `user`, and `assistant`,
+   * but there may be other roles such as `available_tools`.
+   */
+  role?: string | null
+  /**
+   * Current context.
+   */
+  pdl__context?: ModelInput | null
+  /**
+   * Unique identifier for this block.
+   */
+  pdl__id?: string | null
+  pdl__result?: unknown
+  pdl__location?: PdlLocationType | null
+  /**
+   * Execution timing information.
+   */
+  pdl__timing?: PdlTiming | null
+  pdl__is_leaf?: PdlIsLeaf20
+  kind?: Kind20
 }
 /**
- * Internal data structure to record timing information in the trace.
+ * Set of definitions executed before the execution of the block.
+ *
  */
-export interface PdlTiming {
-  start_nanos?: StartNanos
-  end_nanos?: EndNanos
-  first_use_nanos?: FirstUseNanos
-  timezone?: Timezone
+export interface Defs21 {
+  [k: string]: BlockType
 }
 /**
  * Join loop iterations as a string.
  */
 export interface JoinText {
   as?: As
-  with?: With
+  with?: With1
 }
 /**
  * Join loop iterations as an array.
@@ -4942,61 +3587,18 @@ export interface JoinLastOf {
   as: As3
 }
 /**
- * Case of a match.
- */
-export interface MatchCase {
-  case?: Case
-  if?: If
-  then: Then
-  pdl__case_result?: PdlCaseResult
-  pdl__if_result?: PdlIfResult
-  pdl__matched?: PdlMatched
-}
-/**
- * Match any of the patterns.
- */
-export interface OrPattern {
-  def?: Def12
-  anyOf: Anyof
-}
-/**
- * Match an array.
- */
-export interface ArrayPattern {
-  def?: Def13
-  array: Array1
-}
-/**
- * Match an object.
- */
-export interface ObjectPattern {
-  def?: Def14
-  object: Object2
-}
-export interface Object2 {
-  [k: string]:
-    | boolean
-    | number
-    | string
-    | OrPattern
-    | ArrayPattern
-    | ObjectPattern
-    | AnyPattern
-    | null
-}
-/**
- * Match any value.
+ * Join loop iterations as the value of the last iteration.
  */
-export interface AnyPattern {
-  def?: Def15
-  any: Any
+export interface JoinReduce {
+  as?: As4
+  reduce: Reduce
 }
 /**
  * Internal data structure to record token consumption usage information.
  */
 export interface PdlUsage {
-  completion_tokens?: CompletionTokens
-  prompt_tokens?: PromptTokens
+  completion_tokens?: number | null
+  prompt_tokens?: number | null
   [k: string]: unknown
 }
 /**
diff --git a/pdl-live-react/src/pdl_ast_utils.ts b/pdl-live-react/src/pdl_ast_utils.ts
index 7d57cd947..2fcef845f 100644
--- a/pdl-live-react/src/pdl_ast_utils.ts
+++ b/pdl-live-react/src/pdl_ast_utils.ts
@@ -45,7 +45,6 @@ export function map_block_children(
     )
     new_block = { ...new_block, contribute }
   }
-  // @ts-expect-error: TODO
   new_block = match(new_block)
     // .with(P.string, s => s)
     .with({ kind: "empty" }, (block) => block)
@@ -179,6 +178,7 @@ export function map_block_children(
     })
     .with({ kind: "repeat" }, (block) => {
       const for_ = block?.for ? f_expr(block.for) : undefined
+      const while_ = block?.until ? f_expr(block.while) : undefined
       const until = block?.until ? f_expr(block.until) : undefined
       const max_iterations = block?.maxIterations
         ? f_expr(block.maxIterations)
@@ -187,11 +187,25 @@ export function map_block_children(
       return {
         ...block,
         for: for_,
+        while: while_,
         repeat,
         until,
         maxIterations: max_iterations,
       }
     })
+    .with({ kind: "map" }, (block) => {
+      const for_ = block?.for ? f_expr(block.for) : undefined
+      const max_iterations = block?.maxIterations
+        ? f_expr(block.maxIterations)
+        : undefined
+      const map = f_block(block.map)
+      return {
+        ...block,
+        for: for_,
+        map,
+        maxIterations: max_iterations,
+      }
+    })
     .with({ kind: "error" }, (block) => {
       const doc = f_block(block.program)
       return { ...block, program: doc }
@@ -202,7 +216,8 @@ export function map_block_children(
     })
     .with({ kind: "include" }, (block) => block)
     .with({ kind: "import" }, (block) => block)
-    .with({ kind: undefined }, (block) => block)
+    .with({ kind: P.nullish }, (block) => block)
+    // @ts-expect-error: TODO
     .exhaustive()
   match(new_block)
     .with({ parser: { pdl: P._ } }, (block) => {
@@ -289,11 +304,15 @@ export function iter_block_children(
     .with({ kind: "repeat" }, (block) => {
       f(block.repeat)
     })
+    .with({ kind: "map" }, (block) => {
+      f(block.map)
+    })
     .with({ kind: "error" }, (block) => f(block.program))
     .with({ kind: "read" }, () => {})
     .with({ kind: "include" }, () => {})
     .with({ kind: "import" }, () => {})
     .with({ kind: undefined }, () => {})
+    // @ts-expect-error: TODO
     .exhaustive()
   match(block)
     .with({ parser: { pdl: P._ } }, (block) => {
diff --git a/pdl-live-react/src/view/detail/find.ts b/pdl-live-react/src/view/detail/find.ts
index 6ee1b38bd..0246f58da 100644
--- a/pdl-live-react/src/view/detail/find.ts
+++ b/pdl-live-react/src/view/detail/find.ts
@@ -3,6 +3,7 @@ import { childrenOf } from "../timeline/model"
 import {
   isNonScalarPdlBlock,
   nonNullable,
+  PdlBlock,
   type NonScalarPdlBlock as Block,
 } from "../../helpers"
 
@@ -21,7 +22,7 @@ export default function find(
   } else {
     return (
       childrenOf(block)
-        .map((child) => find(child, id))
+        .map((child: PdlBlock) => find(child, id))
         .filter(nonNullable)[0] || null
     )
   }
diff --git a/pdl-live-react/src/view/timeline/model.ts b/pdl-live-react/src/view/timeline/model.ts
index c384c3e70..1c1481fc9 100644
--- a/pdl-live-react/src/view/timeline/model.ts
+++ b/pdl-live-react/src/view/timeline/model.ts
@@ -102,14 +102,15 @@ function computeModelIter(
 
   const childrenModel = childrenOf(block)
     .filter(nonNullable)
-    .flatMap((child) => computeModelIter(child, root))
+    .flatMap((child: PdlBlock) => computeModelIter(child, root))
 
   // Correct for anomalies in the trace where a child may have an
   // earlier end timestamp than its children. See
   // https://github.com/IBM/prompt-declaration-language/pull/683
   if (root) {
     const maxEnd = childrenModel.reduce(
-      (maxEnd, child) => Math.max(maxEnd, child.block.pdl__timing.end_nanos),
+      (maxEnd: number, child: TimelineRow) =>
+        Math.max(maxEnd, child.block.pdl__timing.end_nanos),
       0,
     )
     root.block.pdl__timing.end_nanos = Math.max(
@@ -122,35 +123,41 @@ function computeModelIter(
 }
 
 export function childrenOf(block: NonScalarPdlBlock) {
-  return match(block)
-    .with({ kind: "model" }, (data) => [/*data.input,*/ data.pdl__result])
-    .with({ kind: "code" }, (data) => [data.pdl__result])
-    .with({ kind: "get" }, (data) => [data.pdl__result])
-    .with({ kind: "data" }, (data) => [data.pdl__result])
-    .with({ kind: "if", if: { pdl__result: P._ } }, (data) =>
-      data.if.pdl__result ? [data.then] : [data.else],
-    )
-    .with({ kind: "if" }, (data) => [data.then, data.else])
-    .with({ kind: "match" }, (data) => [data.with]) // TODO
-    .with({ kind: "read" }, (data) => [data.pdl__result])
-    .with({ kind: "include" }, (data) => [data.pdl__trace ?? data.pdl__result])
-    .with({ kind: "import" }, (data) => [data.pdl__trace ?? data.pdl__result])
-    .with({ kind: "function" }, () => [])
-    .with({ kind: "call" }, (data) => [data.pdl__trace ?? data.pdl__result])
-    .with({ kind: "text" }, (data) => [data.text])
-    .with({ kind: "lastOf" }, (data) => [data.lastOf])
-    .with({ kind: "array" }, (data) => [data.array])
-    .with({ kind: "object" }, (data) => [data.object])
-    .with({ kind: "message" }, (data) => [data.content])
-    .with({ kind: "repeat" }, (data) => [data.pdl__trace ?? data.repeat])
-    .with({ kind: "empty" }, (data) =>
-      data.defs ? Object.values(data.defs) : [],
-    )
-    .with({ kind: "error" }, () => []) // TODO show errors in trace
-    .with({ kind: undefined }, () => [])
-    .exhaustive()
-    .flat()
-    .filter(nonNullable)
+  return (
+    match(block)
+      .with({ kind: "model" }, (data) => [/*data.input,*/ data.pdl__result])
+      .with({ kind: "code" }, (data) => [data.pdl__result])
+      .with({ kind: "get" }, (data) => [data.pdl__result])
+      .with({ kind: "data" }, (data) => [data.pdl__result])
+      .with({ kind: "if", if: { pdl__result: P._ } }, (data) =>
+        data.if.pdl__result ? [data.then] : [data.else],
+      )
+      .with({ kind: "if" }, (data) => [data.then, data.else])
+      .with({ kind: "match" }, (data) => [data.with]) // TODO
+      .with({ kind: "read" }, (data) => [data.pdl__result])
+      .with({ kind: "include" }, (data) => [
+        data.pdl__trace ?? data.pdl__result,
+      ])
+      .with({ kind: "import" }, (data) => [data.pdl__trace ?? data.pdl__result])
+      .with({ kind: "function" }, () => [])
+      .with({ kind: "call" }, (data) => [data.pdl__trace ?? data.pdl__result])
+      .with({ kind: "text" }, (data) => [data.text])
+      .with({ kind: "lastOf" }, (data) => [data.lastOf])
+      .with({ kind: "array" }, (data) => [data.array])
+      .with({ kind: "object" }, (data) => [data.object])
+      .with({ kind: "message" }, (data) => [data.content])
+      .with({ kind: "repeat" }, (data) => [data.pdl__trace ?? data.repeat])
+      .with({ kind: "map" }, (data) => [data.pdl__trace ?? data.map])
+      .with({ kind: "empty" }, (data) =>
+        data.defs ? Object.values(data.defs) : [],
+      )
+      .with({ kind: "error" }, () => []) // TODO show errors in trace
+      .with({ kind: P.nullish }, () => [])
+      // @ts-expect-error: TODO
+      .exhaustive()
+      .flat()
+      .filter(nonNullable)
+  )
 }
 
 function positionOf(row: TimelineRow): Position {
diff --git a/pyproject.toml b/pyproject.toml
index 3350229a5..f800055e0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -17,7 +17,7 @@ dependencies = [
   "termcolor>=2,<4",
   "ipython>=8,<10",
   "json-repair~=0.35",
-  "granite-io>=0.2,<0.5",
+  "granite-io>=0.5,<0.6",
 ]
 authors = [
   { name="Mandana Vaziri", email="mvaziri@us.ibm.com" },
@@ -44,13 +44,15 @@ examples = [
   "pymilvus~=2.5",
   "langchain~=0.3",
   "langchain-community~=0.3",
-  "pypdf~=5.2",
+  "pypdf~=6.0",
   "wikipedia~=1.0",
   "textdistance~=4.0",
-  "datasets>2,<4",
+  "datasets>3,<5",
   "sympy~=1.0",
   "scikit-learn>=1.6.1,<1.8.0",
-  "faiss-cpu>=1.10,<1.12"
+  "faiss-cpu>=1.10,<1.12",
+  "funcy>=2",
+  "evalplus>=0.3.1",
 ]
 docs = [
   "mkdocs~=1.0",
diff --git a/renovate.json b/renovate.json
new file mode 100644
index 000000000..5db72dd6a
--- /dev/null
+++ b/renovate.json
@@ -0,0 +1,6 @@
+{
+  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
+  "extends": [
+    "config:recommended"
+  ]
+}
diff --git a/src/pdl/optimize/config_parser.py b/src/pdl/optimize/config_parser.py
index 27b85510b..ec449ee1c 100644
--- a/src/pdl/optimize/config_parser.py
+++ b/src/pdl/optimize/config_parser.py
@@ -3,11 +3,28 @@
 from pydantic import BaseModel, Field
 
 
+class JsonlDataset(BaseModel):
+    train: str = Field(..., description="Path to the training dataset in JSONL format")
+    test: str = Field(..., description="Path to the test dataset in JSONL format")
+    validation: str = Field(
+        ..., description="Path to the validation dataset in JSONL format"
+    )
+
+
 class OptimizationConfig(BaseModel):
-    benchmark: str = Field()
+    pdl_path: str = Field(..., description="Path to the PDL file to optimize")
+    dataset: str | JsonlDataset = Field()
+    demonstrations_variable_name: str = Field(default="demonstrations")
+    demonstration_columns: list[str] = Field()
+    instance_columns: list[str] = Field()
+    groundtruth_column: str | None = Field()
+    eval_pdl: str | None = Field(
+        default=None, description="Path to the PDL file used for evaluation"
+    )
     num_candidates: int = Field(default=30)
-    num_demonstrations: int = Field(default=5)
-    initial_test_set_size: int = Field(default=10)
+    num_demonstrations: int | None = Field(default=None)
+    initial_validation_set_size: int = Field(default=10)
+    max_validation_set_size: int = Field(default=1000)
     max_test_set_size: int = Field(default=1000)
     timeout: int = Field(default=120)
     budget_growth: Literal["double", "to_max"] = Field(default="double")
@@ -17,7 +34,6 @@ class OptimizationConfig(BaseModel):
     train_set_name: str = Field(default="train")
     test_set_name: str = Field(default="test")
     validation_set_name: str = Field(default="validation")
-    demonstrations_variable_name: str = Field(default="demonstrations")
     variables: dict[str, list] = Field(default={})
     experiment_prefix: str = Field(default="")
 
diff --git a/src/pdl/optimize/optimizer_evaluator.py b/src/pdl/optimize/optimizer_evaluator.py
index 4e809c848..5898087e7 100644
--- a/src/pdl/optimize/optimizer_evaluator.py
+++ b/src/pdl/optimize/optimizer_evaluator.py
@@ -45,10 +45,7 @@ def __init__(
     def get_scope(self) -> ScopeType:
         raise NotImplementedError
 
-    def extract_answer(self, document: str) -> Any:
-        raise NotImplementedError
-
-    def answer_correct(self, document: str, answer: Any, truth: Any) -> bool:
+    def score(self, document: str, ground_truth: Any) -> float:
         raise NotImplementedError
 
     def run(  # type: ignore # noqa: C901
@@ -58,7 +55,6 @@ def run(  # type: ignore # noqa: C901
         answer = None
         exception: PDLParseError | PDLRuntimeError | Exception | bool | None = None
         result = None
-        match = False
         truth = self.example[self.answer_key]
         scope: PdlDict = PdlDict({})
 
@@ -68,6 +64,7 @@ def run(  # type: ignore # noqa: C901
         end_time = None
         total_tokens = -1
         errored = False
+        score = 0.0
         while retry:
             if tries > 1:
                 console.log("RETRYING! ", tries)
@@ -93,6 +90,12 @@ def run(  # type: ignore # noqa: C901
 
                 if isinstance(document, str):
                     document = document.strip()
+                    if document:
+                        errored = False
+                        retry = False
+                    else:
+                        console.log("Empty document returned, retrying...")
+                    answer = document
                 else:
                     raise TypeError(
                         f"Expected document to be a string, got {type(document)}",
@@ -102,24 +105,10 @@ def run(  # type: ignore # noqa: C901
                 runtime = end_time - start_time
                 console.log(f"Runtime took seconds: {runtime:.2f}")
 
-                errored = False
-                if errored:
-                    console.log("PDL error occured.")
-                else:
-                    answer = self.extract_answer(document)
-
-                    if answer is None:
-                        last_line = document.splitlines()[-1]
-                        console.log("Couldn't extract answer: ", last_line)
-
-                if answer is None or errored:
-                    retry = True
-
-                if answer is not None and not errored:
-                    retry = False
-
                 if tries >= RETRY_COUNT:
                     retry = False
+
+                score = float(self.score(document, truth))
             except PDLParseError as exc:
                 console.print_exception(show_locals=False)
                 errored = True
@@ -160,11 +149,9 @@ def run(  # type: ignore # noqa: C901
         if errored and not exception:
             exception = errored
 
-        match = self.answer_correct(document, answer, truth)
-
         return TrialOutput(
             pdl_program=self.pdl_program,
-            correct=match,
+            score=score,
             exception=exception,
             scope=scope,
             pdl_result=result,
diff --git a/src/pdl/optimize/pdl_evaluator.py b/src/pdl/optimize/pdl_evaluator.py
new file mode 100644
index 000000000..f1f9eeeb3
--- /dev/null
+++ b/src/pdl/optimize/pdl_evaluator.py
@@ -0,0 +1,57 @@
+from typing import Any
+
+from pdl.optimize.optimizer_evaluator import OptimizerEvaluator
+from pdl.pdl import exec_str
+from pdl.pdl_ast import ScopeType
+from pdl.pdl_interpreter import empty_scope
+
+
+class PdlEvaluator(OptimizerEvaluator):
+    def __init__(
+        self,
+        # scoring_pdl: str,
+        *args,
+        **kwargs,
+    ) -> None:
+        super().__init__(*args, **kwargs)
+        self.scoring_pdl = self.config.eval_pdl
+        if self.config.groundtruth_column is None:
+            raise ValueError("Groundtruth column must be specified")
+        self.answer_key = self.config.groundtruth_column
+
+    def get_scope(self) -> ScopeType:
+        demo_var = self.config.demonstrations_variable_name
+
+        scope = {}
+
+        for k in self.config.variables:
+            if k in self.candidate:
+                scope[k] = self.candidate[k]
+
+        scope[demo_var] = [
+            {k: q[k] for k in self.config.demonstration_columns}
+            for q in self.candidate[demo_var]
+        ]
+
+        for k in self.config.instance_columns:
+            if k in self.example:
+                scope[k] = self.example[k]
+
+        return empty_scope | scope
+
+    def score(self, document: str, ground_truth: Any) -> float:
+        scope = empty_scope | {"document": document, "ground_truth": ground_truth}
+        prog = f"""defs:
+  scoring:
+    import: "{self.scoring_pdl}"
+lastOf:
+  - call: ${{ scoring.score }}
+    args:
+        document: ${{ document }}
+        ground_truth: ${{ ground_truth }}"""
+        result = exec_str(prog=prog, scope=scope, output="result")
+
+        if isinstance(result, str):
+            result = result.strip()
+        # Note: this breaks if the result is not a number
+        return float(result)
diff --git a/src/pdl/optimize/pdl_optimizer.py b/src/pdl/optimize/pdl_optimizer.py
index aa6316d53..17b4ed011 100644
--- a/src/pdl/optimize/pdl_optimizer.py
+++ b/src/pdl/optimize/pdl_optimizer.py
@@ -11,7 +11,8 @@
 from typing import Any
 
 import yaml
-from datasets import Dataset, DatasetDict
+from datasets.arrow_dataset import Dataset
+from datasets.dataset_dict import DatasetDict
 from duration_parser import parse as parse_duration
 from numpy.random import default_rng
 from rich.logging import RichHandler
@@ -67,22 +68,22 @@ class PDLOptimizer:
     # pylint: disable=too-many-instance-attributes,too-many-arguments,too-many-positional-arguments
     def __init__(
         self,
-        pdl_path: Path,
         dataset: DatasetDict,
         config: OptimizationConfig,
         trial_thread: type[OptimizerEvaluator],
         yield_output: bool,
         experiment_path: Path,
     ) -> None:
-        self.pdl_path = pdl_path
         self.trial_thread = trial_thread
         self.yield_output = yield_output
 
         self.config = config
+        self.pdl_path = Path(config.pdl_path)
         self.parallelism = config.parallelism
         self.num_demonstrations = config.num_demonstrations
-        self.starting_validation_set_size = config.initial_test_set_size
-        self.ending_test_set_size = config.max_test_set_size
+        self.starting_validation_set_size = config.initial_validation_set_size
+        self.ending_validation_set_size = config.max_validation_set_size
+        self.max_test_set_size = config.max_test_set_size
         self.max_candidates = config.num_candidates
         self.timeout = config.timeout
         self.budget_growth = config.budget_growth
@@ -159,10 +160,13 @@ def sample_candidates(
         demo_name = self.config.demonstrations_variable_name
         candidates = []
 
+        num_demonstrations_set = {
+            int(x) for x in self.config.variables.get("num_demonstrations", set())
+        }
+
         if (
-            "prompt_pattern" in self.config.variables
-            and "cot" in self.config.variables.get("prompt_pattern", [])
-            and 0 in self.config.variables.get("num_demonstrations", [])
+            "cot" in self.config.variables.get("prompt_pattern", [])
+            and 0 in num_demonstrations_set
         ):
             cot_candidate = {
                 k: self.sample_random_index(v) for k, v in self.config.variables.items()
@@ -178,18 +182,18 @@ def sample_candidates(
 
             candidates.append(cot_candidate)
 
-        zero_shots_seen = ["cot"]
+        zero_shots_seen = {"cot"}
         while len(candidates) < num_candidates:
             variable_instance = {
                 k: self.sample_random_index(v) for k, v in self.config.variables.items()
             }
             if (
                 variable_instance.get("num_demonstrations") == 0
-                and variable_instance.get("prompt_pattern") == "cot"
+                and variable_instance.get("prompt_pattern") is not None
             ):
                 if variable_instance["prompt_pattern"] in zero_shots_seen:
                     continue
-                zero_shots_seen.append(variable_instance["prompt_pattern"])
+                zero_shots_seen.add(variable_instance["prompt_pattern"])
 
             num_demonstrations = int(
                 variable_instance.get("num_demonstrations", self.num_demonstrations),
@@ -214,16 +218,26 @@ def sample_candidates(
             candidates.append(candidate)
 
         if (
-            "num_demonstrations"
-            in self.config.variables  # check if is variable in config
-            and len(self.config.variables["num_demonstrations"])
-            > 1  # check more than 1 option
-            and 0 in [int(x) for x in self.config.variables["num_demonstrations"]]
-            # check zeroshot is an option
+            len(num_demonstrations_set) > 1  # check more than 1 option
+            and 0 in num_demonstrations_set  # check zeroshot is an option
         ):
-            zero_shotters = [x for x in candidates if x["num_demonstrations"] == 0]
+            zero_shotters = [
+                x.get("uuid") for x in candidates if x.get("num_demonstrations") == 0
+            ]
+            variables_zs = self.config.variables.copy()
+            variables_zs.pop("num_demonstrations", None)
+
+            max_zs = len(list(itertools.product(*variables_zs.values())))
+
+            if len(zero_shotters) > max_zs:
+                logger.warning(
+                    "More zero-shot candidates (%d) than expected (%d; "
+                    "product of all variables). "
+                    "Identical duplicated candidates may waste compute.",
+                    len(zero_shotters),
+                    max_zs,
+                )
 
-            assert len(zero_shotters) <= 3
         assert len(candidates) == num_candidates
         return candidates
 
@@ -240,7 +254,10 @@ def save_experiment(self):
         exp_file = self.experiment_path / f"{self.experiment_uuid}.json"
 
         with exp_file.open("w") as f:
-            json.dump(self.experiment_log, f)
+            try:
+                json.dump(self.experiment_log, f)
+            except TypeError:
+                logger.warning("Unable to save experiment")  # TODO
 
         return exp_file
 
@@ -276,7 +293,7 @@ def run(self) -> dict[str, Any]:
             self.starting_validation_set_size,
             validation_set_size,
         )
-        ending_validation_set_size = self.ending_test_set_size
+        ending_validation_set_size = self.ending_validation_set_size
         num_iterations = ceil(log2(num_candidates))
 
         validation_set_multiplier = 0
@@ -477,7 +494,7 @@ def run(self) -> dict[str, Any]:
             # reset_usage_stats()
 
             range_end = min(
-                ending_validation_set_size,
+                self.max_test_set_size,
                 len(self.dataset[self.test_set_name]),
             )
             eval_set_indices = list(range(range_end))
@@ -502,7 +519,7 @@ def run(self) -> dict[str, Any]:
             self.pbar.close()
 
             self.experiment_log["final_iteration"] = {
-                "ending_test_set_size": ending_validation_set_size,
+                "ending_test_set_size": range_end,
                 "eval_set_indices": eval_set_indices,
                 "selected_candidates_uuid": winning_candidate["uuid"],
                 "candidate": final_score.to_dict(),
@@ -615,7 +632,7 @@ def evaluate(
                 ),
             )
 
-        matches = 0
+        score = 0
         exception_count = 0
         timeout_count = 0
         exceptions: list[BaseException | bool] = []
@@ -645,10 +662,10 @@ def evaluate(
                     answer = result.answer
 
                 logger.info(
-                    "Answer: %s Ground truth: %s Match: %s",
+                    "Answer: %s Ground truth: %s Score: %s",
                     answer,
                     result.groundtruth,
-                    result.correct,
+                    result.score,
                 )
 
                 if candidate["uuid"] not in self.candidate_results:
@@ -667,16 +684,16 @@ def evaluate(
                 if trial_result.exception is not None:
                     exceptions.append(trial_result.exception)
 
-                matches += int(trial_result.correct)
+                score += float(trial_result.score)
 
-                p_passing = matches / (index + 1)
+                p_passing = score / (index + 1)
 
         end_time = time.time()
         runtime = end_time - start_time
 
         logger.info(
             "Matches: %s Accuracy: %.2f Exceptions: %s (%s timeout, %s other) Total: %s",
-            f"{matches:,}",
+            f"{score:,}",
             p_passing * 100,
             f"{len(exceptions):,}",
             timeout_count,
@@ -695,7 +712,9 @@ def evaluate(
         )
 
     def benchmark(self, test_set_size: int, candidate: dict | None = None):
-        if self.num_demonstrations <= 0:
+        if self.num_demonstrations is None:
+            demo_size = 0
+        elif self.num_demonstrations <= 0:
             demo_size = len(self.dataset[self.train_set_name])
         else:
             demo_size = self.num_demonstrations
diff --git a/src/pdl/optimize/util.py b/src/pdl/optimize/util.py
index 9925f8e0e..d331f49d1 100644
--- a/src/pdl/optimize/util.py
+++ b/src/pdl/optimize/util.py
@@ -4,7 +4,7 @@
 from typing import Any
 
 import yaml
-from datasets import Dataset
+from datasets.arrow_dataset import Dataset
 from rich.console import Console
 
 from pdl.pdl_ast import Program, ScopeType
@@ -20,7 +20,7 @@ class TrialOutput:
     pdl_program: Program
     scope: ScopeType
     runtime: float
-    correct: bool = False
+    score: float = 0.0
     exception: BaseException | bool | None = None
     pdl_result: Any = None
     pdl_document: str = ""
@@ -32,7 +32,7 @@ class TrialOutput:
 
     def to_dict(self) -> dict:
         return {
-            "correct": self.correct,
+            "score": self.score,
             "exception": str(self.exception),
             "pdl_document": self.pdl_document,
             "answer": self.answer,
diff --git a/src/pdl/pdl-schema.json b/src/pdl/pdl-schema.json
index 17a6c3f60..248e68b78 100644
--- a/src/pdl/pdl-schema.json
+++ b/src/pdl/pdl-schema.json
@@ -5,16 +5,8 @@
       "description": "Match any value.",
       "properties": {
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Def"
+          "$ref": "#/$defs/OptionalStr",
+          "default": null
         },
         "any": {
           "const": null,
@@ -33,17 +25,9 @@
       "description": "Execute a command line, which will spawn a subprocess with the given argument vector. Note: if you need a shell script execution, you must wrap your command line in /bin/sh or some shell of your choosing.\n\nExample:\n```PDL\nargs:\n- /bin/sh\n- \"-c\"\n- \"if [[ $x = 1 ]]; then echo y; else echo n; fi\"\n```",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -52,86 +36,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -139,253 +44,71 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
         "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
           "const": true,
@@ -408,14 +131,7 @@
         "args": {
           "description": "The argument vector to spawn.\n    ",
           "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-              },
-              {
-                "type": "string"
-              }
-            ]
+            "$ref": "#/$defs/ExpressionStr"
           },
           "title": "Args",
           "type": "array"
@@ -432,17 +148,9 @@
       "description": "Return the array of values computed by each block of the list of blocks.",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -451,86 +159,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -538,253 +167,71 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
         "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
           "const": false,
@@ -805,86 +252,7 @@
         "array": {
           "description": "Elements of the array.",
           "items": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "title": "Array",
           "type": "array"
@@ -901,48 +269,12 @@
       "description": "Match an array.",
       "properties": {
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Def"
+          "$ref": "#/$defs/OptionalStr",
+          "default": null
         },
         "array": {
           "items": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/OrPattern"
-              },
-              {
-                "$ref": "#/$defs/ArrayPattern"
-              },
-              {
-                "$ref": "#/$defs/ObjectPattern"
-              },
-              {
-                "$ref": "#/$defs/AnyPattern"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/PatternType"
           },
           "title": "Array",
           "type": "array"
@@ -954,364 +286,180 @@
       "title": "ArrayPattern",
       "type": "object"
     },
-    "CallBlock": {
-      "additionalProperties": false,
-      "description": "Calling a function.",
-      "properties": {
-        "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+    "BlockType": {
+      "anyOf": [
+        {
+          "type": "boolean"
         },
-        "spec": {
-          "$ref": "#/$defs/PdlTypeType",
-          "default": null,
-          "description": "Type specification of the result of the block.\n    "
+        {
+          "type": "integer"
         },
-        "defs": {
-          "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
-          },
-          "default": {},
-          "description": "Set of definitions executed before the execution of the block.\n    ",
-          "title": "Defs",
-          "type": "object"
+        {
+          "type": "number"
         },
-        "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+        {
+          "type": "string"
         },
-        "contribute": {
-          "default": [
-            "result",
-            "context"
-          ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
+        {
+          "$ref": "#/$defs/FunctionBlock"
+        },
+        {
+          "$ref": "#/$defs/CallBlock"
+        },
+        {
+          "$ref": "#/$defs/LitellmModelBlock"
+        },
+        {
+          "$ref": "#/$defs/GraniteioModelBlock"
+        },
+        {
+          "$ref": "#/$defs/CodeBlock"
+        },
+        {
+          "$ref": "#/$defs/ArgsBlock"
+        },
+        {
+          "$ref": "#/$defs/GetBlock"
+        },
+        {
+          "$ref": "#/$defs/DataBlock"
+        },
+        {
+          "$ref": "#/$defs/IfBlock"
+        },
+        {
+          "$ref": "#/$defs/MatchBlock"
+        },
+        {
+          "$ref": "#/$defs/RepeatBlock"
+        },
+        {
+          "$ref": "#/$defs/MapBlock"
+        },
+        {
+          "$ref": "#/$defs/TextBlock"
+        },
+        {
+          "$ref": "#/$defs/LastOfBlock"
+        },
+        {
+          "$ref": "#/$defs/ArrayBlock"
+        },
+        {
+          "$ref": "#/$defs/ObjectBlock"
+        },
+        {
+          "$ref": "#/$defs/MessageBlock"
+        },
+        {
+          "$ref": "#/$defs/ReadBlock"
+        },
+        {
+          "$ref": "#/$defs/IncludeBlock"
+        },
+        {
+          "$ref": "#/$defs/ImportBlock"
+        },
+        {
+          "$ref": "#/$defs/ErrorBlock"
+        },
+        {
+          "$ref": "#/$defs/EmptyBlock"
+        },
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "CallBlock": {
+      "additionalProperties": false,
+      "description": "Calling a function.",
+      "properties": {
+        "description": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Documentation associated to the block.\n    "
+        },
+        "spec": {
+          "$ref": "#/$defs/PdlTypeType",
+          "default": null,
+          "description": "Type specification of the result of the block.\n    "
+        },
+        "defs": {
+          "additionalProperties": {
+            "$ref": "#/$defs/BlockType"
           },
-          "title": "Contribute",
-          "type": "array"
+          "default": {},
+          "description": "Set of definitions executed before the execution of the block.\n    ",
+          "title": "Defs",
+          "type": "object"
         },
-        "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
+        "def": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
+        },
+        "contribute": {
+          "$ref": "#/$defs/ContributeType",
+          "default": [
+            "result",
+            "context"
           ],
+          "description": "Indicate if the block contributes to the result and background context.\n    "
+        },
+        "parser": {
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
         "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
           "const": true,
@@ -1355,88 +503,8 @@
           "title": "Args"
         },
         "pdl__trace": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Pdl  Trace"
+          "$ref": "#/$defs/OptionalBlockType",
+          "default": null
         }
       },
       "required": [
@@ -1450,17 +518,9 @@
       "description": "Execute a piece of code.\n\nExample:\n```PDL\nlang: python\ncode: |\n    import random\n    # (In PDL, set `result` to the output you wish for your code block.)\n    result = random.randint(1, 20)\n```",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -1469,86 +529,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -1556,253 +537,71 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
         "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
           "const": true,
@@ -1829,88 +628,8 @@
           "type": "string"
         },
         "code": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "description": "Code to execute.\n    ",
-          "title": "Code"
+          "$ref": "#/$defs/BlockType",
+          "description": "Code to execute.\n    "
         }
       },
       "required": [
@@ -1929,6 +648,22 @@
       "title": "ContributeTarget",
       "type": "string"
     },
+    "ContributeType": {
+      "items": {
+        "anyOf": [
+          {
+            "$ref": "#/$defs/ContributeTarget"
+          },
+          {
+            "additionalProperties": {
+              "$ref": "#/$defs/ContributeValue"
+            },
+            "type": "object"
+          }
+        ]
+      },
+      "type": "array"
+    },
     "ContributeValue": {
       "additionalProperties": false,
       "description": "Contribution of a specific value instead of the default one.",
@@ -1960,17 +695,9 @@
       "description": "Arbitrary value, equivalent to JSON.\n\nExample. As part of a `defs` section, set `numbers` to the list `[1, 2, 3, 4]`:\n```PDL\ndefs:\n  numbers:\n    data: [1, 2, 3, 4]\n```\n\nExample.  Evaluate `${ TEST.answer }` in\n[Jinja](https://jinja.palletsprojects.com/en/stable/), passing\nthe result to a regex parser with capture groups.  Set\n`EXTRACTED_GROUND_TRUTH` to an object with attribute `answer`,\na string, containing the value of the capture group.\n```PDL\n- data: ${ TEST.answer }\n  parser:\n    regex: \"(.|\\n)*#### (?P([0-9])*)\\n*\"\n    spec:\n      answer: string\n  def: EXTRACTED_GROUND_TRUTH\n```",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -1979,86 +706,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -2066,253 +714,71 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
         "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
           "const": true,
@@ -2357,17 +823,9 @@
       "description": "Block without an action. It can contain definitions.",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -2376,86 +834,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -2463,253 +842,71 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
         "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
           "const": true,
@@ -2748,17 +945,9 @@
       "description": "Block representing an error generated at runtime.",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -2767,86 +956,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -2854,253 +964,71 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
         "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
           "const": true,
@@ -3120,88 +1048,8 @@
           "type": "string"
         },
         "program": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "description": "Block that raised the error.\n    ",
-          "title": "Program"
+          "$ref": "#/$defs/BlockType",
+          "description": "Block that raised the error.\n    "
         }
       },
       "required": [
@@ -3211,22 +1059,50 @@
       "title": "ErrorBlock",
       "type": "object"
     },
+    "ExpressionBool": {
+      "anyOf": [
+        {
+          "$ref": "#/$defs/LocalizedExpression_TypeVar_"
+        },
+        {
+          "type": "boolean"
+        },
+        {
+          "type": "string"
+        }
+      ]
+    },
+    "ExpressionInt": {
+      "anyOf": [
+        {
+          "$ref": "#/$defs/LocalizedExpression_TypeVar_"
+        },
+        {
+          "type": "integer"
+        },
+        {
+          "type": "string"
+        }
+      ]
+    },
+    "ExpressionStr": {
+      "anyOf": [
+        {
+          "$ref": "#/$defs/LocalizedExpression_TypeVar_"
+        },
+        {
+          "type": "string"
+        }
+      ]
+    },
     "FunctionBlock": {
       "additionalProperties": false,
       "description": "Function declaration.",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -3235,86 +1111,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -3322,253 +1119,71 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
         "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
           "const": true,
@@ -3598,88 +1213,8 @@
           "title": "Function"
         },
         "return": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "description": "Body of the function.\n    ",
-          "title": "Return"
+          "$ref": "#/$defs/BlockType",
+          "description": "Body of the function.\n    "
         },
         "signature": {
           "anyOf": [
@@ -3709,17 +1244,9 @@
       "description": "Get the value of a variable.\n\nThe GetBlock is deprecated.  Use DataBlock instead.",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -3728,86 +1255,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -3815,253 +1263,71 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
         "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
           "const": true,
@@ -4092,17 +1358,9 @@
       "description": "Call an LLM through the granite-io API.",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -4111,86 +1369,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -4198,513 +1377,439 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
+          "$ref": "#/$defs/OptionalParserType",
+          "default": null,
+          "description": "Parser to use to construct a value out of a string result."
+        },
+        "fallback": {
+          "$ref": "#/$defs/OptionalBlockType",
+          "default": null,
+          "description": "Block to execute in case of error.\n    "
+        },
+        "retry": {
+          "$ref": "#/$defs/OptionalInt",
+          "default": null,
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
+        },
+        "trace_error_on_retry": {
+          "$ref": "#/$defs/OptionalBoolOrStr",
+          "default": null,
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
+        },
+        "role": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
+        },
+        "pdl__context": {
+          "$ref": "#/$defs/OptionalModelInput",
+          "default": [],
+          "description": "Current context."
+        },
+        "pdl__id": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": "",
+          "description": "Unique identifier for this block."
+        },
+        "pdl__result": {
+          "$ref": "#/$defs/OptionalAny",
+          "default": null,
+          "description": "Result of the execution of the block."
+        },
+        "pdl__location": {
+          "$ref": "#/$defs/OptionalPdlLocationType",
+          "default": null
+        },
+        "pdl__timing": {
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
+        },
+        "pdl__is_leaf": {
+          "const": true,
+          "default": true,
+          "title": "Pdl  Is Leaf",
+          "type": "boolean"
+        },
+        "kind": {
+          "const": "model",
+          "default": "model",
+          "title": "Kind",
+          "type": "string"
+        },
+        "input": {
+          "$ref": "#/$defs/BlockType",
+          "default": "${ pdl_context }",
+          "description": "Messages to send to the model.\n    "
+        },
+        "modelResponse": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Variable where to store the raw response of the model.\n    "
+        },
+        "pdl__usage": {
+          "$ref": "#/$defs/OptionalPdlUsage",
+          "default": null,
+          "description": "Tokens consumed during model call\n    "
+        },
+        "pdl__model_input": {
+          "$ref": "#/$defs/OptionalModelInput",
+          "default": null
+        },
+        "platform": {
+          "const": "granite-io",
+          "default": "granite-io",
+          "description": "Optional field to ensure that the block is using granite-io.\n    ",
+          "title": "Platform",
+          "type": "string"
+        },
+        "processor": {
           "anyOf": [
             {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
+              "$ref": "#/$defs/GraniteioProcessor"
             },
             {
-              "$ref": "#/$defs/RegexParser"
+              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
             },
+            {},
             {
-              "type": "null"
+              "type": "string"
             }
           ],
-          "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "IO Processor configuration or object.\n    ",
+          "title": "Processor"
         },
-        "fallback": {
+        "parameters": {
           "anyOf": [
             {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
+              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
             },
             {
-              "type": "number"
+              "additionalProperties": true,
+              "type": "object"
             },
             {
               "type": "string"
             },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Parameters sent to the model.\n    ",
+          "title": "Parameters"
+        }
+      },
+      "required": [
+        "processor"
+      ],
+      "title": "GraniteioModelBlock",
+      "type": "object"
+    },
+    "GraniteioProcessor": {
+      "properties": {
+        "type": {
+          "$ref": "#/$defs/OptionalExpressionStr",
+          "default": null
         },
-        "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+        "model": {
+          "$ref": "#/$defs/OptionalExpressionStr",
+          "default": null
         },
-        "trace_error_on_retry": {
+        "backend": {
           "anyOf": [
             {
-              "type": "boolean"
+              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
             },
             {
               "type": "string"
             },
             {
-              "type": "null"
-            }
+              "additionalProperties": true,
+              "type": "object"
+            },
+            {}
           ],
+          "title": "Backend"
+        }
+      },
+      "required": [
+        "backend"
+      ],
+      "title": "GraniteioProcessor",
+      "type": "object"
+    },
+    "IfBlock": {
+      "additionalProperties": false,
+      "description": "Conditional control structure.\n\nExample:\n```PDL\ndefs:\n  answer:\n    read:\n    message: \"Enter a number? \"\nif: ${ (answer | int) == 42 }\nthen: You won!\n```",
+      "properties": {
+        "description": {
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Documentation associated to the block.\n    "
         },
-        "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
+        "spec": {
+          "$ref": "#/$defs/PdlTypeType",
+          "default": null,
+          "description": "Type specification of the result of the block.\n    "
+        },
+        "defs": {
+          "additionalProperties": {
+            "$ref": "#/$defs/BlockType"
+          },
+          "default": {},
+          "description": "Set of definitions executed before the execution of the block.\n    ",
+          "title": "Defs",
+          "type": "object"
+        },
+        "def": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
+        },
+        "contribute": {
+          "$ref": "#/$defs/ContributeType",
+          "default": [
+            "result",
+            "context"
           ],
+          "description": "Indicate if the block contributes to the result and background context.\n    "
+        },
+        "parser": {
+          "$ref": "#/$defs/OptionalParserType",
+          "default": null,
+          "description": "Parser to use to construct a value out of a string result."
+        },
+        "fallback": {
+          "$ref": "#/$defs/OptionalBlockType",
+          "default": null,
+          "description": "Block to execute in case of error.\n    "
+        },
+        "retry": {
+          "$ref": "#/$defs/OptionalInt",
+          "default": null,
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
+        },
+        "trace_error_on_retry": {
+          "$ref": "#/$defs/OptionalBoolOrStr",
+          "default": null,
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
+        },
+        "role": {
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
-          "const": true,
-          "default": true,
+          "const": false,
+          "default": false,
           "title": "Pdl  Is Leaf",
           "type": "boolean"
         },
+        "context": {
+          "$ref": "#/$defs/IndependentEnum",
+          "default": "dependent"
+        },
         "kind": {
-          "const": "model",
-          "default": "model",
+          "const": "if",
+          "default": "if",
           "title": "Kind",
           "type": "string"
         },
-        "input": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": "${ pdl_context }",
-          "description": "Messages to send to the model.\n    ",
-          "title": "Input"
+        "if": {
+          "$ref": "#/$defs/ExpressionBool",
+          "description": "Condition.\n    "
         },
-        "modelResponse": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Variable where to store the raw response of the model.\n    ",
-          "title": "Modelresponse"
+        "then": {
+          "$ref": "#/$defs/BlockType",
+          "description": "Branch to execute if the condition is true.\n    "
         },
-        "pdl__usage": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlUsage"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Tokens consumed during model call\n    "
-        },
-        "pdl__model_input": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Pdl  Model Input"
-        },
-        "platform": {
-          "const": "granite-io",
-          "default": "granite-io",
-          "description": "Optional field to ensure that the block is using granite-io.\n    ",
-          "title": "Platform",
-          "type": "string"
-        },
-        "processor": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/GraniteioProcessor"
-            },
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {},
-            {
-              "type": "string"
-            }
-          ],
-          "description": "IO Processor configuration or object.\n    ",
-          "title": "Processor"
-        },
-        "parameters": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "additionalProperties": true,
-              "type": "object"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "else": {
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Parameters sent to the model.\n    ",
-          "title": "Parameters"
+          "description": "Branch to execute if the condition is false.\n    "
         }
       },
       "required": [
-        "processor"
+        "if",
+        "then"
       ],
-      "title": "GraniteioModelBlock",
+      "title": "IfBlock",
       "type": "object"
     },
-    "GraniteioProcessor": {
+    "ImportBlock": {
+      "additionalProperties": false,
+      "description": "Import a PDL file.",
       "properties": {
-        "type": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "description": {
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "title": "Type"
+          "description": "Documentation associated to the block.\n    "
         },
-        "model": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "spec": {
+          "$ref": "#/$defs/PdlTypeType",
           "default": null,
-          "title": "Model"
+          "description": "Type specification of the result of the block.\n    "
         },
-        "backend": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "additionalProperties": true,
-              "type": "object"
-            },
-            {}
+        "defs": {
+          "additionalProperties": {
+            "$ref": "#/$defs/BlockType"
+          },
+          "default": {},
+          "description": "Set of definitions executed before the execution of the block.\n    ",
+          "title": "Defs",
+          "type": "object"
+        },
+        "def": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
+        },
+        "contribute": {
+          "$ref": "#/$defs/ContributeType",
+          "default": [
+            "result",
+            "context"
           ],
-          "title": "Backend"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
+        },
+        "parser": {
+          "$ref": "#/$defs/OptionalParserType",
+          "default": null,
+          "description": "Parser to use to construct a value out of a string result."
+        },
+        "fallback": {
+          "$ref": "#/$defs/OptionalBlockType",
+          "default": null,
+          "description": "Block to execute in case of error.\n    "
+        },
+        "retry": {
+          "$ref": "#/$defs/OptionalInt",
+          "default": null,
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
+        },
+        "trace_error_on_retry": {
+          "$ref": "#/$defs/OptionalBoolOrStr",
+          "default": null,
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
+        },
+        "role": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
+        },
+        "pdl__context": {
+          "$ref": "#/$defs/OptionalModelInput",
+          "default": [],
+          "description": "Current context."
+        },
+        "pdl__id": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": "",
+          "description": "Unique identifier for this block."
+        },
+        "pdl__result": {
+          "$ref": "#/$defs/OptionalAny",
+          "default": null,
+          "description": "Result of the execution of the block."
+        },
+        "pdl__location": {
+          "$ref": "#/$defs/OptionalPdlLocationType",
+          "default": null
+        },
+        "pdl__timing": {
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
+        },
+        "pdl__is_leaf": {
+          "const": true,
+          "default": true,
+          "title": "Pdl  Is Leaf",
+          "type": "boolean"
+        },
+        "kind": {
+          "const": "import",
+          "default": "import",
+          "title": "Kind",
+          "type": "string"
+        },
+        "import": {
+          "description": "Name of the file to import.\n    ",
+          "title": "Import",
+          "type": "string"
+        },
+        "pdl__trace": {
+          "$ref": "#/$defs/OptionalBlockType",
+          "default": null
         }
       },
       "required": [
-        "backend"
+        "import"
       ],
-      "title": "GraniteioProcessor",
+      "title": "ImportBlock",
       "type": "object"
     },
-    "IfBlock": {
+    "IncludeBlock": {
       "additionalProperties": false,
-      "description": "Conditional control structure.\n\nExample:\n```PDL\ndefs:\n  answer:\n    read:\n    message: \"Enter a number? \"\nif: ${ (answer | int) == 42 }\nthen: You won!\n```",
+      "description": "Include a PDL file.",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -4713,86 +1818,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -4800,253 +1826,71 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
         "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
           "const": false,
@@ -5059,219 +1903,188 @@
           "default": "dependent"
         },
         "kind": {
-          "const": "if",
-          "default": "if",
+          "const": "include",
+          "default": "include",
           "title": "Kind",
           "type": "string"
         },
-        "if": {
+        "include": {
+          "description": "Name of the file to include.\n    ",
+          "title": "Include",
+          "type": "string"
+        },
+        "pdl__trace": {
+          "$ref": "#/$defs/OptionalBlockType",
+          "default": null
+        }
+      },
+      "required": [
+        "include"
+      ],
+      "title": "IncludeBlock",
+      "type": "object"
+    },
+    "IndependentEnum": {
+      "enum": [
+        "independent",
+        "dependent"
+      ],
+      "title": "IndependentEnum",
+      "type": "string"
+    },
+    "JoinArray": {
+      "additionalProperties": false,
+      "description": "Join loop iterations as an array.",
+      "properties": {
+        "as": {
+          "const": "array",
+          "description": "Return the result of each iteration as an array.\n    ",
+          "title": "As",
+          "type": "string"
+        }
+      },
+      "required": [
+        "as"
+      ],
+      "title": "JoinArray",
+      "type": "object"
+    },
+    "JoinLastOf": {
+      "additionalProperties": false,
+      "description": "Join loop iterations as the value of the last iteration.",
+      "properties": {
+        "as": {
+          "const": "lastOf",
+          "description": "Return the result of the last iteration.\n    ",
+          "title": "As",
+          "type": "string"
+        }
+      },
+      "required": [
+        "as"
+      ],
+      "title": "JoinLastOf",
+      "type": "object"
+    },
+    "JoinObject": {
+      "additionalProperties": false,
+      "description": "Join loop iterations as an object.",
+      "properties": {
+        "as": {
+          "const": "object",
+          "description": "Return the union of the objects created at each iteration.\n    ",
+          "title": "As",
+          "type": "string"
+        }
+      },
+      "required": [
+        "as"
+      ],
+      "title": "JoinObject",
+      "type": "object"
+    },
+    "JoinReduce": {
+      "additionalProperties": false,
+      "description": "Join loop iterations as the value of the last iteration.",
+      "properties": {
+        "as": {
+          "const": "reduce",
+          "default": "reduce",
+          "title": "As",
+          "type": "string"
+        },
+        "reduce": {
           "anyOf": [
             {
               "$ref": "#/$defs/LocalizedExpression_TypeVar_"
             },
-            {
-              "type": "boolean"
-            },
             {
               "type": "string"
             }
           ],
-          "description": "Condition.\n    ",
-          "title": "If"
+          "description": "Function used to combine the results.",
+          "title": "Reduce"
+        }
+      },
+      "required": [
+        "reduce"
+      ],
+      "title": "JoinReduce",
+      "type": "object"
+    },
+    "JoinText": {
+      "additionalProperties": false,
+      "description": "Join loop iterations as a string.",
+      "properties": {
+        "as": {
+          "const": "text",
+          "default": "text",
+          "description": "String concatenation of the result of each iteration.\n    ",
+          "title": "As",
+          "type": "string"
         },
-        "then": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "description": "Branch to execute if the condition is true.\n    ",
-          "title": "Then"
+        "with": {
+          "default": "",
+          "description": "String used to concatenate each iteration of the loop.\n    ",
+          "title": "With",
+          "type": "string"
+        }
+      },
+      "title": "JoinText",
+      "type": "object"
+    },
+    "JoinType": {
+      "anyOf": [
+        {
+          "$ref": "#/$defs/JoinText"
         },
-        "else": {
+        {
+          "$ref": "#/$defs/JoinArray"
+        },
+        {
+          "$ref": "#/$defs/JoinObject"
+        },
+        {
+          "$ref": "#/$defs/JoinLastOf"
+        },
+        {
+          "$ref": "#/$defs/JoinReduce"
+        }
+      ]
+    },
+    "JsonSchemaTypePdlType": {
+      "additionalProperties": true,
+      "description": "Json Schema with a type field.",
+      "properties": {
+        "type": {
           "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
             {
               "type": "string"
             },
             {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
+              "items": {
+                "type": "string"
+              },
+              "type": "array"
             }
           ],
-          "default": null,
-          "description": "Branch to execute if the condition is false.\n    ",
-          "title": "Else"
+          "title": "Type"
         }
       },
       "required": [
-        "if",
-        "then"
+        "type"
       ],
-      "title": "IfBlock",
+      "title": "JsonSchemaTypePdlType",
       "type": "object"
     },
-    "ImportBlock": {
+    "LastOfBlock": {
       "additionalProperties": false,
-      "description": "Import a PDL file.",
+      "description": "Return the value of the last block if the list of blocks.",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -5280,86 +2093,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -5367,166 +2101,246 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
+          "$ref": "#/$defs/OptionalInt",
+          "default": null,
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
+        },
+        "trace_error_on_retry": {
+          "$ref": "#/$defs/OptionalBoolOrStr",
+          "default": null,
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
+        },
+        "role": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
+        },
+        "pdl__context": {
+          "$ref": "#/$defs/OptionalModelInput",
+          "default": [],
+          "description": "Current context."
+        },
+        "pdl__id": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": "",
+          "description": "Unique identifier for this block."
+        },
+        "pdl__result": {
+          "$ref": "#/$defs/OptionalAny",
+          "default": null,
+          "description": "Result of the execution of the block."
+        },
+        "pdl__location": {
+          "$ref": "#/$defs/OptionalPdlLocationType",
+          "default": null
+        },
+        "pdl__timing": {
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
+        },
+        "pdl__is_leaf": {
+          "const": false,
+          "default": false,
+          "title": "Pdl  Is Leaf",
+          "type": "boolean"
+        },
+        "context": {
+          "$ref": "#/$defs/IndependentEnum",
+          "default": "dependent"
+        },
+        "kind": {
+          "const": "lastOf",
+          "default": "lastOf",
+          "title": "Kind",
+          "type": "string"
+        },
+        "lastOf": {
+          "description": "Sequence of blocks to execute.",
+          "items": {
+            "$ref": "#/$defs/BlockType"
+          },
+          "title": "Lastof",
+          "type": "array"
+        }
+      },
+      "required": [
+        "lastOf"
+      ],
+      "title": "LastOfBlock",
+      "type": "object"
+    },
+    "LitellmModelBlock": {
+      "additionalProperties": false,
+      "description": "Call an LLM through [the LiteLLM API](https://docs.litellm.ai/).\n\nExample:\n```PDL\nmodel: ollama/granite-code:8b\nparameters:\n  stop: ['!']\n```",
+      "properties": {
+        "description": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Documentation associated to the block.\n    "
+        },
+        "spec": {
+          "$ref": "#/$defs/PdlTypeType",
+          "default": null,
+          "description": "Type specification of the result of the block.\n    "
+        },
+        "defs": {
+          "additionalProperties": {
+            "$ref": "#/$defs/BlockType"
+          },
+          "default": {},
+          "description": "Set of definitions executed before the execution of the block.\n    ",
+          "title": "Defs",
+          "type": "object"
+        },
+        "def": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
+        },
+        "contribute": {
+          "$ref": "#/$defs/ContributeType",
+          "default": [
+            "result",
+            "context"
           ],
+          "description": "Indicate if the block contributes to the result and background context.\n    "
+        },
+        "parser": {
+          "$ref": "#/$defs/OptionalParserType",
+          "default": null,
+          "description": "Parser to use to construct a value out of a string result."
+        },
+        "fallback": {
+          "$ref": "#/$defs/OptionalBlockType",
+          "default": null,
+          "description": "Block to execute in case of error.\n    "
+        },
+        "retry": {
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
+          "$ref": "#/$defs/OptionalBoolOrStr",
+          "default": null,
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
+        },
+        "role": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
+        },
+        "pdl__context": {
+          "$ref": "#/$defs/OptionalModelInput",
+          "default": [],
+          "description": "Current context."
+        },
+        "pdl__id": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": "",
+          "description": "Unique identifier for this block."
+        },
+        "pdl__result": {
+          "$ref": "#/$defs/OptionalAny",
+          "default": null,
+          "description": "Result of the execution of the block."
+        },
+        "pdl__location": {
+          "$ref": "#/$defs/OptionalPdlLocationType",
+          "default": null
+        },
+        "pdl__timing": {
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
+        },
+        "pdl__is_leaf": {
+          "const": true,
+          "default": true,
+          "title": "Pdl  Is Leaf",
+          "type": "boolean"
+        },
+        "kind": {
+          "const": "model",
+          "default": "model",
+          "title": "Kind",
+          "type": "string"
+        },
+        "input": {
+          "$ref": "#/$defs/BlockType",
+          "default": "${ pdl_context }",
+          "description": "Messages to send to the model.\n    "
+        },
+        "modelResponse": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Variable where to store the raw response of the model.\n    "
+        },
+        "pdl__usage": {
+          "$ref": "#/$defs/OptionalPdlUsage",
+          "default": null,
+          "description": "Tokens consumed during model call\n    "
+        },
+        "pdl__model_input": {
+          "$ref": "#/$defs/OptionalModelInput",
+          "default": null
+        },
+        "platform": {
+          "const": "litellm",
+          "default": "litellm",
+          "description": "Optional field to ensure that the block is using LiteLLM.\n    ",
+          "title": "Platform",
+          "type": "string"
+        },
+        "model": {
+          "$ref": "#/$defs/ExpressionStr",
+          "description": "Name of the model following the LiteLLM convention.\n    "
+        },
+        "parameters": {
           "anyOf": [
             {
-              "type": "boolean"
+              "$ref": "#/$defs/LitellmParameters"
+            },
+            {
+              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
+            },
+            {
+              "additionalProperties": true,
+              "type": "object"
             },
             {
               "type": "string"
@@ -5536,11 +2350,25 @@
             }
           ],
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
-        },
-        "role": {
+          "description": "Parameters to send to the model.\n    ",
+          "title": "Parameters"
+        }
+      },
+      "required": [
+        "model"
+      ],
+      "title": "LitellmModelBlock",
+      "type": "object"
+    },
+    "LitellmParameters": {
+      "additionalProperties": true,
+      "description": "Parameters passed to LiteLLM. More details at [https://docs.litellm.ai/docs/completion/input](https://docs.litellm.ai/docs/completion/input).\n\nNote that not all models and platforms accept all parameters.",
+      "properties": {
+        "timeout": {
           "anyOf": [
+            {
+              "type": "number"
+            },
             {
               "type": "string"
             },
@@ -5549,28 +2377,28 @@
             }
           ],
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "title": "Timeout"
         },
-        "pdl__context": {
+        "temperature": {
           "anyOf": [
             {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
+              "type": "number"
+            },
+            {
+              "type": "string"
             },
             {
               "type": "null"
             }
           ],
-          "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "default": null,
+          "title": "Temperature"
         },
-        "pdl__id": {
+        "top_p": {
           "anyOf": [
+            {
+              "type": "number"
+            },
             {
               "type": "string"
             },
@@ -5578,68 +2406,59 @@
               "type": "null"
             }
           ],
-          "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "default": null,
+          "title": "Top P"
         },
-        "pdl__result": {
+        "n": {
           "anyOf": [
-            {},
+            {
+              "type": "integer"
+            },
+            {
+              "type": "string"
+            },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "title": "N"
         },
-        "pdl__location": {
+        "stop": {
           "anyOf": [
             {
-              "$ref": "#/$defs/PdlLocationType"
+              "type": "string"
+            },
+            {
+              "items": {
+                "type": "string"
+              },
+              "type": "array"
             },
             {
               "type": "null"
             }
           ],
-          "default": null
+          "default": null,
+          "title": "Stop"
         },
-        "pdl__timing": {
+        "max_tokens": {
           "anyOf": [
             {
-              "$ref": "#/$defs/PdlTiming"
+              "type": "integer"
+            },
+            {
+              "type": "string"
             },
             {
               "type": "null"
             }
           ],
-          "default": null
-        },
-        "pdl__is_leaf": {
-          "const": true,
-          "default": true,
-          "title": "Pdl  Is Leaf",
-          "type": "boolean"
-        },
-        "kind": {
-          "const": "import",
-          "default": "import",
-          "title": "Kind",
-          "type": "string"
-        },
-        "import": {
-          "description": "Name of the file to import.\n    ",
-          "title": "Import",
-          "type": "string"
+          "default": null,
+          "title": "Max Tokens"
         },
-        "pdl__trace": {
+        "presence_penalty": {
           "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
             {
               "type": "number"
             },
@@ -5647,88 +2466,33 @@
               "type": "string"
             },
             {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
+              "type": "null"
+            }
+          ],
+          "default": null,
+          "title": "Presence Penalty"
+        },
+        "frequency_penalty": {
+          "anyOf": [
             {
-              "$ref": "#/$defs/ErrorBlock"
+              "type": "number"
             },
             {
-              "$ref": "#/$defs/EmptyBlock"
+              "type": "string"
             },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "title": "Pdl  Trace"
-        }
-      },
-      "required": [
-        "import"
-      ],
-      "title": "ImportBlock",
-      "type": "object"
-    },
-    "IncludeBlock": {
-      "additionalProperties": false,
-      "description": "Include a PDL file.",
-      "properties": {
-        "description": {
+          "title": "Frequency Penalty"
+        },
+        "logit_bias": {
           "anyOf": [
+            {
+              "additionalProperties": true,
+              "type": "object"
+            },
             {
               "type": "string"
             },
@@ -5737,103 +2501,9 @@
             }
           ],
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
-        },
-        "spec": {
-          "$ref": "#/$defs/PdlTypeType",
-          "default": null,
-          "description": "Type specification of the result of the block.\n    "
-        },
-        "defs": {
-          "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
-          },
-          "default": {},
-          "description": "Set of definitions executed before the execution of the block.\n    ",
-          "title": "Defs",
-          "type": "object"
+          "title": "Logit Bias"
         },
-        "def": {
+        "user": {
           "anyOf": [
             {
               "type": "string"
@@ -5843,154 +2513,102 @@
             }
           ],
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
-        },
-        "contribute": {
-          "default": [
-            "result",
-            "context"
-          ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "title": "User"
         },
-        "parser": {
+        "response_format": {
           "anyOf": [
             {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
+              "additionalProperties": true,
+              "type": "object"
             },
             {
-              "$ref": "#/$defs/RegexParser"
+              "type": "string"
             },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "title": "Response Format"
         },
-        "fallback": {
+        "seed": {
           "anyOf": [
-            {
-              "type": "boolean"
-            },
             {
               "type": "integer"
             },
-            {
-              "type": "number"
-            },
             {
               "type": "string"
             },
             {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
+              "type": "null"
+            }
+          ],
+          "default": null,
+          "title": "Seed"
+        },
+        "tools": {
+          "anyOf": [
             {
-              "$ref": "#/$defs/ArrayBlock"
+              "items": {},
+              "type": "array"
             },
             {
-              "$ref": "#/$defs/ObjectBlock"
+              "type": "string"
             },
             {
-              "$ref": "#/$defs/MessageBlock"
-            },
+              "type": "null"
+            }
+          ],
+          "default": null,
+          "title": "Tools"
+        },
+        "tool_choice": {
+          "anyOf": [
             {
-              "$ref": "#/$defs/ReadBlock"
+              "type": "string"
             },
             {
-              "$ref": "#/$defs/IncludeBlock"
+              "additionalProperties": true,
+              "type": "object"
             },
             {
-              "$ref": "#/$defs/ImportBlock"
-            },
+              "type": "null"
+            }
+          ],
+          "default": null,
+          "title": "Tool Choice"
+        },
+        "logprobs": {
+          "anyOf": [
             {
-              "$ref": "#/$defs/ErrorBlock"
+              "type": "boolean"
             },
             {
-              "$ref": "#/$defs/EmptyBlock"
+              "type": "string"
             },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "title": "Logprobs"
         },
-        "retry": {
+        "top_logprobs": {
           "anyOf": [
             {
               "type": "integer"
             },
+            {
+              "type": "string"
+            },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "title": "Top Logprobs"
         },
-        "trace_error_on_retry": {
+        "parallel_tool_calls": {
           "anyOf": [
             {
               "type": "boolean"
@@ -6003,11 +2621,14 @@
             }
           ],
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "title": "Parallel Tool Calls"
         },
-        "role": {
+        "extra_headers": {
           "anyOf": [
+            {
+              "additionalProperties": true,
+              "type": "object"
+            },
             {
               "type": "string"
             },
@@ -6016,27 +2637,25 @@
             }
           ],
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "title": "Extra Headers"
         },
-        "pdl__context": {
+        "functions": {
           "anyOf": [
             {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
+              "items": {},
               "type": "array"
             },
+            {
+              "type": "string"
+            },
             {
               "type": "null"
             }
           ],
-          "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "default": null,
+          "title": "Functions"
         },
-        "pdl__id": {
+        "function_call": {
           "anyOf": [
             {
               "type": "string"
@@ -6045,276 +2664,139 @@
               "type": "null"
             }
           ],
-          "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "default": null,
+          "title": "Function Call"
         },
-        "pdl__result": {
+        "base_url": {
           "anyOf": [
-            {},
+            {
+              "type": "string"
+            },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "title": "Base Url"
         },
-        "pdl__location": {
+        "api_version": {
           "anyOf": [
             {
-              "$ref": "#/$defs/PdlLocationType"
+              "type": "string"
             },
             {
               "type": "null"
             }
           ],
-          "default": null
+          "default": null,
+          "title": "Api Version"
         },
-        "pdl__timing": {
+        "api_key": {
           "anyOf": [
             {
-              "$ref": "#/$defs/PdlTiming"
+              "type": "string"
             },
             {
               "type": "null"
             }
           ],
-          "default": null
+          "default": null,
+          "title": "Api Key"
         },
-        "pdl__is_leaf": {
-          "const": false,
-          "default": false,
-          "title": "Pdl  Is Leaf",
-          "type": "boolean"
-        },
-        "context": {
-          "$ref": "#/$defs/IndependentEnum",
-          "default": "dependent"
-        },
-        "kind": {
-          "const": "include",
-          "default": "include",
-          "title": "Kind",
-          "type": "string"
-        },
-        "include": {
-          "description": "Name of the file to include.\n    ",
-          "title": "Include",
-          "type": "string"
-        },
-        "pdl__trace": {
+        "model_list": {
           "anyOf": [
             {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
+              "items": {},
+              "type": "array"
             },
             {
               "type": "string"
             },
             {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
+              "type": "null"
+            }
+          ],
+          "default": null,
+          "title": "Model List"
+        },
+        "mock_response": {
+          "anyOf": [
             {
-              "$ref": "#/$defs/MessageBlock"
+              "type": "string"
             },
             {
-              "$ref": "#/$defs/ReadBlock"
-            },
+              "type": "null"
+            }
+          ],
+          "default": null,
+          "title": "Mock Response"
+        },
+        "custom_llm_provider": {
+          "anyOf": [
             {
-              "$ref": "#/$defs/IncludeBlock"
+              "type": "string"
             },
             {
-              "$ref": "#/$defs/ImportBlock"
-            },
+              "type": "null"
+            }
+          ],
+          "default": null,
+          "title": "Custom Llm Provider"
+        },
+        "max_retries": {
+          "anyOf": [
             {
-              "$ref": "#/$defs/ErrorBlock"
+              "type": "integer"
             },
             {
-              "$ref": "#/$defs/EmptyBlock"
+              "type": "string"
             },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "title": "Pdl  Trace"
-        }
-      },
-      "required": [
-        "include"
-      ],
-      "title": "IncludeBlock",
-      "type": "object"
-    },
-    "IndependentEnum": {
-      "enum": [
-        "independent",
-        "dependent"
-      ],
-      "title": "IndependentEnum",
-      "type": "string"
-    },
-    "JoinArray": {
-      "additionalProperties": false,
-      "description": "Join loop iterations as an array.",
-      "properties": {
-        "as": {
-          "const": "array",
-          "description": "Return the result of each iteration as an array.\n    ",
-          "title": "As",
-          "type": "string"
-        }
-      },
-      "required": [
-        "as"
-      ],
-      "title": "JoinArray",
-      "type": "object"
-    },
-    "JoinLastOf": {
-      "additionalProperties": false,
-      "description": "Join loop iterations as the value of the last iteration.",
-      "properties": {
-        "as": {
-          "const": "lastOf",
-          "description": "Return the result of the last iteration.\n    ",
-          "title": "As",
-          "type": "string"
-        }
-      },
-      "required": [
-        "as"
-      ],
-      "title": "JoinLastOf",
-      "type": "object"
-    },
-    "JoinObject": {
-      "additionalProperties": false,
-      "description": "Join loop iterations as an object.",
-      "properties": {
-        "as": {
-          "const": "object",
-          "description": "Return the union of the objects created at each iteration.\n    ",
-          "title": "As",
-          "type": "string"
+          "title": "Max Retries"
         }
       },
-      "required": [
-        "as"
-      ],
-      "title": "JoinObject",
+      "title": "LitellmParameters",
       "type": "object"
     },
-    "JoinText": {
+    "LocalizedExpression_TypeVar_": {
       "additionalProperties": false,
-      "description": "Join loop iterations as a string.",
       "properties": {
-        "as": {
-          "const": "text",
-          "default": "text",
-          "description": "String concatenation of the result of each iteration.\n    ",
-          "title": "As",
-          "type": "string"
+        "pdl__expr": {
+          "title": "Pdl  Expr"
         },
-        "with": {
-          "default": "",
-          "description": "String used to concatenate each iteration of the loop.\n    ",
-          "title": "With",
-          "type": "string"
-        }
-      },
-      "title": "JoinText",
-      "type": "object"
-    },
-    "JsonSchemaTypePdlType": {
-      "additionalProperties": true,
-      "description": "Json Schema with a type field.",
-      "properties": {
-        "type": {
+        "pdl__result": {
           "anyOf": [
+            {},
             {
-              "type": "string"
-            },
-            {
-              "items": {
-                "type": "string"
-              },
-              "type": "array"
+              "type": "null"
             }
           ],
-          "title": "Type"
+          "default": null,
+          "title": "Pdl  Result"
+        },
+        "pdl__location": {
+          "$ref": "#/$defs/OptionalPdlLocationType",
+          "default": null
         }
       },
       "required": [
-        "type"
+        "pdl__expr"
       ],
-      "title": "JsonSchemaTypePdlType",
+      "title": "LocalizedExpression",
       "type": "object"
     },
-    "LastOfBlock": {
+    "MapBlock": {
       "additionalProperties": false,
-      "description": "Return the value of the last block if the list of blocks.",
+      "description": "Independent executions of  a block.\nRepeat the execution of a block starting from the initial scope\nand `pdl_context`.\n\nFor loop example:\n```PDL\nfor:\n    number: [1, 2, 3, 4]\n    name: [\"Bob\", \"Carol\", \"David\", \"Ernest\"]\nmap:\n    \"${ name }'s number is ${ number }\\n\"\n```\n\nBounded loop:\n```PDL\nindex: i\nmaxIterations: 5\nmap:\n    ${ i }\njoin:\n  as: array\n```",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -6323,86 +2805,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -6410,253 +2813,71 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
         "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
           "const": false,
@@ -6669,4459 +2890,1120 @@
           "default": "dependent"
         },
         "kind": {
-          "const": "lastOf",
-          "default": "lastOf",
+          "const": "map",
+          "default": "map",
           "title": "Kind",
           "type": "string"
         },
-        "lastOf": {
-          "description": "Sequence of blocks to execute.",
-          "items": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
-          },
-          "title": "Lastof",
-          "type": "array"
-        }
-      },
-      "required": [
-        "lastOf"
-      ],
-      "title": "LastOfBlock",
-      "type": "object"
-    },
-    "LitellmModelBlock": {
-      "additionalProperties": false,
-      "description": "Call an LLM through [the LiteLLM API](https://docs.litellm.ai/).\n\nExample:\n```PDL\nmodel: ollama/granite-code:8b\nparameters:\n  stop: ['!']\n```",
-      "properties": {
-        "description": {
+        "for": {
           "anyOf": [
             {
-              "type": "string"
+              "additionalProperties": {
+                "anyOf": [
+                  {
+                    "$ref": "#/$defs/LocalizedExpression_TypeVar_"
+                  },
+                  {
+                    "items": {},
+                    "type": "array"
+                  },
+                  {
+                    "type": "string"
+                  }
+                ]
+              },
+              "type": "object"
             },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Arrays to iterate over.\n    ",
+          "title": "For"
         },
-        "spec": {
-          "$ref": "#/$defs/PdlTypeType",
+        "index": {
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Type specification of the result of the block.\n    "
+          "description": "Name of the variable containing the loop iteration.\n    "
         },
-        "defs": {
-          "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+        "map": {
+          "$ref": "#/$defs/BlockType",
+          "description": "Body of the iterator.\n    "
+        },
+        "maxIterations": {
+          "$ref": "#/$defs/OptionalExpressionInt",
+          "default": null,
+          "description": "Maximal number of iterations to perform.\n    "
+        },
+        "join": {
+          "$ref": "#/$defs/JoinType",
+          "default": {
+            "as": "text",
+            "with": ""
           },
-          "default": {},
-          "description": "Set of definitions executed before the execution of the block.\n    ",
-          "title": "Defs",
-          "type": "object"
+          "description": "Define how to combine the result of each iteration.\n    "
         },
-        "def": {
+        "maxWorkers": {
+          "$ref": "#/$defs/OptionalInt",
+          "default": null,
+          "description": "Maximal number of workers to execute the map in parallel. Is it is set to `0`, the execution is sequential otherwise it is given as argument to the `ThreadPoolExecutor`.\n    "
+        },
+        "pdl__trace": {
           "anyOf": [
             {
-              "type": "string"
+              "items": {
+                "$ref": "#/$defs/BlockType"
+              },
+              "type": "array"
             },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
-        },
+          "title": "Pdl  Trace"
+        }
+      },
+      "required": [
+        "map"
+      ],
+      "title": "MapBlock",
+      "type": "object"
+    },
+    "MatchBlock": {
+      "additionalProperties": false,
+      "description": "Match control structure.\n\nExample:\n```PDL\ndefs:\n  answer:\n    read:\n    message: \"Enter a number? \"\nmatch: ${ (answer | int) }\nwith:\n- case: 42\n  then: You won!\n- case:\n    any:\n    def: x\n  if: ${ x > 42 }\n  then: Too high\n- then: Too low",
+      "properties": {
+        "description": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Documentation associated to the block.\n    "
+        },
+        "spec": {
+          "$ref": "#/$defs/PdlTypeType",
+          "default": null,
+          "description": "Type specification of the result of the block.\n    "
+        },
+        "defs": {
+          "additionalProperties": {
+            "$ref": "#/$defs/BlockType"
+          },
+          "default": {},
+          "description": "Set of definitions executed before the execution of the block.\n    ",
+          "title": "Defs",
+          "type": "object"
+        },
+        "def": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
+        },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Parser to use to construct a value out of a string result."
         },
         "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
+          "description": "Block to execute in case of error.\n    "
         },
         "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
         "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
         "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
+          "$ref": "#/$defs/OptionalModelInput",
+          "default": [],
+          "description": "Current context."
+        },
+        "pdl__id": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": "",
+          "description": "Unique identifier for this block."
+        },
+        "pdl__result": {
+          "$ref": "#/$defs/OptionalAny",
+          "default": null,
+          "description": "Result of the execution of the block."
+        },
+        "pdl__location": {
+          "$ref": "#/$defs/OptionalPdlLocationType",
+          "default": null
+        },
+        "pdl__timing": {
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
+        },
+        "pdl__is_leaf": {
+          "const": false,
+          "default": false,
+          "title": "Pdl  Is Leaf",
+          "type": "boolean"
+        },
+        "context": {
+          "$ref": "#/$defs/IndependentEnum",
+          "default": "dependent"
+        },
+        "kind": {
+          "const": "match",
+          "default": "match",
+          "title": "Kind",
+          "type": "string"
+        },
+        "match": {
           "anyOf": [
             {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
+              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
             },
+            {},
             {
-              "type": "null"
+              "type": "string"
             }
           ],
-          "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Matched expression.\n    ",
+          "title": "Match"
         },
-        "pdl__id": {
+        "with": {
+          "description": "List of cases to match.\n    ",
+          "items": {
+            "$ref": "#/$defs/MatchCase"
+          },
+          "title": "With",
+          "type": "array"
+        }
+      },
+      "required": [
+        "match",
+        "with"
+      ],
+      "title": "MatchBlock",
+      "type": "object"
+    },
+    "MatchCase": {
+      "additionalProperties": false,
+      "description": "Case of a match.",
+      "properties": {
+        "case": {
           "anyOf": [
             {
-              "type": "string"
+              "$ref": "#/$defs/PatternType"
             },
             {
               "type": "null"
             }
           ],
-          "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "default": null
         },
-        "pdl__result": {
+        "if": {
+          "$ref": "#/$defs/OptionalExpressionBool",
+          "default": null
+        },
+        "then": {
+          "$ref": "#/$defs/BlockType"
+        },
+        "pdl__case_result": {
           "anyOf": [
-            {},
+            {
+              "type": "boolean"
+            },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "title": "Pdl  Case Result"
         },
-        "pdl__location": {
+        "pdl__if_result": {
           "anyOf": [
             {
-              "$ref": "#/$defs/PdlLocationType"
+              "type": "boolean"
             },
             {
               "type": "null"
             }
           ],
-          "default": null
+          "default": null,
+          "title": "Pdl  If Result"
         },
-        "pdl__timing": {
+        "pdl__matched": {
           "anyOf": [
             {
-              "$ref": "#/$defs/PdlTiming"
+              "type": "boolean"
             },
             {
               "type": "null"
             }
           ],
-          "default": null
-        },
-        "pdl__is_leaf": {
-          "const": true,
-          "default": true,
-          "title": "Pdl  Is Leaf",
-          "type": "boolean"
+          "default": null,
+          "title": "Pdl  Matched"
+        }
+      },
+      "required": [
+        "then"
+      ],
+      "title": "MatchCase",
+      "type": "object"
+    },
+    "MessageBlock": {
+      "additionalProperties": false,
+      "description": "Create a message.",
+      "properties": {
+        "description": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Documentation associated to the block.\n    "
         },
-        "kind": {
-          "const": "model",
-          "default": "model",
-          "title": "Kind",
-          "type": "string"
+        "spec": {
+          "$ref": "#/$defs/PdlTypeType",
+          "default": null,
+          "description": "Type specification of the result of the block.\n    "
         },
-        "input": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": "${ pdl_context }",
-          "description": "Messages to send to the model.\n    ",
-          "title": "Input"
+        "defs": {
+          "additionalProperties": {
+            "$ref": "#/$defs/BlockType"
+          },
+          "default": {},
+          "description": "Set of definitions executed before the execution of the block.\n    ",
+          "title": "Defs",
+          "type": "object"
         },
-        "modelResponse": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "def": {
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Variable where to store the raw response of the model.\n    ",
-          "title": "Modelresponse"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
-        "pdl__usage": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlUsage"
-            },
-            {
-              "type": "null"
-            }
+        "contribute": {
+          "$ref": "#/$defs/ContributeType",
+          "default": [
+            "result",
+            "context"
           ],
+          "description": "Indicate if the block contributes to the result and background context.\n    "
+        },
+        "parser": {
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Tokens consumed during model call\n    "
+          "description": "Parser to use to construct a value out of a string result."
         },
-        "pdl__model_input": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "fallback": {
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "title": "Pdl  Model Input"
+          "description": "Block to execute in case of error.\n    "
         },
-        "platform": {
-          "const": "litellm",
-          "default": "litellm",
-          "description": "Optional field to ensure that the block is using LiteLLM.\n    ",
-          "title": "Platform",
+        "retry": {
+          "$ref": "#/$defs/OptionalInt",
+          "default": null,
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
+        },
+        "trace_error_on_retry": {
+          "$ref": "#/$defs/OptionalBoolOrStr",
+          "default": null,
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
+        },
+        "role": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
+        },
+        "pdl__context": {
+          "$ref": "#/$defs/OptionalModelInput",
+          "default": [],
+          "description": "Current context."
+        },
+        "pdl__id": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": "",
+          "description": "Unique identifier for this block."
+        },
+        "pdl__result": {
+          "$ref": "#/$defs/OptionalAny",
+          "default": null,
+          "description": "Result of the execution of the block."
+        },
+        "pdl__location": {
+          "$ref": "#/$defs/OptionalPdlLocationType",
+          "default": null
+        },
+        "pdl__timing": {
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
+        },
+        "pdl__is_leaf": {
+          "const": true,
+          "default": true,
+          "title": "Pdl  Is Leaf",
+          "type": "boolean"
+        },
+        "kind": {
+          "const": "message",
+          "default": "message",
+          "title": "Kind",
           "type": "string"
         },
-        "model": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "type": "string"
-            }
-          ],
-          "description": "Name of the model following the LiteLLM convention.\n    ",
-          "title": "Model"
+        "content": {
+          "$ref": "#/$defs/BlockType",
+          "description": "Content of the message."
         },
-        "parameters": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LitellmParameters"
-            },
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "additionalProperties": true,
-              "type": "object"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "name": {
+          "$ref": "#/$defs/OptionalExpressionStr",
           "default": null,
-          "description": "Parameters to send to the model.\n    ",
-          "title": "Parameters"
+          "description": "For example, the name of the tool that was invoked, for which this message is the tool response."
+        },
+        "tool_call_id": {
+          "$ref": "#/$defs/OptionalExpressionStr",
+          "default": null,
+          "description": "The id of the tool invocation for which this message is the tool response."
         }
       },
       "required": [
-        "model"
+        "content"
       ],
-      "title": "LitellmModelBlock",
+      "title": "MessageBlock",
       "type": "object"
     },
-    "LitellmParameters": {
-      "additionalProperties": true,
-      "description": "Parameters passed to LiteLLM. More details at [https://docs.litellm.ai/docs/completion/input](https://docs.litellm.ai/docs/completion/input).\n\nNote that not all models and platforms accept all parameters.",
+    "ModelInput": {
+      "items": {
+        "additionalProperties": true,
+        "type": "object"
+      },
+      "type": "array"
+    },
+    "ObjectBlock": {
+      "additionalProperties": false,
+      "description": "Return the object where the value of each field is defined by a block. If the body of the object is an array, the resulting object is the union of the objects computed by each element of the array.",
       "properties": {
-        "timeout": {
-          "anyOf": [
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "description": {
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "title": "Timeout"
+          "description": "Documentation associated to the block.\n    "
         },
-        "temperature": {
-          "anyOf": [
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "spec": {
+          "$ref": "#/$defs/PdlTypeType",
           "default": null,
-          "title": "Temperature"
+          "description": "Type specification of the result of the block.\n    "
         },
-        "top_p": {
-          "anyOf": [
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
+        "defs": {
+          "additionalProperties": {
+            "$ref": "#/$defs/BlockType"
+          },
+          "default": {},
+          "description": "Set of definitions executed before the execution of the block.\n    ",
+          "title": "Defs",
+          "type": "object"
+        },
+        "def": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
+        },
+        "contribute": {
+          "$ref": "#/$defs/ContributeType",
+          "default": [
+            "result",
+            "context"
           ],
+          "description": "Indicate if the block contributes to the result and background context.\n    "
+        },
+        "parser": {
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "title": "Top P"
+          "description": "Parser to use to construct a value out of a string result."
         },
-        "n": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "N"
-        },
-        "stop": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "items": {
-                "type": "string"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "fallback": {
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "title": "Stop"
+          "description": "Block to execute in case of error.\n    "
         },
-        "max_tokens": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "retry": {
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "title": "Max Tokens"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
-        "presence_penalty": {
-          "anyOf": [
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "trace_error_on_retry": {
+          "$ref": "#/$defs/OptionalBoolOrStr",
           "default": null,
-          "title": "Presence Penalty"
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
         },
-        "frequency_penalty": {
-          "anyOf": [
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Frequency Penalty"
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
-        "logit_bias": {
-          "anyOf": [
-            {
-              "additionalProperties": true,
-              "type": "object"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "role": {
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "title": "Logit Bias"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
-        "user": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "User"
+        "pdl__context": {
+          "$ref": "#/$defs/OptionalModelInput",
+          "default": [],
+          "description": "Current context."
         },
-        "response_format": {
-          "anyOf": [
-            {
-              "additionalProperties": true,
-              "type": "object"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Response Format"
+        "pdl__id": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": "",
+          "description": "Unique identifier for this block."
         },
-        "seed": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "pdl__result": {
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "title": "Seed"
+          "description": "Result of the execution of the block."
         },
-        "tools": {
-          "anyOf": [
-            {
-              "items": {},
-              "type": "array"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Tools"
+        "pdl__location": {
+          "$ref": "#/$defs/OptionalPdlLocationType",
+          "default": null
         },
-        "tool_choice": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "additionalProperties": true,
-              "type": "object"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "pdl__timing": {
+          "$ref": "#/$defs/OptionalPdlTiming",
           "default": null,
-          "title": "Tool Choice"
+          "description": "Execution timing information."
         },
-        "logprobs": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Logprobs"
+        "pdl__is_leaf": {
+          "const": false,
+          "default": false,
+          "title": "Pdl  Is Leaf",
+          "type": "boolean"
         },
-        "top_logprobs": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Top Logprobs"
+        "context": {
+          "$ref": "#/$defs/IndependentEnum",
+          "default": "dependent"
         },
-        "parallel_tool_calls": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Parallel Tool Calls"
+        "kind": {
+          "const": "object",
+          "default": "object",
+          "title": "Kind",
+          "type": "string"
         },
-        "extra_headers": {
+        "object": {
           "anyOf": [
             {
-              "additionalProperties": true,
+              "additionalProperties": {
+                "$ref": "#/$defs/BlockType"
+              },
               "type": "object"
             },
             {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Extra Headers"
-        },
-        "functions": {
-          "anyOf": [
-            {
-              "items": {},
+              "items": {
+                "$ref": "#/$defs/BlockType"
+              },
               "type": "array"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Functions"
-        },
-        "function_call": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
             }
           ],
-          "default": null,
-          "title": "Function Call"
-        },
-        "base_url": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Base Url"
-        },
-        "api_version": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Api Version"
-        },
-        "api_key": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Api Key"
-        },
-        "model_list": {
-          "anyOf": [
-            {
-              "items": {},
-              "type": "array"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Model List"
-        },
-        "mock_response": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Mock Response"
-        },
-        "custom_llm_provider": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Custom Llm Provider"
-        },
-        "max_retries": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Max Retries"
+          "title": "Object"
         }
       },
-      "title": "LitellmParameters",
+      "required": [
+        "object"
+      ],
+      "title": "ObjectBlock",
       "type": "object"
     },
-    "LocalizedExpression_TypeVar_": {
+    "ObjectPattern": {
       "additionalProperties": false,
+      "description": "Match an object.",
       "properties": {
-        "pdl__expr": {
-          "title": "Pdl  Expr"
-        },
-        "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Pdl  Result"
-        },
-        "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "def": {
+          "$ref": "#/$defs/OptionalStr",
           "default": null
+        },
+        "object": {
+          "additionalProperties": {
+            "$ref": "#/$defs/PatternType"
+          },
+          "title": "Object",
+          "type": "object"
         }
       },
       "required": [
-        "pdl__expr"
+        "object"
       ],
-      "title": "LocalizedExpression",
+      "title": "ObjectPattern",
       "type": "object"
     },
-    "MatchBlock": {
+    "ObjectPdlType": {
       "additionalProperties": false,
-      "description": "Match control structure.\n\nExample:\n```PDL\ndefs:\n  answer:\n    read:\n    message: \"Enter a number? \"\nmatch: ${ (answer | int) }\nwith:\n- case: 42\n  then: You won!\n- case:\n    any:\n    def: x\n  if: ${ x > 42 }\n  then: Too high\n- then: Too low",
+      "description": "Object type.",
       "properties": {
-        "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
-        },
-        "spec": {
-          "$ref": "#/$defs/PdlTypeType",
-          "default": null,
-          "description": "Type specification of the result of the block.\n    "
-        },
-        "defs": {
+        "object": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/PdlTypeType"
           },
-          "default": {},
-          "description": "Set of definitions executed before the execution of the block.\n    ",
-          "title": "Defs",
+          "title": "Object",
           "type": "object"
+        }
+      },
+      "required": [
+        "object"
+      ],
+      "title": "ObjectPdlType",
+      "type": "object"
+    },
+    "OptionalAny": {
+      "anyOf": [
+        {},
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "OptionalBlockType": {
+      "anyOf": [
+        {
+          "$ref": "#/$defs/BlockType"
         },
-        "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "OptionalBoolOrStr": {
+      "anyOf": [
+        {
+          "type": "boolean"
         },
-        "contribute": {
-          "default": [
-            "result",
-            "context"
-          ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+        {
+          "type": "string"
         },
-        "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
-        },
-        "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
-        },
-        "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
-        },
-        "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
-        },
-        "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
-        },
-        "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
-        },
-        "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
-        },
-        "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
-        },
-        "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
-        },
-        "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
-        },
-        "pdl__is_leaf": {
-          "const": false,
-          "default": false,
-          "title": "Pdl  Is Leaf",
-          "type": "boolean"
-        },
-        "context": {
-          "$ref": "#/$defs/IndependentEnum",
-          "default": "dependent"
-        },
-        "kind": {
-          "const": "match",
-          "default": "match",
-          "title": "Kind",
-          "type": "string"
-        },
-        "match": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {},
-            {
-              "type": "string"
-            }
-          ],
-          "description": "Matched expression.\n    ",
-          "title": "Match"
-        },
-        "with": {
-          "description": "List of cases to match.\n    ",
-          "items": {
-            "$ref": "#/$defs/MatchCase"
-          },
-          "title": "With",
-          "type": "array"
-        }
-      },
-      "required": [
-        "match",
-        "with"
-      ],
-      "title": "MatchBlock",
-      "type": "object"
-    },
-    "MatchCase": {
-      "additionalProperties": false,
-      "description": "Case of a match.",
-      "properties": {
-        "case": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/OrPattern"
-            },
-            {
-              "$ref": "#/$defs/ArrayPattern"
-            },
-            {
-              "$ref": "#/$defs/ObjectPattern"
-            },
-            {
-              "$ref": "#/$defs/AnyPattern"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Case"
-        },
-        "if": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "If"
-        },
-        "then": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "title": "Then"
-        },
-        "pdl__case_result": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Pdl  Case Result"
-        },
-        "pdl__if_result": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Pdl  If Result"
-        },
-        "pdl__matched": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Pdl  Matched"
-        }
-      },
-      "required": [
-        "then"
-      ],
-      "title": "MatchCase",
-      "type": "object"
-    },
-    "MessageBlock": {
-      "additionalProperties": false,
-      "description": "Create a message.",
-      "properties": {
-        "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
-        },
-        "spec": {
-          "$ref": "#/$defs/PdlTypeType",
-          "default": null,
-          "description": "Type specification of the result of the block.\n    "
-        },
-        "defs": {
-          "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
-          },
-          "default": {},
-          "description": "Set of definitions executed before the execution of the block.\n    ",
-          "title": "Defs",
-          "type": "object"
-        },
-        "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
-        },
-        "contribute": {
-          "default": [
-            "result",
-            "context"
-          ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
-        },
-        "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
-        },
-        "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
-        },
-        "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
-        },
-        "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
-        },
-        "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
-        },
-        "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
-        },
-        "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
-        },
-        "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
-        },
-        "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
-        },
-        "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
-        },
-        "pdl__is_leaf": {
-          "const": true,
-          "default": true,
-          "title": "Pdl  Is Leaf",
-          "type": "boolean"
-        },
-        "kind": {
-          "const": "message",
-          "default": "message",
-          "title": "Kind",
-          "type": "string"
-        },
-        "content": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "description": "Content of the message.",
-          "title": "Content"
-        },
-        "name": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "For example, the name of the tool that was invoked, for which this message is the tool response.",
-          "title": "Name"
-        },
-        "tool_call_id": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "The id of the tool invocation for which this message is the tool response.",
-          "title": "Tool Call Id"
-        }
-      },
-      "required": [
-        "content"
-      ],
-      "title": "MessageBlock",
-      "type": "object"
-    },
-    "ObjectBlock": {
-      "additionalProperties": false,
-      "description": "Return the object where the value of each field is defined by a block. If the body of the object is an array, the resulting object is the union of the objects computed by each element of the array.",
-      "properties": {
-        "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
-        },
-        "spec": {
-          "$ref": "#/$defs/PdlTypeType",
-          "default": null,
-          "description": "Type specification of the result of the block.\n    "
-        },
-        "defs": {
-          "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
-          },
-          "default": {},
-          "description": "Set of definitions executed before the execution of the block.\n    ",
-          "title": "Defs",
-          "type": "object"
-        },
-        "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
-        },
-        "contribute": {
-          "default": [
-            "result",
-            "context"
-          ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
-        },
-        "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
-        },
-        "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
-        },
-        "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
-        },
-        "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
-        },
-        "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
-        },
-        "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
-        },
-        "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
-        },
-        "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
-        },
-        "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
-        },
-        "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
-        },
-        "pdl__is_leaf": {
-          "const": false,
-          "default": false,
-          "title": "Pdl  Is Leaf",
-          "type": "boolean"
-        },
-        "context": {
-          "$ref": "#/$defs/IndependentEnum",
-          "default": "dependent"
-        },
-        "kind": {
-          "const": "object",
-          "default": "object",
-          "title": "Kind",
-          "type": "string"
-        },
-        "object": {
-          "anyOf": [
-            {
-              "additionalProperties": {
-                "anyOf": [
-                  {
-                    "type": "boolean"
-                  },
-                  {
-                    "type": "integer"
-                  },
-                  {
-                    "type": "number"
-                  },
-                  {
-                    "type": "string"
-                  },
-                  {
-                    "$ref": "#/$defs/FunctionBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/CallBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/LitellmModelBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/GraniteioModelBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/CodeBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ArgsBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/GetBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/DataBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/IfBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/MatchBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/RepeatBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/TextBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/LastOfBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ArrayBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ObjectBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/MessageBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ReadBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/IncludeBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ImportBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ErrorBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/EmptyBlock"
-                  },
-                  {
-                    "type": "null"
-                  }
-                ]
-              },
-              "type": "object"
-            },
-            {
-              "items": {
-                "anyOf": [
-                  {
-                    "type": "boolean"
-                  },
-                  {
-                    "type": "integer"
-                  },
-                  {
-                    "type": "number"
-                  },
-                  {
-                    "type": "string"
-                  },
-                  {
-                    "$ref": "#/$defs/FunctionBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/CallBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/LitellmModelBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/GraniteioModelBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/CodeBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ArgsBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/GetBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/DataBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/IfBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/MatchBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/RepeatBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/TextBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/LastOfBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ArrayBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ObjectBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/MessageBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ReadBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/IncludeBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ImportBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ErrorBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/EmptyBlock"
-                  },
-                  {
-                    "type": "null"
-                  }
-                ]
-              },
-              "type": "array"
-            }
-          ],
-          "title": "Object"
-        }
-      },
-      "required": [
-        "object"
-      ],
-      "title": "ObjectBlock",
-      "type": "object"
-    },
-    "ObjectPattern": {
-      "additionalProperties": false,
-      "description": "Match an object.",
-      "properties": {
-        "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Def"
-        },
-        "object": {
-          "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/OrPattern"
-              },
-              {
-                "$ref": "#/$defs/ArrayPattern"
-              },
-              {
-                "$ref": "#/$defs/ObjectPattern"
-              },
-              {
-                "$ref": "#/$defs/AnyPattern"
-              },
-              {
-                "type": "null"
-              }
-            ]
-          },
-          "title": "Object",
-          "type": "object"
-        }
-      },
-      "required": [
-        "object"
-      ],
-      "title": "ObjectPattern",
-      "type": "object"
-    },
-    "ObjectPdlType": {
-      "additionalProperties": false,
-      "description": "Object type.",
-      "properties": {
-        "object": {
-          "additionalProperties": {
-            "$ref": "#/$defs/PdlTypeType"
-          },
-          "title": "Object",
-          "type": "object"
-        }
-      },
-      "required": [
-        "object"
-      ],
-      "title": "ObjectPdlType",
-      "type": "object"
-    },
-    "OptionalPdlType": {
-      "additionalProperties": false,
-      "description": "Optional type.",
-      "properties": {
-        "optional": {
-          "$ref": "#/$defs/PdlTypeType"
-        }
-      },
-      "required": [
-        "optional"
-      ],
-      "title": "OptionalPdlType",
-      "type": "object"
-    },
-    "OrPattern": {
-      "additionalProperties": false,
-      "description": "Match any of the patterns.",
-      "properties": {
-        "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Def"
-        },
-        "anyOf": {
-          "items": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/OrPattern"
-              },
-              {
-                "$ref": "#/$defs/ArrayPattern"
-              },
-              {
-                "$ref": "#/$defs/ObjectPattern"
-              },
-              {
-                "$ref": "#/$defs/AnyPattern"
-              },
-              {
-                "type": "null"
-              }
-            ]
-          },
-          "title": "Anyof",
-          "type": "array"
-        }
-      },
-      "required": [
-        "anyOf"
-      ],
-      "title": "OrPattern",
-      "type": "object"
-    },
-    "PdlBlock": {
-      "anyOf": [
-        {
-          "type": "boolean"
-        },
-        {
-          "type": "integer"
-        },
-        {
-          "type": "number"
-        },
-        {
-          "type": "string"
-        },
-        {
-          "$ref": "#/$defs/FunctionBlock"
-        },
-        {
-          "$ref": "#/$defs/CallBlock"
-        },
-        {
-          "$ref": "#/$defs/LitellmModelBlock"
-        },
-        {
-          "$ref": "#/$defs/GraniteioModelBlock"
-        },
-        {
-          "$ref": "#/$defs/CodeBlock"
-        },
-        {
-          "$ref": "#/$defs/ArgsBlock"
-        },
-        {
-          "$ref": "#/$defs/GetBlock"
-        },
-        {
-          "$ref": "#/$defs/DataBlock"
-        },
-        {
-          "$ref": "#/$defs/IfBlock"
-        },
-        {
-          "$ref": "#/$defs/MatchBlock"
-        },
-        {
-          "$ref": "#/$defs/RepeatBlock"
-        },
-        {
-          "$ref": "#/$defs/TextBlock"
-        },
-        {
-          "$ref": "#/$defs/LastOfBlock"
-        },
-        {
-          "$ref": "#/$defs/ArrayBlock"
-        },
-        {
-          "$ref": "#/$defs/ObjectBlock"
-        },
-        {
-          "$ref": "#/$defs/MessageBlock"
-        },
-        {
-          "$ref": "#/$defs/ReadBlock"
-        },
-        {
-          "$ref": "#/$defs/IncludeBlock"
-        },
-        {
-          "$ref": "#/$defs/ImportBlock"
-        },
-        {
-          "$ref": "#/$defs/ErrorBlock"
-        },
-        {
-          "$ref": "#/$defs/EmptyBlock"
-        },
-        {
-          "type": "null"
-        }
-      ],
-      "title": "PdlBlock"
-    },
-    "PdlLocationType": {
-      "additionalProperties": false,
-      "description": "Internal data structure to keep track of the source location information.",
-      "properties": {
-        "path": {
-          "items": {
-            "type": "string"
-          },
-          "title": "Path",
-          "type": "array"
-        },
-        "file": {
-          "title": "File",
-          "type": "string"
-        },
-        "table": {
-          "additionalProperties": {
-            "type": "integer"
-          },
-          "title": "Table",
-          "type": "object"
-        }
-      },
-      "required": [
-        "path",
-        "file",
-        "table"
-      ],
-      "title": "PdlLocationType",
-      "type": "object"
-    },
-    "PdlParser": {
-      "additionalProperties": false,
-      "description": "Use a PDL program as a parser specification (experimental).",
-      "properties": {
-        "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "title": "Description"
-        },
-        "spec": {
-          "$ref": "#/$defs/PdlTypeType",
-          "default": null
-        },
-        "pdl": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "title": "Pdl"
-        }
-      },
-      "required": [
-        "pdl"
-      ],
-      "title": "PdlParser",
-      "type": "object"
-    },
-    "PdlTiming": {
-      "additionalProperties": false,
-      "description": "Internal data structure to record timing information in the trace.",
-      "properties": {
-        "start_nanos": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": 0,
-          "title": "Start Nanos"
-        },
-        "end_nanos": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": 0,
-          "title": "End Nanos"
-        },
-        "first_use_nanos": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": 0,
-          "title": "First Use Nanos"
-        },
-        "timezone": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": "",
-          "title": "Timezone"
-        }
-      },
-      "title": "PdlTiming",
-      "type": "object"
-    },
-    "PdlTypeType": {
-      "anyOf": [
-        {
-          "enum": [
-            "null",
-            "boolean",
-            "string",
-            "number",
-            "integer",
-            "array",
-            "object",
-            "bool",
-            "str",
-            "float",
-            "int",
-            "list",
-            "obj"
-          ],
-          "type": "string"
-        },
-        {
-          "$ref": "#/$defs/EnumPdlType"
-        },
-        {
-          "items": {
-            "$ref": "#/$defs/PdlTypeType"
-          },
-          "type": "array"
-        },
-        {
-          "$ref": "#/$defs/OptionalPdlType"
-        },
-        {
-          "$ref": "#/$defs/JsonSchemaTypePdlType"
-        },
-        {
-          "$ref": "#/$defs/ObjectPdlType"
-        },
-        {
-          "additionalProperties": {
-            "$ref": "#/$defs/PdlTypeType"
-          },
-          "type": "object"
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "OptionalExpressionBool": {
+      "anyOf": [
+        {
+          "$ref": "#/$defs/ExpressionBool"
         },
         {
           "type": "null"
         }
       ]
     },
-    "PdlUsage": {
-      "description": "Internal data structure to record token consumption usage information.",
-      "properties": {
-        "completion_tokens": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": 0,
-          "title": "Completion Tokens"
-        },
-        "prompt_tokens": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": 0,
-          "title": "Prompt Tokens"
-        }
-      },
-      "title": "PdlUsage",
-      "type": "object"
-    },
-    "Program": {
+    "OptionalExpressionInt": {
       "anyOf": [
         {
-          "type": "boolean"
-        },
-        {
-          "type": "integer"
-        },
-        {
-          "type": "number"
-        },
-        {
-          "type": "string"
-        },
-        {
-          "$ref": "#/$defs/FunctionBlock"
-        },
-        {
-          "$ref": "#/$defs/CallBlock"
-        },
-        {
-          "$ref": "#/$defs/LitellmModelBlock"
-        },
-        {
-          "$ref": "#/$defs/GraniteioModelBlock"
-        },
-        {
-          "$ref": "#/$defs/CodeBlock"
-        },
-        {
-          "$ref": "#/$defs/ArgsBlock"
-        },
-        {
-          "$ref": "#/$defs/GetBlock"
-        },
-        {
-          "$ref": "#/$defs/DataBlock"
-        },
-        {
-          "$ref": "#/$defs/IfBlock"
-        },
-        {
-          "$ref": "#/$defs/MatchBlock"
-        },
-        {
-          "$ref": "#/$defs/RepeatBlock"
-        },
-        {
-          "$ref": "#/$defs/TextBlock"
-        },
-        {
-          "$ref": "#/$defs/LastOfBlock"
-        },
-        {
-          "$ref": "#/$defs/ArrayBlock"
-        },
-        {
-          "$ref": "#/$defs/ObjectBlock"
-        },
-        {
-          "$ref": "#/$defs/MessageBlock"
-        },
-        {
-          "$ref": "#/$defs/ReadBlock"
-        },
-        {
-          "$ref": "#/$defs/IncludeBlock"
-        },
-        {
-          "$ref": "#/$defs/ImportBlock"
-        },
-        {
-          "$ref": "#/$defs/ErrorBlock"
-        },
-        {
-          "$ref": "#/$defs/EmptyBlock"
+          "$ref": "#/$defs/ExpressionInt"
         },
         {
           "type": "null"
         }
-      ],
-      "description": "Prompt Declaration Language program (PDL)",
-      "title": "Program"
+      ]
     },
-    "ReadBlock": {
-      "additionalProperties": false,
-      "description": "Read from a file or standard input.\n\nExample. Read from the standard input with a prompt starting with `> `.\n```PDL\nread:\nmessage: \"> \"\n```\n\nExample. Read the file `./data.yaml` in the same directory of the PDL file containing the block and parse it into YAML.\n```PDL\nread: ./data.yaml\nparser: yaml\n```",
-      "properties": {
-        "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
-        },
-        "spec": {
-          "$ref": "#/$defs/PdlTypeType",
-          "default": null,
-          "description": "Type specification of the result of the block.\n    "
-        },
-        "defs": {
-          "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
-          },
-          "default": {},
-          "description": "Set of definitions executed before the execution of the block.\n    ",
-          "title": "Defs",
-          "type": "object"
-        },
-        "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
-        },
-        "contribute": {
-          "default": [
-            "result",
-            "context"
-          ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
-        },
-        "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
-        },
-        "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
-        },
-        "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
-        },
-        "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
-        },
-        "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
-        },
-        "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
-        },
-        "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
-        },
-        "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
-        },
-        "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+    "OptionalExpressionStr": {
+      "anyOf": [
+        {
+          "$ref": "#/$defs/ExpressionStr"
         },
-        "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "OptionalInt": {
+      "anyOf": [
+        {
+          "type": "integer"
         },
-        "pdl__is_leaf": {
-          "const": true,
-          "default": true,
-          "title": "Pdl  Is Leaf",
-          "type": "boolean"
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "OptionalModelInput": {
+      "anyOf": [
+        {
+          "$ref": "#/$defs/ModelInput"
         },
-        "kind": {
-          "const": "read",
-          "default": "read",
-          "title": "Kind",
-          "type": "string"
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "OptionalParserType": {
+      "anyOf": [
+        {
+          "$ref": "#/$defs/ParserType"
         },
-        "read": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "description": "Name of the file to read. If `None`, read the standard input.\n    ",
-          "title": "Read"
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "OptionalPdlLocationType": {
+      "anyOf": [
+        {
+          "$ref": "#/$defs/PdlLocationType"
         },
-        "message": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Message to prompt the user to enter a value.\n    ",
-          "title": "Message"
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "OptionalPdlTiming": {
+      "anyOf": [
+        {
+          "$ref": "#/$defs/PdlTiming"
         },
-        "multiline": {
-          "default": false,
-          "description": "Indicate if one or multiple lines should be read.\n    ",
-          "title": "Multiline",
-          "type": "boolean"
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "OptionalPdlType": {
+      "additionalProperties": false,
+      "description": "Optional type.",
+      "properties": {
+        "optional": {
+          "$ref": "#/$defs/PdlTypeType"
         }
       },
       "required": [
-        "read"
+        "optional"
       ],
-      "title": "ReadBlock",
+      "title": "OptionalPdlType",
       "type": "object"
     },
-    "RegexParser": {
+    "OptionalPdlUsage": {
+      "anyOf": [
+        {
+          "$ref": "#/$defs/PdlUsage"
+        },
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "OptionalStr": {
+      "anyOf": [
+        {
+          "type": "string"
+        },
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "OrPattern": {
       "additionalProperties": false,
-      "description": "A regular expression parser.",
+      "description": "Match any of the patterns.",
       "properties": {
-        "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
+        "def": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null
+        },
+        "anyOf": {
+          "items": {
+            "$ref": "#/$defs/PatternType"
+          },
+          "title": "Anyof",
+          "type": "array"
+        }
+      },
+      "required": [
+        "anyOf"
+      ],
+      "title": "OrPattern",
+      "type": "object"
+    },
+    "ParserType": {
+      "anyOf": [
+        {
+          "enum": [
+            "json",
+            "jsonl",
+            "yaml"
           ],
-          "default": null,
-          "title": "Description"
+          "type": "string"
         },
-        "spec": {
-          "$ref": "#/$defs/PdlTypeType",
-          "default": null
+        {
+          "$ref": "#/$defs/PdlParser"
         },
-        "regex": {
-          "title": "Regex",
+        {
+          "$ref": "#/$defs/RegexParser"
+        }
+      ]
+    },
+    "PatternType": {
+      "anyOf": [
+        {
+          "type": "boolean"
+        },
+        {
+          "type": "integer"
+        },
+        {
+          "type": "number"
+        },
+        {
           "type": "string"
         },
-        "mode": {
-          "default": "fullmatch",
-          "enum": [
-            "search",
-            "match",
-            "fullmatch",
-            "split",
-            "findall"
-          ],
-          "title": "Mode",
+        {
+          "$ref": "#/$defs/OrPattern"
+        },
+        {
+          "$ref": "#/$defs/ArrayPattern"
+        },
+        {
+          "$ref": "#/$defs/ObjectPattern"
+        },
+        {
+          "$ref": "#/$defs/AnyPattern"
+        },
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "PdlBlock": {
+      "$ref": "#/$defs/BlockType",
+      "title": "PdlBlock"
+    },
+    "PdlLocationType": {
+      "additionalProperties": false,
+      "description": "Internal data structure to keep track of the source location information.",
+      "properties": {
+        "path": {
+          "items": {
+            "type": "string"
+          },
+          "title": "Path",
+          "type": "array"
+        },
+        "file": {
+          "title": "File",
           "type": "string"
+        },
+        "table": {
+          "additionalProperties": {
+            "type": "integer"
+          },
+          "title": "Table",
+          "type": "object"
         }
       },
       "required": [
-        "regex"
+        "path",
+        "file",
+        "table"
       ],
-      "title": "RegexParser",
+      "title": "PdlLocationType",
       "type": "object"
     },
-    "RepeatBlock": {
+    "PdlParser": {
       "additionalProperties": false,
-      "description": "Repeat the execution of a block.\n\nFor loop example:\n```PDL\nfor:\n    number: [1, 2, 3, 4]\n    name: [\"Bob\", \"Carol\", \"David\", \"Ernest\"]\nrepeat:\n    \"${ name }'s number is ${ number }\\n\"\n```\n\nBounded loop:\n```PDL\nindex: i\nmaxIterations: 5\nrepeat:\n    ${ i }\njoin:\n  as: array\n```",
+      "description": "Use a PDL program as a parser specification (experimental).",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "$ref": "#/$defs/OptionalStr",
+          "default": null
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
-          "default": null,
-          "description": "Type specification of the result of the block.\n    "
+          "default": null
         },
-        "defs": {
-          "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
-          },
-          "default": {},
-          "description": "Set of definitions executed before the execution of the block.\n    ",
-          "title": "Defs",
-          "type": "object"
+        "pdl": {
+          "$ref": "#/$defs/BlockType"
+        }
+      },
+      "required": [
+        "pdl"
+      ],
+      "title": "PdlParser",
+      "type": "object"
+    },
+    "PdlTiming": {
+      "additionalProperties": false,
+      "description": "Internal data structure to record timing information in the trace.",
+      "properties": {
+        "start_nanos": {
+          "$ref": "#/$defs/OptionalInt",
+          "default": 0
         },
-        "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+        "end_nanos": {
+          "$ref": "#/$defs/OptionalInt",
+          "default": 0
         },
-        "contribute": {
-          "default": [
-            "result",
-            "context"
+        "first_use_nanos": {
+          "$ref": "#/$defs/OptionalInt",
+          "default": 0
+        },
+        "timezone": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": ""
+        }
+      },
+      "title": "PdlTiming",
+      "type": "object"
+    },
+    "PdlTypeType": {
+      "anyOf": [
+        {
+          "enum": [
+            "null",
+            "boolean",
+            "string",
+            "number",
+            "integer",
+            "array",
+            "object",
+            "bool",
+            "str",
+            "float",
+            "int",
+            "list",
+            "obj"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
+          "type": "string"
+        },
+        {
+          "$ref": "#/$defs/EnumPdlType"
+        },
+        {
           "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
+            "$ref": "#/$defs/PdlTypeType"
           },
-          "title": "Contribute",
           "type": "array"
         },
-        "parser": {
-          "anyOf": [
-            {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
-        },
-        "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
-        },
-        "retry": {
-          "anyOf": [
-            {
-              "type": "integer"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+        {
+          "$ref": "#/$defs/OptionalPdlType"
         },
-        "trace_error_on_retry": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+        {
+          "$ref": "#/$defs/JsonSchemaTypePdlType"
         },
-        "role": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+        {
+          "$ref": "#/$defs/ObjectPdlType"
         },
-        "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+        {
+          "additionalProperties": {
+            "$ref": "#/$defs/PdlTypeType"
+          },
+          "type": "object"
         },
-        "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "PdlUsage": {
+      "description": "Internal data structure to record token consumption usage information.",
+      "properties": {
+        "completion_tokens": {
+          "$ref": "#/$defs/OptionalInt",
+          "default": 0
         },
-        "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+        "prompt_tokens": {
+          "$ref": "#/$defs/OptionalInt",
+          "default": 0
+        }
+      },
+      "title": "PdlUsage",
+      "type": "object"
+    },
+    "Program": {
+      "$ref": "#/$defs/BlockType",
+      "description": "Prompt Declaration Language program (PDL)",
+      "title": "Program"
+    },
+    "ReadBlock": {
+      "additionalProperties": false,
+      "description": "Read from a file or standard input.\n\nExample. Read from the standard input with a prompt starting with `> `.\n```PDL\nread:\nmessage: \"> \"\n```\n\nExample. Read the file `./data.yaml` in the same directory of the PDL file containing the block and parse it into YAML.\n```PDL\nread: ./data.yaml\nparser: yaml\n```",
+      "properties": {
+        "description": {
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
-        },
-        "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
-        },
-        "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "description": "Documentation associated to the block.\n    "
         },
-        "pdl__is_leaf": {
-          "const": false,
-          "default": false,
-          "title": "Pdl  Is Leaf",
-          "type": "boolean"
+        "spec": {
+          "$ref": "#/$defs/PdlTypeType",
+          "default": null,
+          "description": "Type specification of the result of the block.\n    "
         },
-        "context": {
-          "$ref": "#/$defs/IndependentEnum",
-          "default": "dependent"
+        "defs": {
+          "additionalProperties": {
+            "$ref": "#/$defs/BlockType"
+          },
+          "default": {},
+          "description": "Set of definitions executed before the execution of the block.\n    ",
+          "title": "Defs",
+          "type": "object"
         },
-        "kind": {
-          "const": "repeat",
-          "default": "repeat",
-          "title": "Kind",
-          "type": "string"
+        "def": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
-        "for": {
-          "anyOf": [
-            {
-              "additionalProperties": {
-                "anyOf": [
-                  {
-                    "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-                  },
-                  {
-                    "items": {},
-                    "type": "array"
-                  },
-                  {
-                    "type": "string"
-                  }
-                ]
-              },
-              "type": "object"
-            },
-            {
-              "type": "null"
-            }
+        "contribute": {
+          "$ref": "#/$defs/ContributeType",
+          "default": [
+            "result",
+            "context"
           ],
+          "description": "Indicate if the block contributes to the result and background context.\n    "
+        },
+        "parser": {
+          "$ref": "#/$defs/OptionalParserType",
           "default": null,
-          "description": "Arrays to iterate over.\n    ",
-          "title": "For"
+          "description": "Parser to use to construct a value out of a string result."
         },
-        "index": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "fallback": {
+          "$ref": "#/$defs/OptionalBlockType",
           "default": null,
-          "description": "Name of the variable containing the loop iteration.\n    ",
-          "title": "Index"
+          "description": "Block to execute in case of error.\n    "
         },
-        "while": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            }
-          ],
-          "default": true,
-          "description": "Condition to stay at the beginning of the loop.\n    ",
-          "title": "While"
+        "retry": {
+          "$ref": "#/$defs/OptionalInt",
+          "default": null,
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
         },
-        "repeat": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "description": "Body of the loop.\n    ",
-          "title": "Repeat"
+        "trace_error_on_retry": {
+          "$ref": "#/$defs/OptionalBoolOrStr",
+          "default": null,
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
         },
-        "until": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "string"
-            }
-          ],
-          "default": false,
-          "description": "Condition to exit at the end of the loop.\n    ",
-          "title": "Until"
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
         },
-        "maxIterations": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "role": {
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Maximal number of iterations to perform.\n    ",
-          "title": "Maxiterations"
-        },
-        "join": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/JoinText"
-            },
-            {
-              "$ref": "#/$defs/JoinArray"
-            },
-            {
-              "$ref": "#/$defs/JoinObject"
-            },
-            {
-              "$ref": "#/$defs/JoinLastOf"
-            }
-          ],
-          "default": {
-            "as": "text",
-            "with": ""
-          },
-          "description": "Define how to combine the result of each iteration.\n    ",
-          "title": "Join"
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
-        "pdl__trace": {
-          "anyOf": [
-            {
-              "items": {
-                "anyOf": [
-                  {
-                    "type": "boolean"
-                  },
-                  {
-                    "type": "integer"
-                  },
-                  {
-                    "type": "number"
-                  },
-                  {
-                    "type": "string"
-                  },
-                  {
-                    "$ref": "#/$defs/FunctionBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/CallBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/LitellmModelBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/GraniteioModelBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/CodeBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ArgsBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/GetBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/DataBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/IfBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/MatchBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/RepeatBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/TextBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/LastOfBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ArrayBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ObjectBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/MessageBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ReadBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/IncludeBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ImportBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ErrorBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/EmptyBlock"
-                  },
-                  {
-                    "type": "null"
-                  }
-                ]
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+        "pdl__context": {
+          "$ref": "#/$defs/OptionalModelInput",
+          "default": [],
+          "description": "Current context."
+        },
+        "pdl__id": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": "",
+          "description": "Unique identifier for this block."
+        },
+        "pdl__result": {
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "title": "Pdl  Trace"
+          "description": "Result of the execution of the block."
+        },
+        "pdl__location": {
+          "$ref": "#/$defs/OptionalPdlLocationType",
+          "default": null
+        },
+        "pdl__timing": {
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
+        },
+        "pdl__is_leaf": {
+          "const": true,
+          "default": true,
+          "title": "Pdl  Is Leaf",
+          "type": "boolean"
+        },
+        "kind": {
+          "const": "read",
+          "default": "read",
+          "title": "Kind",
+          "type": "string"
+        },
+        "read": {
+          "$ref": "#/$defs/OptionalExpressionStr",
+          "description": "Name of the file to read. If `None`, read the standard input.\n    "
+        },
+        "message": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Message to prompt the user to enter a value.\n    "
+        },
+        "multiline": {
+          "default": false,
+          "description": "Indicate if one or multiple lines should be read.\n    ",
+          "title": "Multiline",
+          "type": "boolean"
         }
       },
       "required": [
-        "repeat"
+        "read"
       ],
-      "title": "RepeatBlock",
+      "title": "ReadBlock",
       "type": "object"
     },
-    "TextBlock": {
+    "RegexParser": {
       "additionalProperties": false,
-      "description": "Create the concatenation of the stringify version of the result of each block of the list of blocks.",
+      "description": "A regular expression parser.",
       "properties": {
         "description": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
+          "$ref": "#/$defs/OptionalStr",
+          "default": null
+        },
+        "spec": {
+          "$ref": "#/$defs/PdlTypeType",
+          "default": null
+        },
+        "regex": {
+          "title": "Regex",
+          "type": "string"
+        },
+        "mode": {
+          "default": "fullmatch",
+          "enum": [
+            "search",
+            "match",
+            "fullmatch",
+            "split",
+            "findall"
           ],
+          "title": "Mode",
+          "type": "string"
+        }
+      },
+      "required": [
+        "regex"
+      ],
+      "title": "RegexParser",
+      "type": "object"
+    },
+    "RepeatBlock": {
+      "additionalProperties": false,
+      "description": "Repeat the execution of a block sequentially.\nThe scope and `pdl_context` are accumulated in between iterations.\n\nFor loop example:\n```PDL\nfor:\n    number: [1, 2, 3, 4]\n    name: [\"Bob\", \"Carol\", \"David\", \"Ernest\"]\nrepeat:\n    \"${ name }'s number is ${ number }\\n\"\n```\n\nWhile loop:\n```PDL\ndefs:\n  i: 0\nwhile: ${i < 5}\nrepeat:\n    defs:\n      i: ${ i + 1}\n    data: ${ i }\njoin:\n  as: array\n```",
+      "properties": {
+        "description": {
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Documentation associated to the block.\n    ",
-          "title": "Description"
+          "description": "Documentation associated to the block.\n    "
         },
         "spec": {
           "$ref": "#/$defs/PdlTypeType",
@@ -11130,86 +4012,7 @@
         },
         "defs": {
           "additionalProperties": {
-            "anyOf": [
-              {
-                "type": "boolean"
-              },
-              {
-                "type": "integer"
-              },
-              {
-                "type": "number"
-              },
-              {
-                "type": "string"
-              },
-              {
-                "$ref": "#/$defs/FunctionBlock"
-              },
-              {
-                "$ref": "#/$defs/CallBlock"
-              },
-              {
-                "$ref": "#/$defs/LitellmModelBlock"
-              },
-              {
-                "$ref": "#/$defs/GraniteioModelBlock"
-              },
-              {
-                "$ref": "#/$defs/CodeBlock"
-              },
-              {
-                "$ref": "#/$defs/ArgsBlock"
-              },
-              {
-                "$ref": "#/$defs/GetBlock"
-              },
-              {
-                "$ref": "#/$defs/DataBlock"
-              },
-              {
-                "$ref": "#/$defs/IfBlock"
-              },
-              {
-                "$ref": "#/$defs/MatchBlock"
-              },
-              {
-                "$ref": "#/$defs/RepeatBlock"
-              },
-              {
-                "$ref": "#/$defs/TextBlock"
-              },
-              {
-                "$ref": "#/$defs/LastOfBlock"
-              },
-              {
-                "$ref": "#/$defs/ArrayBlock"
-              },
-              {
-                "$ref": "#/$defs/ObjectBlock"
-              },
-              {
-                "$ref": "#/$defs/MessageBlock"
-              },
-              {
-                "$ref": "#/$defs/ReadBlock"
-              },
-              {
-                "$ref": "#/$defs/IncludeBlock"
-              },
-              {
-                "$ref": "#/$defs/ImportBlock"
-              },
-              {
-                "$ref": "#/$defs/ErrorBlock"
-              },
-              {
-                "$ref": "#/$defs/EmptyBlock"
-              },
-              {
-                "type": "null"
-              }
-            ]
+            "$ref": "#/$defs/BlockType"
           },
           "default": {},
           "description": "Set of definitions executed before the execution of the block.\n    ",
@@ -11217,166 +4020,192 @@
           "type": "object"
         },
         "def": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": null,
-          "description": "Name of the variable used to store the result of the execution of the block.\n    ",
-          "title": "Def"
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
         },
         "contribute": {
+          "$ref": "#/$defs/ContributeType",
           "default": [
             "result",
             "context"
           ],
-          "description": "Indicate if the block contributes to the result and background context.\n    ",
-          "items": {
-            "anyOf": [
-              {
-                "$ref": "#/$defs/ContributeTarget"
-              },
-              {
-                "additionalProperties": {
-                  "$ref": "#/$defs/ContributeValue"
-                },
-                "type": "object"
-              }
-            ]
-          },
-          "title": "Contribute",
-          "type": "array"
+          "description": "Indicate if the block contributes to the result and background context.\n    "
         },
         "parser": {
+          "$ref": "#/$defs/OptionalParserType",
+          "default": null,
+          "description": "Parser to use to construct a value out of a string result."
+        },
+        "fallback": {
+          "$ref": "#/$defs/OptionalBlockType",
+          "default": null,
+          "description": "Block to execute in case of error.\n    "
+        },
+        "retry": {
+          "$ref": "#/$defs/OptionalInt",
+          "default": null,
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
+        },
+        "trace_error_on_retry": {
+          "$ref": "#/$defs/OptionalBoolOrStr",
+          "default": null,
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
+        },
+        "role": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
+        },
+        "pdl__context": {
+          "$ref": "#/$defs/OptionalModelInput",
+          "default": [],
+          "description": "Current context."
+        },
+        "pdl__id": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": "",
+          "description": "Unique identifier for this block."
+        },
+        "pdl__result": {
+          "$ref": "#/$defs/OptionalAny",
+          "default": null,
+          "description": "Result of the execution of the block."
+        },
+        "pdl__location": {
+          "$ref": "#/$defs/OptionalPdlLocationType",
+          "default": null
+        },
+        "pdl__timing": {
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
+        },
+        "pdl__is_leaf": {
+          "const": false,
+          "default": false,
+          "title": "Pdl  Is Leaf",
+          "type": "boolean"
+        },
+        "context": {
+          "$ref": "#/$defs/IndependentEnum",
+          "default": "dependent"
+        },
+        "kind": {
+          "const": "repeat",
+          "default": "repeat",
+          "title": "Kind",
+          "type": "string"
+        },
+        "for": {
           "anyOf": [
             {
-              "enum": [
-                "json",
-                "jsonl",
-                "yaml"
-              ],
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/PdlParser"
-            },
-            {
-              "$ref": "#/$defs/RegexParser"
+              "additionalProperties": {
+                "anyOf": [
+                  {
+                    "$ref": "#/$defs/LocalizedExpression_TypeVar_"
+                  },
+                  {
+                    "items": {},
+                    "type": "array"
+                  },
+                  {
+                    "type": "string"
+                  }
+                ]
+              },
+              "type": "object"
             },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "description": "Parser to use to construct a value out of a string result.",
-          "title": "Parser"
+          "description": "Arrays to iterate over.\n    ",
+          "title": "For"
+        },
+        "index": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Name of the variable containing the loop iteration.\n    "
         },
-        "fallback": {
-          "anyOf": [
-            {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
+        "while": {
+          "$ref": "#/$defs/ExpressionBool",
+          "default": true,
+          "description": "Condition to stay at the beginning of the loop.\n    "
+        },
+        "repeat": {
+          "$ref": "#/$defs/BlockType",
+          "description": "Body of the loop.\n    "
+        },
+        "until": {
+          "$ref": "#/$defs/ExpressionBool",
+          "default": false,
+          "description": "Condition to exit at the end of the loop.\n    "
+        },
+        "maxIterations": {
+          "$ref": "#/$defs/OptionalExpressionInt",
+          "default": null,
+          "description": "Maximal number of iterations to perform.\n    "
+        },
+        "join": {
+          "$ref": "#/$defs/JoinType",
+          "default": {
+            "as": "text",
+            "with": ""
+          },
+          "description": "Define how to combine the result of each iteration.\n    "
+        },
+        "pdl__trace": {
+          "anyOf": [
             {
-              "$ref": "#/$defs/EmptyBlock"
+              "items": {
+                "$ref": "#/$defs/BlockType"
+              },
+              "type": "array"
             },
             {
               "type": "null"
             }
           ],
           "default": null,
-          "description": "Block to execute in case of error.\n    ",
-          "title": "Fallback"
-        },
-        "retry": {
+          "title": "Pdl  Trace"
+        }
+      },
+      "required": [
+        "repeat"
+      ],
+      "title": "RepeatBlock",
+      "type": "object"
+    },
+    "RequirementType": {
+      "additionalProperties": false,
+      "description": "Single requirement definition.",
+      "properties": {
+        "description": {
           "anyOf": [
             {
-              "type": "integer"
+              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
             },
+            {},
             {
-              "type": "null"
+              "type": "string"
             }
           ],
-          "default": null,
-          "description": "The maximum number of times to retry when an error occurs within a block.\n    ",
-          "title": "Retry"
+          "title": "Description"
         },
-        "trace_error_on_retry": {
+        "evaluate": {
           "anyOf": [
             {
-              "type": "boolean"
+              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
+            },
+            {
+              "$ref": "#/$defs/FunctionBlock"
             },
             {
               "type": "string"
@@ -11385,12 +4214,16 @@
               "type": "null"
             }
           ],
-          "default": null,
-          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    ",
-          "title": "Trace Error On Retry"
+          "title": "Evaluate"
         },
-        "role": {
+        "transformContext": {
           "anyOf": [
+            {
+              "$ref": "#/$defs/LocalizedExpression_TypeVar_"
+            },
+            {
+              "$ref": "#/$defs/FunctionBlock"
+            },
             {
               "type": "string"
             },
@@ -11398,72 +4231,112 @@
               "type": "null"
             }
           ],
+          "title": "Transformcontext"
+        }
+      },
+      "required": [
+        "description",
+        "evaluate",
+        "transformContext"
+      ],
+      "title": "RequirementType",
+      "type": "object"
+    },
+    "RequirementsType": {
+      "items": {
+        "$ref": "#/$defs/RequirementType"
+      },
+      "type": "array"
+    },
+    "TextBlock": {
+      "additionalProperties": false,
+      "description": "Create the concatenation of the stringify version of the result of each block of the list of blocks.",
+      "properties": {
+        "description": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Documentation associated to the block.\n    "
+        },
+        "spec": {
+          "$ref": "#/$defs/PdlTypeType",
+          "default": null,
+          "description": "Type specification of the result of the block.\n    "
+        },
+        "defs": {
+          "additionalProperties": {
+            "$ref": "#/$defs/BlockType"
+          },
+          "default": {},
+          "description": "Set of definitions executed before the execution of the block.\n    ",
+          "title": "Defs",
+          "type": "object"
+        },
+        "def": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Name of the variable used to store the result of the execution of the block.\n    "
+        },
+        "contribute": {
+          "$ref": "#/$defs/ContributeType",
+          "default": [
+            "result",
+            "context"
+          ],
+          "description": "Indicate if the block contributes to the result and background context.\n    "
+        },
+        "parser": {
+          "$ref": "#/$defs/OptionalParserType",
+          "default": null,
+          "description": "Parser to use to construct a value out of a string result."
+        },
+        "fallback": {
+          "$ref": "#/$defs/OptionalBlockType",
+          "default": null,
+          "description": "Block to execute in case of error.\n    "
+        },
+        "retry": {
+          "$ref": "#/$defs/OptionalInt",
           "default": null,
-          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`.",
-          "title": "Role"
+          "description": "The maximum number of times to retry when an error occurs within a block.\n    "
+        },
+        "trace_error_on_retry": {
+          "$ref": "#/$defs/OptionalBoolOrStr",
+          "default": null,
+          "description": "Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.\n    "
+        },
+        "requirements": {
+          "$ref": "#/$defs/RequirementsType",
+          "default": [],
+          "description": "Specify any requirements that the result of the block must satisfy.\n    "
+        },
+        "role": {
+          "$ref": "#/$defs/OptionalStr",
+          "default": null,
+          "description": "Role associated to the block and sub-blocks.\nTypical roles are `system`, `user`, and `assistant`,\nbut there may be other roles such as `available_tools`."
         },
         "pdl__context": {
-          "anyOf": [
-            {
-              "items": {
-                "additionalProperties": true,
-                "type": "object"
-              },
-              "type": "array"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalModelInput",
           "default": [],
-          "description": "Current context\n    ",
-          "title": "Pdl  Context"
+          "description": "Current context."
         },
         "pdl__id": {
-          "anyOf": [
-            {
-              "type": "string"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalStr",
           "default": "",
-          "description": "Unique identifier for this block\n    ",
-          "title": "Pdl  Id"
+          "description": "Unique identifier for this block."
         },
         "pdl__result": {
-          "anyOf": [
-            {},
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalAny",
           "default": null,
-          "description": "Result of the execution of the block",
-          "title": "Pdl  Result"
+          "description": "Result of the execution of the block."
         },
         "pdl__location": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlLocationType"
-            },
-            {
-              "type": "null"
-            }
-          ],
+          "$ref": "#/$defs/OptionalPdlLocationType",
           "default": null
         },
         "pdl__timing": {
-          "anyOf": [
-            {
-              "$ref": "#/$defs/PdlTiming"
-            },
-            {
-              "type": "null"
-            }
-          ],
-          "default": null
+          "$ref": "#/$defs/OptionalPdlTiming",
+          "default": null,
+          "description": "Execution timing information."
         },
         "pdl__is_leaf": {
           "const": false,
@@ -11484,167 +4357,13 @@
         "text": {
           "anyOf": [
             {
-              "type": "boolean"
-            },
-            {
-              "type": "integer"
-            },
-            {
-              "type": "number"
-            },
-            {
-              "type": "string"
-            },
-            {
-              "$ref": "#/$defs/FunctionBlock"
-            },
-            {
-              "$ref": "#/$defs/CallBlock"
-            },
-            {
-              "$ref": "#/$defs/LitellmModelBlock"
-            },
-            {
-              "$ref": "#/$defs/GraniteioModelBlock"
-            },
-            {
-              "$ref": "#/$defs/CodeBlock"
-            },
-            {
-              "$ref": "#/$defs/ArgsBlock"
-            },
-            {
-              "$ref": "#/$defs/GetBlock"
-            },
-            {
-              "$ref": "#/$defs/DataBlock"
-            },
-            {
-              "$ref": "#/$defs/IfBlock"
-            },
-            {
-              "$ref": "#/$defs/MatchBlock"
-            },
-            {
-              "$ref": "#/$defs/RepeatBlock"
-            },
-            {
-              "$ref": "#/$defs/TextBlock"
-            },
-            {
-              "$ref": "#/$defs/LastOfBlock"
-            },
-            {
-              "$ref": "#/$defs/ArrayBlock"
-            },
-            {
-              "$ref": "#/$defs/ObjectBlock"
-            },
-            {
-              "$ref": "#/$defs/MessageBlock"
-            },
-            {
-              "$ref": "#/$defs/ReadBlock"
-            },
-            {
-              "$ref": "#/$defs/IncludeBlock"
-            },
-            {
-              "$ref": "#/$defs/ImportBlock"
-            },
-            {
-              "$ref": "#/$defs/ErrorBlock"
-            },
-            {
-              "$ref": "#/$defs/EmptyBlock"
+              "$ref": "#/$defs/BlockType"
             },
             {
               "items": {
-                "anyOf": [
-                  {
-                    "type": "boolean"
-                  },
-                  {
-                    "type": "integer"
-                  },
-                  {
-                    "type": "number"
-                  },
-                  {
-                    "type": "string"
-                  },
-                  {
-                    "$ref": "#/$defs/FunctionBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/CallBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/LitellmModelBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/GraniteioModelBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/CodeBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ArgsBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/GetBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/DataBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/IfBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/MatchBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/RepeatBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/TextBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/LastOfBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ArrayBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ObjectBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/MessageBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ReadBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/IncludeBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ImportBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/ErrorBlock"
-                  },
-                  {
-                    "$ref": "#/$defs/EmptyBlock"
-                  },
-                  {
-                    "type": "null"
-                  }
-                ]
+                "$ref": "#/$defs/BlockType"
               },
               "type": "array"
-            },
-            {
-              "type": "null"
             }
           ],
           "description": "Body of the text.\n    ",
diff --git a/src/pdl/pdl_ast.py b/src/pdl/pdl_ast.py
index 396fe7570..07c7c4f1d 100644
--- a/src/pdl/pdl_ast.py
+++ b/src/pdl/pdl_ast.py
@@ -5,6 +5,7 @@
 from typing import (
     Annotated,
     Any,
+    Callable,
     Generic,
     Literal,
     Mapping,
@@ -24,7 +25,6 @@
     RootModel,
     TypeAdapter,
 )
-from pydantic.json_schema import SkipJsonSchema
 from typing_extensions import TypeAliasType
 
 from .pdl_context import PDLContext
@@ -37,13 +37,28 @@ def _ensure_lower(value):
     return value
 
 
-ScopeType: TypeAlias = PdlDict[str, Any]
+OptionalStr = TypeAliasType("OptionalStr", Optional[str])
+"""Optional string."""
+OptionalInt = TypeAliasType("OptionalInt", Optional[int])
+"""Optional integer."""
+OptionalBoolOrStr = TypeAliasType("OptionalBoolOrStr", Optional[Union[bool, str]])
+"""Optional boolean or string."""
+OptionalAny = TypeAliasType("OptionalAny", Optional[Any])
+"""Optional value of any type."""
 
+OptionalBlockType = TypeAliasType("OptionalBlockType", Optional["BlockType"])
+"""Optional block."""
 
-ModelInput: TypeAlias = Sequence[Mapping[str, Any]]
 
+ScopeType = TypeAliasType("ScopeType", PdlDict[str, Any])
+"""Type of the execution environment."""
 
-LazyMessage: TypeAlias = PdlLazy[dict[str, Any]]
+ModelInput = TypeAliasType("ModelInput", Sequence[Mapping[str, Any]])
+"""Type of the input of an LLM call."""
+OptionalModelInput = TypeAliasType("OptionalModelInput", Optional[ModelInput])
+"""Optional value of type ModelInput."""
+
+LazyMessage = TypeAliasType("LazyMessage", PdlLazy[dict[str, Any]])
 LazyMessages: TypeAlias = PDLContext
 
 
@@ -62,6 +77,7 @@ class BlockKind(StrEnum):
     IF = "if"
     MATCH = "match"
     REPEAT = "repeat"
+    MAP = "map"
     READ = "read"
     INCLUDE = "include"
     IMPORT = "import"
@@ -78,6 +94,12 @@ class PdlLocationType(BaseModel):
     table: dict[str, int]
 
 
+OptionalPdlLocationType = TypeAliasType(
+    "OptionalPdlLocationType", Optional[PdlLocationType]
+)
+"""Optional location type."""
+
+
 empty_block_location = PdlLocationType(file="", path=[], table={})
 
 
@@ -95,19 +117,39 @@ class LocalizedExpression(BaseModel, Generic[LocalizedExpressionT]):
     )
     pdl__expr: Any
     pdl__result: Optional[LocalizedExpressionT] = None
-    pdl__location: Optional[PdlLocationType] = None
+    pdl__location: OptionalPdlLocationType = None
 
 
 ExpressionTypeT = TypeVar("ExpressionTypeT")
 ExpressionType: TypeAlias = LocalizedExpression[ExpressionTypeT] | ExpressionTypeT | str
 """Expressions are represented Jinja as strings in between `${` and `}`."""
 
+ExpressionStr = TypeAliasType("ExpressionStr", ExpressionType[str])
+"""Expression evaluating into a string."""
+
+OptionalExpressionStr = TypeAliasType("OptionalExpressionStr", Optional[ExpressionStr])
+"""Optional expression evaluating into a string."""
+
+ExpressionInt = TypeAliasType("ExpressionInt", ExpressionType[int])
+"""Expression evaluating into an int."""
+
+OptionalExpressionInt = TypeAliasType("OptionalExpressionInt", Optional[ExpressionInt])
+"""Optional expression evaluating into an int."""
+
+ExpressionBool = TypeAliasType("ExpressionBool", ExpressionType[bool])
+"""Expression evaluating into a bool."""
+
+OptionalExpressionBool = TypeAliasType(
+    "OptionalExpressionBool", Optional[ExpressionBool]
+)
+"""Optional expression evaluating into a bool."""
+
 
 class Pattern(BaseModel):
     """Common fields for structured patterns."""
 
     model_config = ConfigDict(extra="forbid")
-    def_: Optional[str] = Field(default=None, alias="def")
+    def_: OptionalStr = Field(default=None, alias="def")
     """Name of the variable used to store the value matched by the pattern.
     """
 
@@ -139,16 +181,11 @@ class AnyPattern(Pattern):
     any: Literal[None]
 
 
-PatternType: TypeAlias = (
-    None
-    | bool
-    | int
-    | float
-    | str
-    | OrPattern
-    | ArrayPattern
-    | ObjectPattern
-    | AnyPattern
+PatternType = TypeAliasType(
+    "PatternType",
+    Union[
+        None, bool, int, float, str, OrPattern, ArrayPattern, ObjectPattern, AnyPattern
+    ],
 )
 """Patterns allowed to match values in a `case` clause."""
 
@@ -233,7 +270,7 @@ class Parser(BaseModel):
     """Common fields for all parsers (`parser` field)."""
 
     model_config = ConfigDict(extra="forbid")
-    description: Optional[str] = None
+    description: OptionalStr = None
     """Documentation associated to the parser.
     """
     spec: PdlTypeType = None
@@ -260,10 +297,14 @@ class RegexParser(Parser):
     """Function used to parse to value (https://docs.python.org/3/library/re.html)."""
 
 
-ParserType: TypeAlias = Literal["json", "jsonl", "yaml"] | PdlParser | RegexParser
-
+ParserType = TypeAliasType(
+    "ParserType", Union[Literal["json", "jsonl", "yaml"], PdlParser, RegexParser]
+)
+"""Different parsers."""
+OptionalParserType = TypeAliasType("OptionalParserType", Optional[ParserType])
+"""Optional parser."""
 
-RoleType: TypeAlias = Optional[str]
+RoleType: TypeAlias = OptionalStr
 """Role name."""
 
 
@@ -283,35 +324,68 @@ class ContributeValue(BaseModel):
     """Value to contribute."""
 
 
+ContributeType = TypeAliasType(
+    "ContributeType", Sequence[Union[ContributeTarget, dict[str, ContributeValue]]]
+)
+"""Type of the contribute field."""
+
+
+class RequirementType(BaseModel):
+    """Single requirement definition."""
+
+    model_config = ConfigDict(extra="forbid")
+
+    description: ExpressionType
+    """English description of the requirement"""
+
+    evaluate: Optional[ExpressionType["FunctionBlock"]]
+    """Evaluation function for the requirement"""
+
+    transformContext: Optional[ExpressionType["FunctionBlock"]]
+    """Function to transform the context for the requirement"""
+
+
+RequirementsType = TypeAliasType("RequirementsType", Sequence[RequirementType])
+"""Type of requirements field"""
+
+
 class PdlTiming(BaseModel):
     """Internal data structure to record timing information in the trace."""
 
     model_config = ConfigDict(extra="forbid")
-    start_nanos: Optional[int] = 0
+    start_nanos: OptionalInt = 0
     """Time at which block execution began.
     """
-    end_nanos: Optional[int] = 0
+    end_nanos: OptionalInt = 0
     """Time at which block execution ended.
     """
-    first_use_nanos: Optional[int] = 0
+    first_use_nanos: OptionalInt = 0
     """Time at which the value of the block was needed for the first time.
     """
-    timezone: Optional[str] = ""
+    timezone: OptionalStr = ""
     """Timezone of start_nanos and end_nanos.
     """
 
 
+OptionalPdlTiming = TypeAliasType("OptionalPdlTiming", Optional[PdlTiming])
+"""Optional execution time information."""
+
+
 class PdlUsage(BaseModel):
     """Internal data structure to record token consumption usage information."""
 
-    completion_tokens: Optional[int] = 0
+    completion_tokens: OptionalInt = 0
     """Completion tokens consumed
     """
-    prompt_tokens: Optional[int] = 0
+    prompt_tokens: OptionalInt = 0
     """Prompt tokens consumed
     """
 
 
+OptionalPdlUsage = TypeAliasType("OptionalPdlUsage", Optional[PdlUsage])
+"""Optional usage of statistics of an LLM call."""
+
+
 class Block(BaseModel):
     """Common fields for all PDL blocks."""
 
@@ -319,9 +393,10 @@ class Block(BaseModel):
         extra="forbid",
         use_attribute_docstrings=True,
         arbitrary_types_allowed=True,
+        validate_by_name=True,
     )
 
-    description: Optional[str] = None
+    description: OptionalStr = None
     """Documentation associated to the block.
     """
     spec: PdlTypeType = None
@@ -330,42 +405,46 @@ class Block(BaseModel):
     defs: dict[str, "BlockType"] = {}
     """Set of definitions executed before the execution of the block.
     """
-    def_: Optional[str] = Field(default=None, alias="def")
+    def_: OptionalStr = Field(default=None, alias="def")
     """Name of the variable used to store the result of the execution of the block.
     """
-    contribute: Sequence[ContributeTarget | dict[str, ContributeValue]] = [
+    contribute: ContributeType = [
         ContributeTarget.RESULT,
         ContributeTarget.CONTEXT,
     ]
     """Indicate if the block contributes to the result and background context.
     """
-    parser: Annotated[Optional[ParserType], BeforeValidator(_ensure_lower)] = None
+    parser: Annotated[OptionalParserType, BeforeValidator(_ensure_lower)] = None
     """Parser to use to construct a value out of a string result."""
-    fallback: Optional["BlockType"] = None
+    fallback: OptionalBlockType = None
     """Block to execute in case of error.
     """
-    retry: Optional[int] = None
+    retry: OptionalInt = None
     """The maximum number of times to retry when an error occurs within a block.
     """
-    trace_error_on_retry: Optional[bool] | str = None
+    trace_error_on_retry: OptionalBoolOrStr = None
     """Whether to add the errors while retrying to the trace. Set this to true to use retry feature for multiple LLM trials.
     """
+
+    requirements: RequirementsType = []
+    """Specify any requirements that the result of the block must satisfy.
+    """
+
     role: RoleType = None
     """Role associated to the block and sub-blocks.
     Typical roles are `system`, `user`, and `assistant`,
     but there may be other roles such as `available_tools`.
     """
     # Fields for internal use
-    pdl__context: Optional[ModelInput] = []
-    """Current context
-    """
-    pdl__id: Optional[str] = ""
-    """Unique identifier for this block
-    """
-    pdl__result: Optional[Any] = None
-    """Result of the execution of the block"""
-    pdl__location: Optional[PdlLocationType] = None
-    pdl__timing: Optional[PdlTiming] = None
+    pdl__context: OptionalModelInput = []
+    """Current context."""
+    pdl__id: OptionalStr = ""
+    """Unique identifier for this block."""
+    pdl__result: OptionalAny = None
+    """Result of the execution of the block."""
+    pdl__location: OptionalPdlLocationType = None
+    pdl__timing: OptionalPdlTiming = None
+    """Execution timing information."""
 
 
 class LeafBlock(Block):
@@ -398,9 +477,6 @@ class FunctionBlock(LeafBlock):
     """Function signature computed from the function definition.
     """
 
-    # Field for internal use
-    pdl__scope: SkipJsonSchema[Optional[ScopeType]] = Field(default=None, repr=False)
-
 
 class CallBlock(LeafBlock):
     """Calling a function."""
@@ -413,7 +489,7 @@ class CallBlock(LeafBlock):
     """Arguments of the function with their values.
     """
     # Field for internal use
-    pdl__trace: Optional["BlockType"] = None
+    pdl__trace: OptionalBlockType = None
 
 
 class LitellmParameters(BaseModel):
@@ -519,14 +595,14 @@ class ModelBlock(LeafBlock):
     input: "BlockType" = "${ pdl_context }"
     """Messages to send to the model.
     """
-    modelResponse: Optional[str] = None
+    modelResponse: OptionalStr = None
     """Variable where to store the raw response of the model.
     """
     # Field for internal use
-    pdl__usage: Optional[PdlUsage] = None
+    pdl__usage: OptionalPdlUsage = None
     """Tokens consumed during model call
     """
-    pdl__model_input: Optional[ModelInput] = None
+    pdl__model_input: OptionalModelInput = None
 
 
 class LitellmModelBlock(ModelBlock):
@@ -544,7 +620,7 @@ class LitellmModelBlock(ModelBlock):
     platform: Literal[ModelPlatform.LITELLM] = ModelPlatform.LITELLM
     """Optional field to ensure that the block is using LiteLLM.
     """
-    model: ExpressionType[str]
+    model: ExpressionStr
     """Name of the model following the LiteLLM convention.
     """
     parameters: Optional[LitellmParameters | ExpressionType[dict]] = None
@@ -553,10 +629,10 @@ class LitellmModelBlock(ModelBlock):
 
 
 class GraniteioProcessor(BaseModel):
-    type: Optional[ExpressionType[str]] = None
+    type: OptionalExpressionStr = None
     """Type of IO processor.
     """
-    model: Optional[ExpressionType[str]] = None
+    model: OptionalExpressionStr = None
     """Model name used by the backend.
     """
     backend: ExpressionType[str | dict[str, Any] | object]
@@ -621,7 +697,7 @@ class ArgsBlock(BaseCodeBlock):
     """
 
     lang: Annotated[Literal["command"], BeforeValidator(_ensure_lower)] = "command"
-    args: list[ExpressionType[str]]
+    args: list[ExpressionStr]
     """The argument vector to spawn.
     """
 
@@ -709,9 +785,9 @@ class MessageBlock(LeafBlock):
     kind: Literal[BlockKind.MESSAGE] = BlockKind.MESSAGE
     content: "BlockType"
     """Content of the message."""
-    name: Optional[ExpressionType[str]] = None
+    name: OptionalExpressionStr = None
     """For example, the name of the tool that was invoked, for which this message is the tool response."""
-    tool_call_id: Optional[ExpressionType[str]] = None
+    tool_call_id: OptionalExpressionStr = None
     """The id of the tool invocation for which this message is the tool response."""
 
 
@@ -731,13 +807,13 @@ class IfBlock(StructuredBlock):
     """
 
     kind: Literal[BlockKind.IF] = BlockKind.IF
-    condition: ExpressionType[bool] = Field(alias="if")
+    condition: ExpressionBool = Field(alias="if")
     """Condition.
     """
     then: "BlockType"
     """Branch to execute if the condition is true.
     """
-    else_: Optional["BlockType"] = Field(default=None, alias="else")
+    else_: OptionalBlockType = Field(default=None, alias="else")
     """Branch to execute if the condition is false.
     """
 
@@ -749,7 +825,7 @@ class MatchCase(BaseModel):
     case: Optional[PatternType] = None
     """Value to match.
     """
-    if_: Optional[ExpressionType[bool]] = Field(default=None, alias="if")
+    if_: OptionalExpressionBool = Field(default=None, alias="if")
     """Boolean condition to satisfy.
     """
     then: "BlockType"
@@ -791,23 +867,18 @@ class MatchBlock(StructuredBlock):
     """
 
 
-class IterationType(StrEnum):
-    LASTOF = "lastOf"
-    ARRAY = "array"
-    OBJECT = "object"
-    TEXT = "text"
-
-
 class JoinConfig(BaseModel):
     """Configure how loop iterations should be combined."""
 
-    model_config = ConfigDict(extra="forbid", use_attribute_docstrings=True)
+    model_config = ConfigDict(
+        extra="forbid", use_attribute_docstrings=True, validate_by_name=True
+    )
 
 
 class JoinText(JoinConfig):
     """Join loop iterations as a string."""
 
-    as_: Literal[IterationType.TEXT] = Field(alias="as", default=IterationType.TEXT)
+    as_: Literal["text"] = Field(alias="as", default="text")
     """String concatenation of the result of each iteration.
     """
 
@@ -819,7 +890,7 @@ class JoinText(JoinConfig):
 class JoinArray(JoinConfig):
     """Join loop iterations as an array."""
 
-    as_: Literal[IterationType.ARRAY] = Field(alias="as")
+    as_: Literal["array"] = Field(alias="as")
     """Return the result of each iteration as an array.
     """
 
@@ -827,7 +898,7 @@ class JoinArray(JoinConfig):
 class JoinObject(JoinConfig):
     """Join loop iterations as an object."""
 
-    as_: Literal[IterationType.OBJECT] = Field(alias="as")
+    as_: Literal["object"] = Field(alias="as")
     """Return the union of the objects created at each iteration.
     """
 
@@ -835,18 +906,30 @@ class JoinObject(JoinConfig):
 class JoinLastOf(JoinConfig):
     """Join loop iterations as the value of the last iteration."""
 
-    as_: Literal[IterationType.LASTOF] = Field(alias="as")
+    as_: Literal["lastOf"] = Field(alias="as")
     """Return the result of the last iteration.
     """
 
 
-JoinType: TypeAlias = JoinText | JoinArray | JoinObject | JoinLastOf
+class JoinReduce(JoinConfig):
+    """Join loop iterations as the value of the last iteration."""
+
+    as_: Literal["reduce"] = Field(alias="as", default="reduce")
+
+    reduce: ExpressionType[Callable]
+    """Function used to combine the results."""
+
+
+JoinType = TypeAliasType(
+    "JoinType", Union[JoinText, JoinArray, JoinObject, JoinLastOf, JoinReduce]
+)
 """Different ways to join loop iterations."""
 
 
 class RepeatBlock(StructuredBlock):
     """
-    Repeat the execution of a block.
+    Repeat the execution of a block sequentially.
+    The scope and `pdl_context` are accumulated in between iterations.
 
     For loop example:
     ```PDL
@@ -857,12 +940,15 @@ class RepeatBlock(StructuredBlock):
         "${ name }'s number is ${ number }\\n"
     ```
 
-    Bounded loop:
+    While loop:
     ```PDL
-    index: i
-    maxIterations: 5
+    defs:
+      i: 0
+    while: ${i < 5}
     repeat:
-        ${ i }
+        defs:
+          i: ${ i + 1}
+        data: ${ i }
     join:
       as: array
     ```
@@ -872,24 +958,73 @@ class RepeatBlock(StructuredBlock):
     for_: Optional[dict[str, ExpressionType[list]]] = Field(default=None, alias="for")
     """Arrays to iterate over.
     """
-    index: Optional[str] = None
+    index: OptionalStr = None
     """Name of the variable containing the loop iteration.
     """
-    while_: ExpressionType[bool] = Field(default=True, alias="while")
+    while_: ExpressionBool = Field(default=True, alias="while")
     """Condition to stay at the beginning of the loop.
     """
     repeat: "BlockType"
     """Body of the loop.
     """
-    until: ExpressionType[bool] = False
+    until: ExpressionBool = False
     """Condition to exit at the end of the loop.
     """
-    maxIterations: Optional[ExpressionType[int]] = None
+    maxIterations: OptionalExpressionInt = None
+    """Maximal number of iterations to perform.
+    """
+    join: JoinType = JoinText()
+    """Define how to combine the result of each iteration.
+    """
+    # Field for internal use
+    pdl__trace: Optional[list["BlockType"]] = None
+
+
+class MapBlock(StructuredBlock):
+    """
+    Independent executions of  a block.
+    Repeat the execution of a block starting from the initial scope
+    and `pdl_context`.
+
+    For loop example:
+    ```PDL
+    for:
+        number: [1, 2, 3, 4]
+        name: ["Bob", "Carol", "David", "Ernest"]
+    map:
+        "${ name }'s number is ${ number }\\n"
+    ```
+
+    Bounded loop:
+    ```PDL
+    index: i
+    maxIterations: 5
+    map:
+        ${ i }
+    join:
+      as: array
+    ```
+    """
+
+    kind: Literal[BlockKind.MAP] = BlockKind.MAP
+    for_: Optional[dict[str, ExpressionType[list]]] = Field(default=None, alias="for")
+    """Arrays to iterate over.
+    """
+    index: OptionalStr = None
+    """Name of the variable containing the loop iteration.
+    """
+    map: "BlockType"
+    """Body of the iterator.
+    """
+    maxIterations: OptionalExpressionInt = None
     """Maximal number of iterations to perform.
     """
     join: JoinType = JoinText()
     """Define how to combine the result of each iteration.
     """
+    maxWorkers: OptionalInt = None
+    """Maximal number of workers to execute the map in parallel. Is it is set to `0`, the execution is sequential otherwise it is given as argument to the `ThreadPoolExecutor`.
+    """
     # Field for internal use
     pdl__trace: Optional[list["BlockType"]] = None
 
@@ -911,10 +1046,10 @@ class ReadBlock(LeafBlock):
     """
 
     kind: Literal[BlockKind.READ] = BlockKind.READ
-    read: ExpressionType[str] | None
+    read: OptionalExpressionStr
     """Name of the file to read. If `None`, read the standard input.
     """
-    message: Optional[str] = None
+    message: OptionalStr = None
     """Message to prompt the user to enter a value.
     """
     multiline: bool = False
@@ -930,7 +1065,7 @@ class IncludeBlock(StructuredBlock):
     """Name of the file to include.
     """
     # Field for internal use
-    pdl__trace: Optional["BlockType"] = None
+    pdl__trace: OptionalBlockType = None
 
 
 class ImportBlock(LeafBlock):
@@ -941,7 +1076,7 @@ class ImportBlock(LeafBlock):
     """Name of the file to import.
     """
     # Field for internal use
-    pdl__trace: Optional["BlockType"] = None
+    pdl__trace: OptionalBlockType = None
 
 
 class ErrorBlock(LeafBlock):
@@ -974,6 +1109,7 @@ class EmptyBlock(LeafBlock):
     | IfBlock
     | MatchBlock
     | RepeatBlock
+    | MapBlock
     | TextBlock
     | LastOfBlock
     | ArrayBlock
@@ -987,7 +1123,9 @@ class EmptyBlock(LeafBlock):
 )
 """Different types of structured blocks.
 """
-BlockType: TypeAlias = None | bool | int | float | str | AdvancedBlockType
+BlockType = TypeAliasType(
+    "BlockType", Union[None, bool, int, float, str, AdvancedBlockType]
+)
 """All kinds of blocks.
 """
 BlockOrBlocksType: TypeAlias = BlockType | list[BlockType]  # pyright: ignore
@@ -1022,7 +1160,7 @@ def __init__(
         message: str,
         loc: Optional[PdlLocationType] = None,
         trace: Optional[BlockType] = None,
-        fallback: Optional[Any] = None,
+        fallback: OptionalAny = None,
     ):
         super().__init__(message)
         self.loc = loc
@@ -1045,7 +1183,7 @@ def __init__(
         message: str,
         blocks: list[BlockType],
         loc: Optional[PdlLocationType] = None,
-        fallback: Optional[Any] = None,
+        fallback: OptionalAny = None,
     ):
         super().__init__(message)
         self.loc = loc
diff --git a/src/pdl/pdl_ast_utils.py b/src/pdl/pdl_ast_utils.py
index 241662680..dc8b0a650 100644
--- a/src/pdl/pdl_ast_utils.py
+++ b/src/pdl/pdl_ast_utils.py
@@ -19,6 +19,7 @@
     IncludeBlock,
     LastOfBlock,
     LitellmModelBlock,
+    MapBlock,
     MatchBlock,
     MatchCase,
     MessageBlock,
@@ -85,6 +86,11 @@ def iter_block_children(f: Callable[[BlockType], None], block: BlockType) -> Non
             if block.pdl__trace is not None:
                 for trace in block.pdl__trace:
                     f(trace)
+        case MapBlock():
+            f(block.map)
+            if block.pdl__trace is not None:
+                for trace in block.pdl__trace:
+                    f(trace)
         case ErrorBlock():
             f(block.program)
         case ReadBlock():
@@ -191,6 +197,12 @@ def map_block_children(f: MappedFunctions, block: BlockType) -> BlockType:
             block.until = f.f_expr(block.until)
             if block.pdl__trace is not None:
                 block.pdl__trace = [f.f_block(trace) for trace in block.pdl__trace]
+        case MapBlock():
+            if block.for_ is not None:
+                block.for_ = {x: f.f_expr(blocks) for x, blocks in block.for_.items()}
+            block.map = f.f_block(block.map)
+            if block.pdl__trace is not None:
+                block.pdl__trace = [f.f_block(trace) for trace in block.pdl__trace]
         case ErrorBlock():
             block.program = f.f_block(block.program)
         case ReadBlock():
diff --git a/src/pdl/pdl_compilers/to_regex.py b/src/pdl/pdl_compilers/to_regex.py
index 602e81a0c..cbfc246f4 100644
--- a/src/pdl/pdl_compilers/to_regex.py
+++ b/src/pdl/pdl_compilers/to_regex.py
@@ -18,6 +18,7 @@
     LitellmModelBlock,
     LitellmParameters,
     LocalizedExpression,
+    MapBlock,
     ModelBlock,
     ReadBlock,
     RepeatBlock,
@@ -312,6 +313,10 @@ def compile_block(
             body, scope = compile_block(scope, block.repeat)
             # XXX TODO: join char in text mode XXX
             regex = ReStar(body)
+        case MapBlock():
+            body, scope = compile_block(scope, block.map)
+            # XXX TODO: join char in text mode XXX
+            regex = ReStar(body)
         case ReadBlock():
             regex = ReStar(ReAnyChar())
         case IncludeBlock():
diff --git a/src/pdl/pdl_context.py b/src/pdl/pdl_context.py
index be9648f02..26909d109 100644
--- a/src/pdl/pdl_context.py
+++ b/src/pdl/pdl_context.py
@@ -68,16 +68,16 @@ def __init__(self, context: list[PDLContext | dict[str, Any]]):
         for item in context:
             match item:
                 case IndependentContext():
-                    ret += item.context.data
+                    ret = ret + item.context.data
                 case SingletonContext():
-                    ret += [item]
+                    ret = ret + [item]
                 case DependentContext():
                     if len(item) == 0:
                         pass
                     else:
-                        ret += [item]
+                        ret = ret + [item]
                 case dict():
-                    ret += [SingletonContext(item)]
+                    ret = ret + [SingletonContext(item)]
                 case _:
                     assert False
         self.context = PdlList(ret)
@@ -98,7 +98,7 @@ def __getitem__(self, index: int | slice):  # pyright: ignore
 
     def __repr__(self):  # pyright: ignore
         ret = "{"
-        ret += ",".join([i.__repr__() for i in self.context.result()])
+        ret = ret + ",".join([i.__repr__() for i in self.context.result()])
         return ret + "}"
 
 
@@ -110,16 +110,16 @@ def __init__(self, context: list[PDLContext | dict[str, Any]]):
         for item in context:
             match item:
                 case DependentContext():
-                    ret += item.context.data
+                    ret = ret + item.context.data
                 case SingletonContext():
-                    ret += [item]
+                    ret = ret + [item]
                 case IndependentContext():
                     if len(item) == 0:
                         pass
                     else:
-                        ret += [item]
+                        ret = ret + [item]
                 case dict():
-                    ret += [SingletonContext(item)]
+                    ret = ret + [SingletonContext(item)]
                 case _:
                     assert False
         self.context = PdlList(ret)
@@ -138,7 +138,7 @@ def __getitem__(self, index: int | slice):  # pyright: ignore
 
     def __repr__(self):  # pyright: ignore
         ret = "["
-        ret += ",".join([i.__repr__() for i in self.context.result()])
+        ret = ret + ",".join([i.__repr__() for i in self.context.result()])
         return ret + "]"
 
 
diff --git a/src/pdl/pdl_dumper.py b/src/pdl/pdl_dumper.py
index bcd3f9379..54effbf3c 100644
--- a/src/pdl/pdl_dumper.py
+++ b/src/pdl/pdl_dumper.py
@@ -29,6 +29,10 @@
     IfBlock,
     ImportBlock,
     IncludeBlock,
+    JoinArray,
+    JoinLastOf,
+    JoinObject,
+    JoinReduce,
     JoinText,
     JoinType,
     JsonSchemaTypePdlType,
@@ -36,6 +40,7 @@
     LitellmModelBlock,
     LitellmParameters,
     LocalizedExpression,
+    MapBlock,
     MatchBlock,
     MessageBlock,
     ObjectBlock,
@@ -54,6 +59,7 @@
     ReadBlock,
     RegexParser,
     RepeatBlock,
+    RequirementType,
     StructuredBlock,
     TextBlock,
 )
@@ -243,7 +249,22 @@ def block_to_dict(  # noqa: C901
                 d["until"] = expr_to_dict(block.until, json_compatible)
             if block.maxIterations is not None:
                 d["maxIterations"] = expr_to_dict(block.maxIterations, json_compatible)
-            d["join"] = join_to_dict(block.join)
+            d["join"] = join_to_dict(block.join, json_compatible)
+            if block.pdl__trace is not None:
+                d["pdl__trace"] = [
+                    block_to_dict(b, json_compatible) for b in block.pdl__trace
+                ]
+        case MapBlock():
+            if block.for_ is not None:
+                d["for"] = expr_to_dict(block.for_, json_compatible)
+            if block.index is not None:
+                d["index"] = block.index
+            if block.maxWorkers is not None:
+                d["maxWorkers"] = expr_to_dict(block.maxWorkers, json_compatible)
+            d["map"] = block_to_dict(block.map, json_compatible)
+            if block.maxIterations is not None:
+                d["maxIterations"] = expr_to_dict(block.maxIterations, json_compatible)
+            d["join"] = join_to_dict(block.join, json_compatible)
             if block.pdl__trace is not None:
                 d["pdl__trace"] = [
                     block_to_dict(b, json_compatible) for b in block.pdl__trace
@@ -279,6 +300,10 @@ def block_to_dict(  # noqa: C901
         d["pdl__result"] = data_to_dict(block.pdl__result.result(), json_compatible)
     if block.parser is not None:
         d["parser"] = parser_to_dict(block.parser)
+    if block.requirements is not None:
+        d["requirements"] = [
+            requirement_to_dict(b, json_compatible) for b in block.requirements
+        ]
     # if block.pdl__location is not None:
     #     d["pdl__location"] = location_to_dict(block.pdl__location)
     if block.fallback is not None:
@@ -380,6 +405,14 @@ def usage_to_dict(usage: PdlUsage) -> dict:
     return d
 
 
+def requirement_to_dict(req: RequirementType, json_compatible: bool) -> dict:
+    d: dict = {}
+    d["description"] = req.description
+    d["evaluate"] = expr_to_dict(req.evaluate, json_compatible)
+    d["transformContext"] = expr_to_dict(req.transformContext, json_compatible)
+    return d
+
+
 def pattern_to_dict(pattern: PatternType):
     if not isinstance(pattern, pdl_ast.Pattern):
         return pattern
@@ -402,13 +435,17 @@ def pattern_to_dict(pattern: PatternType):
     return result
 
 
-def join_to_dict(join: JoinType) -> dict[str, Any]:
-    d = {}
+def join_to_dict(join: JoinType, json_compatible: bool) -> dict[str, Any]:
+    d: dict[str, Any] = {}
     match join:
         case JoinText():
             d["with"] = join.with_
-        case _:
+        case JoinArray() | JoinObject() | JoinLastOf():
             d["as"] = str(join.as_)
+        case JoinReduce():
+            d["reduce"] = expr_to_dict(join.reduce, json_compatible)
+        case _:
+            assert False
     return d
 
 
diff --git a/src/pdl/pdl_interpreter.py b/src/pdl/pdl_interpreter.py
index d5b0f76e5..407f8b3be 100644
--- a/src/pdl/pdl_interpreter.py
+++ b/src/pdl/pdl_interpreter.py
@@ -11,13 +11,24 @@
 # TODO: temporarily disabling warnings to mute a pydantic warning from liteLLM
 import warnings
 from asyncio import AbstractEventLoop
-from functools import partial
+from concurrent.futures import ThreadPoolExecutor
+from functools import partial, reduce
+from itertools import count
 from os import getenv
 
 warnings.filterwarnings("ignore", "Valid config keys have changed in V2")
 
 from pathlib import Path  # noqa: E402
-from typing import Any, Generator, Optional, Sequence, TypeVar  # noqa: E402
+from typing import (  # noqa: E402
+    Any,
+    Generator,
+    Generic,
+    Iterable,
+    Optional,
+    Sequence,
+    Tuple,
+    TypeVar,
+)
 
 import httpx  # noqa: E402
 import json_repair  # noqa: E402
@@ -33,6 +44,7 @@
 from jinja2.nodes import TemplateData  # noqa: E402
 from jinja2.runtime import Undefined  # noqa: E402
 from pydantic import BaseModel, ConfigDict, Field  # noqa: E402
+from pydantic.json_schema import SkipJsonSchema  # noqa: E402
 
 from .pdl_ast import (  # noqa: E402
     AdvancedBlockType,
@@ -59,13 +71,19 @@
     ImportBlock,
     IncludeBlock,
     IndependentEnum,
-    IterationType,
+    JoinArray,
+    JoinLastOf,
+    JoinObject,
+    JoinReduce,
+    JoinText,
+    JoinType,
     LastOfBlock,
     LazyMessage,
     LazyMessages,
     LitellmModelBlock,
     LitellmParameters,
     LocalizedExpression,
+    MapBlock,
     MatchBlock,
     MessageBlock,
     ModelBlock,
@@ -131,19 +149,39 @@
 empty_scope: ScopeType = PdlDict({"pdl_context": DependentContext([])})
 
 
+RefT = TypeVar("RefT")
+
+
+class Ref(Generic[RefT]):
+    def __init__(self, ref: RefT):
+        self.ref = ref
+
+
 class InterpreterState(BaseModel):
     model_config = ConfigDict(arbitrary_types_allowed=True)
 
     yield_result: bool = False
+    """Stream the result on the standard output as soon as possible."""
     yield_background: bool = False
+    """Stream the toplevel pdl_context on the standard output as soon as possible."""
     batch: int = 1
-    # batch=0: streaming
-    # batch=1: call to generate with `input`
+    """
+    Stream the output of the LLM
+    - batch=0: streaming
+    - batch=1: call to generate with `input`
+    """
     role: RoleType = "user"
+    """Current role to add messages in the context."""
     cwd: Path = Path.cwd()
-    # background_tasks = {}
+    """Current working directory."""
     id_stack: list[str] = []
+    """Id generator for the UI."""
+
+    # The following are shared variable that should be modified by side effects
     event_loop: AbstractEventLoop = Field(default_factory=create_event_loop_thread)
+    """Event loop to schedule LLM calls."""
+    current_pdl_context: Ref[LazyMessages] = Ref(DependentContext([]))
+    """Current value of the context set at the beginning of the execution of the block."""
 
     def with_yield_result(self: "InterpreterState", b: bool) -> "InterpreterState":
         return self.model_copy(update={"yield_result": b})
@@ -155,17 +193,44 @@ def with_role(self: "InterpreterState", role: RoleType) -> "InterpreterState":
         return self.model_copy(update={"role": role})
 
     def with_id(self: "InterpreterState", n: str) -> "InterpreterState":
-        stack = self.id_stack.copy() if self.id_stack is not None else []
-        stack.append(n)
-        return self.model_copy(update={"id_stack": stack})
+        stack = self.id_stack if self.id_stack is not None else []
+        return self.model_copy(update={"id_stack": stack + [n]})
 
     def with_iter(self: "InterpreterState", i: int) -> "InterpreterState":
         return self.with_id(str(i))
 
     def with_pop(self: "InterpreterState") -> "InterpreterState":
-        stack = self.id_stack.copy() if self.id_stack is not None else []
-        stack.pop()
-        return self.model_copy(update={"id_stack": stack})
+        stack = self.id_stack if self.id_stack is not None else []
+        return self.model_copy(update={"id_stack": stack[:-1]})
+
+
+class ClosureBlock(FunctionBlock):
+    pdl__scope: SkipJsonSchema[Optional[ScopeType]] = Field(repr=False)
+    pdl__state: SkipJsonSchema[InterpreterState] = Field(repr=False)
+
+    def __call__(self, *args, **kwargs):
+        state = self.pdl__state.with_yield_result(False).with_yield_background(False)
+        current_context = state.current_pdl_context.ref
+        if len(args) > 0:
+            keys = self.function.keys() if self.function is not None else {}
+            if len(keys) < len(args):
+                if self.signature is not None and self.signature.get("name", "") != "":
+                    err = f"Too many arguments to the call of {self.signature['name']}"
+                else:
+                    err = "Too many arguments to the call"
+                raise PDLRuntimeExpressionError(
+                    err,
+                    loc=self.pdl__location,
+                    trace=self.model_copy(),
+                )
+            kwargs = dict(zip(keys, args)) | kwargs
+        result, _, _ = execute_call(
+            state, current_context, self, kwargs, self.pdl__location
+        )
+        return result
+
+
+ClosureBlock.model_rebuild()
 
 
 def generate(
@@ -246,6 +311,7 @@ def process_block(
     background: LazyMessages
     trace: BlockType
     try:
+        state.current_pdl_context.ref = scope["pdl_context"]  # type: ignore
         if not isinstance(block, Block):
             start = time.time_ns()
             try:
@@ -377,7 +443,7 @@ def set_error_to_scope_for_retry(
     return scope
 
 
-def process_advanced_block(
+def process_advanced_block(  # noqa:C901
     state: InterpreterState,
     scope: ScopeType,
     block: AdvancedBlockType,
@@ -411,6 +477,28 @@ def process_advanced_block(
             result, background, new_scope, trace = process_block_body(
                 state, scope, block, loc
             )
+            if block.requirements != []:
+                requirements_satisfied = True
+                for req in block.requirements:
+                    evalfn, _ = process_expr(scope, getattr(req, "evaluate"), loc)
+                    evaluation = evalfn(
+                        requirement=getattr(req, "description"), response=result
+                    )
+                    if evaluation.result() is False:
+                        requirements_satisfied = False
+                        transfn, _ = process_expr(
+                            scope, getattr(req, "transformContext"), loc
+                        )
+                        new_context = transfn(
+                            pdl_context=scope["pdl_context"],
+                            requirement=getattr(req, "description"),
+                            response=result,
+                        )
+                        scope = scope | {"pdl_context": new_context}
+                if requirements_satisfied is False:
+                    print("\nTrying again!")
+                    continue
+
             result = lazy_apply(id_with_set_first_use_nanos(block.pdl__timing), result)
             add_done_callback(
                 id_with_set_first_use_nanos(block.pdl__timing), background
@@ -436,7 +524,7 @@ def process_advanced_block(
                 result.result()
             break
         except Exception as exc:
-            err_msg = exc.args[0]
+            err_msg = traceback.format_exc()
             do_retry = (
                 block.retry
                 and trial_idx + 1 < trial_total
@@ -453,6 +541,12 @@ def process_advanced_block(
                 if block.trace_error_on_retry:
                     scope = set_error_to_scope_for_retry(scope, error, block.pdl__id)
                 continue
+            state = init_state.with_yield_result(
+                init_state.yield_result and ContributeTarget.RESULT in block.contribute
+            )
+            state = state.with_yield_background(
+                state.yield_background and context_in_contribute(block)
+            )
             (
                 result,
                 background,
@@ -573,7 +667,7 @@ def process_block_body(
             result, background, scope, trace = process_blocks_of(
                 block,
                 "text",
-                IterationType.TEXT,
+                JoinText(),
                 state,
                 scope,
                 loc,
@@ -582,7 +676,7 @@ def process_block_body(
             result, background, scope, trace = process_blocks_of(
                 block,
                 "lastOf",
-                IterationType.LASTOF,
+                JoinLastOf(as_="lastOf"),  # pyright: ignore
                 state,
                 scope,
                 loc,
@@ -591,7 +685,7 @@ def process_block_body(
             result, background, scope, trace = process_blocks_of(
                 block,
                 "array",
-                IterationType.ARRAY,
+                JoinArray(as_="array"),  # pyright: ignore
                 state,
                 scope,
                 loc,
@@ -610,7 +704,7 @@ def process_block_body(
                         if isinstance(value_blocks, StructuredBlock):
                             context = value_blocks.context
                         value, value_background, scope, value_trace = process_blocks(
-                            IterationType.LASTOF,
+                            JoinLastOf(as_="lastOf"),  # pyright: ignore
                             context,
                             iteration_state,
                             scope,
@@ -647,7 +741,7 @@ def process_block_body(
                 result, background, scope, trace = process_blocks_of(
                     block,
                     "object",
-                    IterationType.OBJECT,
+                    JoinObject(as_="object"),  # pyright: ignore
                     iteration_state,
                     scope,
                     loc,
@@ -773,46 +867,12 @@ def process_block_body(
             background = DependentContext([])
             iter_trace: list[BlockType] = []
             pdl_context_init = scope_init.data["pdl_context"]
-            if block.for_ is None:
-                items = None
-                lengths = None
-            else:
-                items, block = process_expr_of(block, "for_", scope, loc, "for")
-                lengths = []
-                for idx, lst in items.items():
-                    if not isinstance(lst, list):
-                        msg = f"Values inside the For block must be lists but got {type(lst)}."
-                        lst_loc = append(
-                            append(block.pdl__location or empty_block_location, "for"),
-                            idx,
-                        )
-                        raise PDLRuntimeError(
-                            message=msg,
-                            loc=lst_loc,
-                            trace=ErrorBlock(
-                                msg=msg, pdl__location=lst_loc, program=block
-                            ),
-                            fallback=[],
-                        )
-                    lengths.append(len(lst))
-                if len(set(lengths)) != 1:  # Not all the lists are of the same length
-                    msg = "Lists inside the For block must be of the same length."
-                    for_loc = append(block.pdl__location or empty_block_location, "for")
-                    raise PDLRuntimeError(
-                        msg,
-                        loc=for_loc,
-                        trace=ErrorBlock(msg=msg, pdl__location=for_loc, program=block),
-                        fallback=[],
-                    )
             iteration_state = state.with_yield_result(
-                state.yield_result and block.join.as_ == IterationType.TEXT
+                state.yield_result and isinstance(block.join, JoinText)
             )
-            if block.maxIterations is None:
-                max_iterations = None
-            else:
-                max_iterations, block = process_expr_of(
-                    block, "maxIterations", scope, loc
-                )
+            block, items, length = _evaluate_for_field(scope, block, loc)
+            block, max_iterations = _evaluate_max_iterations_field(scope, block, loc)
+            block = _evaluate_join_field(scope, block, loc)
             repeat_loc = append(loc, "repeat")
             iidx = 0
             try:
@@ -823,7 +883,7 @@ def process_block_body(
                         scope = scope | {block.index: iidx}
                     if max_iterations is not None and iidx >= max_iterations:
                         break
-                    if lengths is not None and iidx >= lengths[0]:
+                    if length is not None and iidx >= length:
                         break
                     stay, _ = process_condition_of(block, "while_", scope, loc, "while")
                     if not stay:
@@ -831,9 +891,8 @@ def process_block_body(
                     iteration_state = iteration_state.with_iter(iidx)
                     if first:
                         first = False
-                    elif block.join.as_ == IterationType.TEXT:
+                    elif isinstance(block.join, JoinText):
                         join_string = block.join.with_
-                        results.append(PdlConst(join_string))
                         if iteration_state.yield_result:
                             yield_result(join_string, block.kind)
                         if iteration_state.yield_background:
@@ -867,13 +926,11 @@ def process_block_body(
                         saved_background = DependentContext(
                             [saved_background, iteration_background]
                         )
+                        background = saved_background
                     else:
                         saved_background = IndependentContext(
                             [saved_background, iteration_background]
                         )
-
-                    if block.context is IndependentEnum.DEPENDENT:
-                        background = saved_background
                     results.append(iteration_result)
                     iter_trace.append(body_trace)
                     iteration_state = iteration_state.with_pop()
@@ -889,12 +946,71 @@ def process_block_body(
                     loc=exc.loc or repeat_loc,
                     trace=trace,
                 ) from exc
-            result = combine_results(block.join.as_, results)
+            result = combine_results(block.join, results)
             if block.context is IndependentEnum.INDEPENDENT:
                 background = saved_background
             if state.yield_result and not iteration_state.yield_result:
                 yield_result(result.result(), block.kind)
             trace = block.model_copy(update={"pdl__trace": iter_trace})
+        case MapBlock():
+            background = DependentContext([])
+            iteration_state = state.with_yield_result(False)
+            block, items, length = _evaluate_for_field(scope, block, loc)
+            block, max_iterations = _evaluate_max_iterations_field(scope, block, loc)
+            block = _evaluate_join_field(scope, block, loc)
+            map_loc = append(loc, "map")
+            try:
+                if max_iterations is not None:
+                    index_iterator: Any = range(max_iterations)
+                else:
+                    index_iterator = count()
+                if items is not None and length is not None:
+                    items_iterator = (
+                        {k: elems[i] for k, elems in items.items()}
+                        for i in range(length)
+                    )
+                else:
+                    items_iterator = ({} for _ in count())
+
+                def loop_body(iidx, items):
+                    iteration_scope = scope_init
+                    if block.index is not None:
+                        iteration_scope = iteration_scope | {block.index: iidx}
+                    iteration_scope = iteration_scope | items
+                    return process_block(
+                        iteration_state.with_iter(iidx),
+                        iteration_scope,
+                        block.map,
+                        map_loc,
+                    )
+
+                map_output: Iterable[
+                    Tuple[PdlLazy[Any], LazyMessages, ScopeType, BlockType]
+                ]
+                if block.maxWorkers == 0:
+                    map_output = map(  # pylint: disable=bad-builtin
+                        loop_body, index_iterator, items_iterator
+                    )
+                else:
+                    with ThreadPoolExecutor(block.maxWorkers) as executor:
+                        map_output = executor.map(
+                            loop_body, index_iterator, items_iterator
+                        )
+                results, _, _, traces = _split_map_output(map_output)
+                # saved_background = IndependentContext(backgrounds)
+            except PDLRuntimeError as exc:
+                traces = [exc.pdl__trace]  # type: ignore
+                trace = block.model_copy(update={"pdl__trace": traces})
+                raise PDLRuntimeError(
+                    exc.message,
+                    loc=exc.loc or map_loc,
+                    trace=trace,
+                ) from exc
+            result = combine_results(block.join, results)
+            # background = saved_background  # commented because the block do not contribute to the background
+            if state.yield_result and not iteration_state.yield_result:
+                yield_result(result.result(), block.kind)
+            trace = block.model_copy(update={"pdl__trace": traces})
         case ReadBlock():
             result, background, scope, trace = process_input(state, scope, block, loc)
             if state.yield_result:
@@ -909,7 +1025,23 @@ def process_block_body(
             result, background, scope, trace = process_import(state, scope, block, loc)
 
         case FunctionBlock():
-            closure = block.model_copy()
+            closure = ClosureBlock(  # pyright: ignore
+                description=block.description,
+                spec=block.spec,
+                defs=block.defs,
+                def_=block.def_,  # pyright: ignore
+                contribute=block.contribute,
+                parser=block.parser,
+                fallback=block.fallback,
+                retry=block.retry,
+                trace_error_on_retry=block.trace_error_on_retry,
+                role=block.role,
+                function=block.function,
+                return_=block.return_,  # pyright: ignore
+                pdl__location=loc,
+                pdl__scope=None,
+                pdl__state=state,
+            )
             if block.def_ is not None:
                 scope = scope | {block.def_: closure}
             closure.pdl__scope = scope
@@ -938,6 +1070,90 @@ def process_block_body(
     return result, background, scope, trace
 
 
+def _split_map_output(
+    map_output: Iterable[Tuple[PdlLazy[Any], LazyMessages, ScopeType, BlockType]],
+) -> Tuple[list[PdlLazy[Any]], list[LazyMessages], list[ScopeType], list[BlockType]]:
+    results = []
+    backgrounds = []
+    scopes = []
+    traces = []
+    for result, background, scope, trace in map_output:
+        results.append(result)
+        backgrounds.append(background)
+        scopes.append(scope)
+        traces.append(trace)
+    return results, backgrounds, scopes, traces
+
+
+BlockTVarEvalFor = TypeVar("BlockTVarEvalFor", bound=RepeatBlock | MapBlock)
+
+
+def _evaluate_for_field(
+    scope: ScopeType, block: BlockTVarEvalFor, loc: PdlLocationType
+) -> Tuple[BlockTVarEvalFor, Optional[dict[str, list]], Optional[int]]:
+    if block.for_ is None:
+        items = None
+        length = None
+    else:
+        items, block = process_expr_of(block, "for_", scope, loc, "for")
+        lengths = []
+        for idx, lst in items.items():
+            if not isinstance(lst, list):
+                msg = f"Values inside the For block must be lists but got {type(lst)}."
+                lst_loc = append(
+                    append(block.pdl__location or empty_block_location, "for"),
+                    idx,
+                )
+                raise PDLRuntimeError(
+                    message=msg,
+                    loc=lst_loc,
+                    trace=ErrorBlock(msg=msg, pdl__location=lst_loc, program=block),
+                    fallback=[],
+                )
+            lengths.append(len(lst))
+        if len(set(lengths)) != 1:  # Not all the lists are of the same length
+            msg = "Lists inside the For block must be of the same length."
+            for_loc = append(block.pdl__location or empty_block_location, "for")
+            raise PDLRuntimeError(
+                msg,
+                loc=for_loc,
+                trace=ErrorBlock(msg=msg, pdl__location=for_loc, program=block),
+                fallback=[],
+            )
+        length = lengths[0]
+    return block, items, length
+
+
+BlockTVarEvalMaxIter = TypeVar("BlockTVarEvalMaxIter", bound=RepeatBlock | MapBlock)
+
+
+def _evaluate_max_iterations_field(
+    scope: ScopeType, block: BlockTVarEvalMaxIter, loc: PdlLocationType
+) -> Tuple[BlockTVarEvalMaxIter, Optional[int]]:
+    if block.maxIterations is None:
+        max_iterations = None
+    else:
+        max_iterations, block = process_expr_of(block, "maxIterations", scope, loc)
+    return block, max_iterations
+
+
+BlockTVarEvalJoin = TypeVar("BlockTVarEvalJoin", bound=RepeatBlock | MapBlock)
+
+
+def _evaluate_join_field(
+    scope: ScopeType, block: BlockTVarEvalJoin, loc: PdlLocationType
+) -> BlockTVarEvalJoin:
+    match block.join:
+        case JoinText() | JoinArray() | JoinObject() | JoinLastOf():
+            pass
+        case JoinReduce():
+            loc = append(loc, "reduce")
+            _, expr = process_expr(scope, block.join.reduce, loc)
+            join = block.join.model_copy(update={"reduce": expr})
+            block = block.model_copy(update={"join": join})
+    return block
+
+
 def is_matching(  # pylint: disable=too-many-return-statements
     value: Any, pattern: PatternType, scope: ScopeType
 ) -> Optional[ScopeType]:
@@ -1054,7 +1270,7 @@ def process_block_of(  # pylint: disable=too-many-arguments, too-many-positional
 def process_blocks_of(  # pylint: disable=too-many-arguments, too-many-positional-arguments
     block: BlockTypeTVarProcessBlocksOf,
     field: str,
-    iteration_type: IterationType,
+    join_type: JoinType,
     state: InterpreterState,
     scope: ScopeType,
     loc: PdlLocationType,
@@ -1065,7 +1281,7 @@ def process_blocks_of(  # pylint: disable=too-many-arguments, too-many-positiona
         if isinstance(block, StructuredBlock):
             context = block.context
         result, background, scope, blocks = process_blocks(
-            iteration_type,
+            join_type,
             context,
             state,
             scope,
@@ -1085,7 +1301,7 @@ def process_blocks_of(  # pylint: disable=too-many-arguments, too-many-positiona
 
 
 def process_blocks(  # pylint: disable=too-many-arguments,too-many-positional-arguments
-    iteration_type: IterationType,
+    join_type: JoinType,
     context: IndependentEnum,
     state: InterpreterState,
     scope: ScopeType,
@@ -1100,8 +1316,7 @@ def process_blocks(  # pylint: disable=too-many-arguments,too-many-positional-ar
     if not isinstance(blocks, str) and isinstance(blocks, Sequence):
         # Is a list of blocks
         iteration_state = state.with_yield_result(
-            state.yield_result
-            and (iteration_type in (IterationType.LASTOF, IterationType.TEXT))
+            state.yield_result and isinstance(join_type, (JoinLastOf, JoinText))
         )
         new_loc = None
         background = DependentContext([])
@@ -1115,7 +1330,7 @@ def process_blocks(  # pylint: disable=too-many-arguments,too-many-positional-ar
                     "pdl_context": DependentContext([pdl_context_init, background])
                 }
                 new_loc = append(loc, "[" + str(i) + "]")
-                if iteration_type == IterationType.LASTOF and state.yield_result:
+                if isinstance(join_type, JoinLastOf) and state.yield_result:
                     iteration_state = state.with_yield_result(i + 1 == len(blocks))
                 (
                     iteration_result,
@@ -1146,35 +1361,46 @@ def process_blocks(  # pylint: disable=too-many-arguments,too-many-positional-ar
             ) from exc
     else:
         iteration_state = state.with_yield_result(
-            state.yield_result and iteration_type != IterationType.ARRAY
+            state.yield_result and not isinstance(join_type, JoinArray)
         )
         block_result, background, scope, trace = process_block(
             iteration_state, scope, blocks, loc
         )
         results.append(block_result)
-    result = combine_results(iteration_type, results)
+    result = combine_results(join_type, results)
     if state.yield_result and not iteration_state.yield_result:
         yield_result(result, block_kind)
     return result, background, scope, trace
 
 
-def combine_results(iteration_type: IterationType, results: list[PdlLazy[Any]]):
+def combine_results(join_type: JoinType, results: list[PdlLazy[Any]]):
     result: Any
-    match iteration_type:
-        case IterationType.ARRAY:
+    match join_type:
+        case JoinArray():
             result = PdlList(results)
-        case IterationType.OBJECT:
+        case JoinObject():
             result = PdlDict({})
             for d in results:
                 result = result | d
-        case IterationType.LASTOF:
+        case JoinLastOf():
             if len(results) > 0:
                 result = results[-1]
             else:
                 result = None
-        case IterationType.TEXT:
+        case JoinText():
+            join_str = join_type.with_
             result = lazy_apply(
-                (lambda _: "".join([stringify(r.result()) for r in results])),
+                (lambda _: join_str.join([stringify(r.result()) for r in results])),
+                PdlConst(()),
+            )
+        case JoinReduce():
+            result = lazy_apply(
+                (
+                    lambda _: reduce(
+                        value_of_expr(join_type.reduce),
+                        [r.result() for r in results],
+                    )
+                ),
                 PdlConst(()),
             )
         case _:
@@ -1866,7 +2092,7 @@ def process_call(
     background: LazyMessages = DependentContext([])
     args, block = process_expr_of(block, "args", scope, loc)
     closure, _ = process_expr_of(block, "call", scope, loc)
-    if not isinstance(closure, FunctionBlock):
+    if not isinstance(closure, ClosureBlock):
         msg = f"Type error: {block.call} is of type {type(closure)} but should be a function."
         if isinstance(closure, str) and isinstance(scope.get(closure), FunctionBlock):
             msg += " You might want to call `${ " + str(block.call) + " }`."
@@ -1884,12 +2110,28 @@ def process_call(
             loc=args_loc,
             trace=block.model_copy(),
         )
+    current_context = scope.data["pdl_context"]
+    try:
+        result, background, call_trace = execute_call(
+            state, current_context, closure, args, loc
+        )
+    except PDLRuntimeError as exc:
+        raise PDLRuntimeError(
+            exc.message,
+            loc=exc.loc or closure.pdl__location,
+            trace=block.model_copy(update={"pdl__trace": exc.pdl__trace}),
+        ) from exc
+    trace = block.model_copy(update={"pdl__trace": call_trace})
+    return result, background, scope, trace
+
+
+def execute_call(state, current_context, closure, args, loc):
     if "pdl_context" in args:
-        args["pdl_context"] = deserialize(args["pdl_context"])
+        args = args | {"pdl_context": deserialize(args["pdl_context"])}
     f_body = closure.return_
     f_scope = (
         (closure.pdl__scope or PdlDict({}))
-        | PdlDict({"pdl_context": scope.data["pdl_context"]})
+        | PdlDict({"pdl_context": current_context})
         | PdlDict((args or {}))
     )
     if closure.pdl__location is not None:
@@ -1900,27 +2142,19 @@ def process_call(
         )
     else:
         fun_loc = empty_block_location
-    try:
-        result, background, _, f_trace = process_block(state, f_scope, f_body, fun_loc)
-    except PDLRuntimeError as exc:
-        raise PDLRuntimeError(
-            exc.message,
-            loc=exc.loc or fun_loc,
-            trace=block.model_copy(update={"pdl__trace": exc.pdl__trace}),
-        ) from exc
-    trace = block.model_copy(update={"pdl__trace": f_trace})
+    result, background, _, f_trace = process_block(state, f_scope, f_body, fun_loc)
     if closure.spec is not None:
         result = lazy_apply(
             lambda r: result_with_type_checking(
                 r,
                 closure.spec,
-                f"Type errors in result of function call to {block.call}:",
-                loc,
-                trace,
+                f"Type errors in result of the function{' ' + closure.signature.get('name', '') if closure.signature is not None else ''}:",
+                fun_loc,
+                f_trace,
             ),
             result,
         )
-    return result, background, scope, trace
+    return result, background, f_trace
 
 
 def process_input(
@@ -2046,6 +2280,10 @@ def parse_result(parser: ParserType, text: str) -> JSONReturnType:
     match parser:
         case "json":
             try:
+                if text == "False":
+                    return json.loads("false")
+                if text == "True":
+                    return json.loads("true")
                 result = json_repair.loads(text)  # type: ignore[reportAssignmentType]
             except Exception as exc:
                 raise PDLRuntimeParserError(
diff --git a/src/pdl/pdl_lazy.py b/src/pdl/pdl_lazy.py
index cf901aac1..fe14eda7a 100644
--- a/src/pdl/pdl_lazy.py
+++ b/src/pdl/pdl_lazy.py
@@ -156,12 +156,6 @@ def __init__(
 
     @property
     def data(self):
-        return self.result()
-
-    def __repr__(self):
-        return self.result().__repr__()
-
-    def result(self) -> ApplyOutputT:
         if self._done:
             return self._data
         v = self.x.result()
@@ -169,6 +163,17 @@ def result(self) -> ApplyOutputT:
         self._done = True
         return self._data
 
+    def __repr__(self):
+        return self.result().__repr__()
+
+    def result(self) -> ApplyOutputT:
+        data = self.data
+        if isinstance(data, PdlLazy):
+            result = data.result()
+        else:
+            result = data
+        return result  # pyright: ignore
+
 
 LazyApplyInputT = TypeVar("LazyApplyInputT")
 LazyApplyOutputT = TypeVar("LazyApplyOutputT")
@@ -192,20 +197,14 @@ def __init__(
         x1: PdlLazy[Apply2Input1T],
         x2: PdlLazy[Apply2Input2T],
     ):
-        self._data: Apply2OutputT
+        self._data: Apply2OutputT | PdlLazy[Apply2OutputT]
         self.f = f
         self.x1 = x1
         self.x2 = x2
         self._done = False
 
     @property
-    def data(self):
-        return self.result()
-
-    def __repr__(self):
-        return self.result().__repr__()
-
-    def result(self) -> Apply2OutputT:
+    def data(self) -> Apply2OutputT | PdlLazy[Apply2OutputT]:
         if self._done:
             return self._data
         if isinstance(self.x1, PdlLazy):
@@ -220,6 +219,17 @@ def result(self) -> Apply2OutputT:
         self._done = True
         return self._data
 
+    def __repr__(self):
+        return self.result().__repr__()
+
+    def result(self) -> Apply2OutputT:
+        data = self.data
+        if isinstance(data, PdlLazy):
+            result = data.result()
+        else:
+            result = data
+        return result  # pyright: ignore
+
 
 LazyApply2Input1T = TypeVar("LazyApply2Input1T")  # pylint: disable=invalid-name
 LazyApply2Input2T = TypeVar("LazyApply2Input2T")  # pylint: disable=invalid-name
diff --git a/src/pdl/pdl_llms.py b/src/pdl/pdl_llms.py
index ec78c1272..54d4ca401 100644
--- a/src/pdl/pdl_llms.py
+++ b/src/pdl/pdl_llms.py
@@ -17,7 +17,7 @@
 )
 from .pdl_lazy import PdlConst, PdlLazy, lazy_apply
 from .pdl_schema_utils import pdltype_to_jsonschema
-from .pdl_utils import remove_none_values_from_message
+from .pdl_utils import message_post_processing
 
 # Load environment variables
 load_dotenv()
@@ -47,7 +47,7 @@ async def async_generate_text(
             if msg.role is None:
                 msg.role = "assistant"
             return (
-                remove_none_values_from_message(msg.json()),
+                message_post_processing(msg.json()),
                 response.json(),  # pyright: ignore
             )
         except httpx.RequestError as exc:
@@ -161,7 +161,7 @@ def generate_text_stream(
             msg = chunk.choices[0].delta  # pyright: ignore
             if msg.role is None:
                 msg.role = "assistant"
-            yield remove_none_values_from_message(msg.model_dump())
+            yield message_post_processing(msg.model_dump())
         return result
 
 
diff --git a/src/pdl/pdl_parser.py b/src/pdl/pdl_parser.py
index 3752b36f3..201e5db79 100644
--- a/src/pdl/pdl_parser.py
+++ b/src/pdl/pdl_parser.py
@@ -139,6 +139,11 @@ def parse_dict(
 #             if block.pdl__trace is not None:
 #                 for trace in block.pdl__trace:
 #                     iter_blocks(f, trace)
+#         case MapBlock():
+#             iter_blocks(f, block.map)
+#             if block.pdl__trace is not None:
+#                 for trace in block.pdl__trace:
+#                     iter_blocks(f, trace)
 #         case ErrorBlock():
 #             iter_blocks(f, block.program)
 #         case ReadBlock():
diff --git a/src/pdl/pdl_scheduler.py b/src/pdl/pdl_scheduler.py
index 5e126ae7f..04e725476 100644
--- a/src/pdl/pdl_scheduler.py
+++ b/src/pdl/pdl_scheduler.py
@@ -51,6 +51,8 @@ def color_of(kind: BlockKind):
             color = None
         case BlockKind.REPEAT:
             color = None
+        case BlockKind.MAP:
+            color = None
         case BlockKind.READ:
             color = None
         case BlockKind.INCLUDE:
diff --git a/src/pdl/pdl_schema_error_analyzer.py b/src/pdl/pdl_schema_error_analyzer.py
index 93f207b24..9b9076159 100644
--- a/src/pdl/pdl_schema_error_analyzer.py
+++ b/src/pdl/pdl_schema_error_analyzer.py
@@ -156,6 +156,13 @@ def analyze_errors(defs, schema, data, loc: PdlLocationType) -> list[str]:  # no
                     the_type_exists = True
                 if "enum" in item and data in item["enum"]:
                     the_type_exists = True
+                if "$ref" in item:
+                    ref_string = item["$ref"].split("/")[2]
+                    ref_type = defs[ref_string]
+                    errs = analyze_errors(defs, ref_type, data, loc)
+                    the_type_exists = len(errs) == 0
+                if the_type_exists:
+                    break
             if not the_type_exists:
                 ret.append(
                     get_loc_string(loc)
diff --git a/src/pdl/pdl_utils.py b/src/pdl/pdl_utils.py
index 59afcef39..3d8909d5f 100644
--- a/src/pdl/pdl_utils.py
+++ b/src/pdl/pdl_utils.py
@@ -108,16 +108,23 @@ def get_contribute_value(
     return None
 
 
-def remove_none_values_from_message(message: dict) -> dict[str, Any]:
+def message_post_processing(message: dict) -> dict[str, Any]:
     ret = {}
     for key, value in message.items():
-        if key == "content":
+        if key == "content" and value is not None:
+            ret[key] = value
+        elif (
+            key == "reasoning_content" and value is not None
+        ):  # TODO: replacing reasoning_content with content here
+            key = "content"
             ret[key] = value
         if value is not None:
             if isinstance(value, dict):
-                ret[key] = remove_none_values_from_message(value)
+                ret[key] = message_post_processing(value)
             else:
                 ret[key] = value
+    if "content" not in ret:
+        ret["content"] = ""
     return ret
 
 
diff --git a/tests/results/examples/demo/9-react.0.result b/tests/results/examples/demo/9-react.0.result
index 679bcf2cd..040d4961f 100644
--- a/tests/results/examples/demo/9-react.0.result
+++ b/tests/results/examples/demo/9-react.0.result
@@ -11,4 +11,4 @@ Action:
 Observation: 460
 Henry Hudson was born around 1565, so he was approximately 460 years ago.Action:
 [{"name": "Finish", "arguments": {"topic": "460"}}]
-Observation: 
+Observation: 460
diff --git a/tests/results/examples/demo/9-react.1.result b/tests/results/examples/demo/9-react.1.result
index a670f1757..d544ecc82 100644
--- a/tests/results/examples/demo/9-react.1.result
+++ b/tests/results/examples/demo/9-react.1.result
@@ -21,4 +21,4 @@ Action:
 Observation: 460
 In the year 2025, it would be approximately 460 years ago that Henry Hudson was born.Action:
 [{"name": "Finish", "arguments": {"topic": "460"}}]
-Observation: 
+Observation: 460
diff --git a/tests/results/examples/demo/9-react.2.result b/tests/results/examples/demo/9-react.2.result
index 14c95d61f..592094826 100644
--- a/tests/results/examples/demo/9-react.2.result
+++ b/tests/results/examples/demo/9-react.2.result
@@ -23,4 +23,4 @@ Action:
 Observation: 460
 In the year 2025, it would be approximately 460 years ago that Henry Hudson was born.Action:
 [{"name": "Finish", "arguments": {"topic": "460"}}]
-Observation: 
\ No newline at end of file
+Observation: 460
\ No newline at end of file
diff --git a/tests/results/examples/demo/9-react.3.result b/tests/results/examples/demo/9-react.3.result
index a670f1757..d544ecc82 100644
--- a/tests/results/examples/demo/9-react.3.result
+++ b/tests/results/examples/demo/9-react.3.result
@@ -21,4 +21,4 @@ Action:
 Observation: 460
 In the year 2025, it would be approximately 460 years ago that Henry Hudson was born.Action:
 [{"name": "Finish", "arguments": {"topic": "460"}}]
-Observation: 
+Observation: 460
diff --git a/tests/results/examples/demo/9-react.4.result b/tests/results/examples/demo/9-react.4.result
index 679bcf2cd..040d4961f 100644
--- a/tests/results/examples/demo/9-react.4.result
+++ b/tests/results/examples/demo/9-react.4.result
@@ -11,4 +11,4 @@ Action:
 Observation: 460
 Henry Hudson was born around 1565, so he was approximately 460 years ago.Action:
 [{"name": "Finish", "arguments": {"topic": "460"}}]
-Observation: 
+Observation: 460
diff --git a/tests/results/examples/demo/9-react.5.result b/tests/results/examples/demo/9-react.5.result
index 279b584af..4f4a4e534 100644
--- a/tests/results/examples/demo/9-react.5.result
+++ b/tests/results/examples/demo/9-react.5.result
@@ -10,4 +10,4 @@ Henry Hudson was born around 1565. As of 2025, it has been approximately 470 yea
 Observation: 460
 Henry Hudson was born around 1565, which means he was born approximately 460 years ago as of 2025.Action:
 [{"name": "Finish", "arguments": {"topic": ""}}]
-Observation: 
\ No newline at end of file
+Observation: 460
\ No newline at end of file
diff --git a/tests/results/examples/demo/9-react.6.result b/tests/results/examples/demo/9-react.6.result
index ebce142c0..469ab46c5 100644
--- a/tests/results/examples/demo/9-react.6.result
+++ b/tests/results/examples/demo/9-react.6.result
@@ -12,4 +12,4 @@ Henry Hudson was born around 1565. As of 2025, it has been approximately 470 yea
 Observation: 460
 It has been approximately 460 years since Henry Hudson was born.Action:
 [{"name": "Finish", "arguments": {"topic": "460"}}]
-Observation: 
+Observation: 460
diff --git a/tests/results/examples/demo/9-react.7.result b/tests/results/examples/demo/9-react.7.result
new file mode 100644
index 000000000..f9520b25c
--- /dev/null
+++ b/tests/results/examples/demo/9-react.7.result
@@ -0,0 +1,13 @@
+How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025. When searching for a birthday for a person, simply ask for the name of that person.
+Thought: I need to find out who discovered the Hudson River and then calculate how many years ago they were born based on the current year, 2025.
+Action:
+[{"name": "Search", "arguments": {"topic": "Henry Hudson"}}]
+Observation: Henry Hudson (c. 1565 – disappeared 23 June 1611) was an English sea explorer and navigator during the early 17th century, best known for his explorations of present-day Canada and parts of the Northeastern United States.
+In 1607 and 1608, Hudson made two attempts on behalf of English merchants to find a rumoured Northeast Passage to Cathay via a route above the Arctic Circle. In 1609, he landed in North America on behalf of the Dutch East India Company and explored the region around the modern New York metropolitan area. Looking for a Northwest Passage to Asia on his ship Halve Maen ("Half Moon"), he sailed up the Hudson River, which was later named after him, and thereby laid the foundation for Dutch colonization of the region. His contributions to the exploration of the New World were significant and lasting. His voyages helped to establish European contact with the native peoples of North America and contributed to the development of trade and commerce. 
+On his final expedition, while still searching for the Northwest Passage, Hudson became the first European to see Hudson Strait and the immense Hudson Bay. In 1611, after wintering on the shore of James Bay, Hudson wanted to press on to the west, but most of his crew mutinied. The mutineers cast Hudson, his son, and six others adrift; what then happened to the Hudsons and their companions is unknown.
+Henry Hudson was born around 1565. As of 2025, it has been approximately 470 years since Henry Hudson's birth.Action:
+[{"name": "Calc", "arguments": {"expr": "2025 - 1565"}}]
+Observation: 460
+It has been approximately 460 years since Henry Hudson was born.Action:
+[{"name": "Finish", "arguments": {"topic": "460"}}]
+Observation: 460
diff --git a/tests/results/examples/demo/9-react.8.result b/tests/results/examples/demo/9-react.8.result
new file mode 100644
index 000000000..a715aadda
--- /dev/null
+++ b/tests/results/examples/demo/9-react.8.result
@@ -0,0 +1,15 @@
+How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025. When searching for a birthday for a person, simply ask for the name of that person.
+Thought: I need to find out who discovered the Hudson River and then calculate how many years ago they were born based on the current year, 2025.
+Action:
+[{"name": "Search", "arguments": {"topic": "Henry Hudson"}}]
+Observation: Henry Hudson (c. 1565 – disappeared 23 June 1611) was an English sea explorer and navigator during the early 17th century, best known for his explorations of present-day Canada and parts of the Northeastern United States.
+In 1607 and 1608, Hudson made two attempts on behalf of English merchants to find a rumoured Northeast Passage to Cathay via a route above the Arctic Circle. In 1609, he landed in North America on behalf of the Dutch East India Company and explored the region around the modern New York metropolitan area. Looking for a Northwest Passage to Asia on his ship Halve Maen ("Half Moon"), he sailed up the Hudson River, which was later named after him, and thereby laid the foundation for Dutch colonization of the region. His contributions to the exploration of the New World were significant and lasting. His voyages helped to establish European contact with the native peoples of North America and contributed to the development of trade and commerce. 
+On his final expedition, while still searching for the Northwest Passage, Hudson became the first European to see Hudson Strait and the immense Hudson Bay. In 1611, after wintering on the shore of James Bay, Hudson wanted to press on to the west, but most of his crew mutinied. The mutineers cast Hudson, his son, and six others adrift; what then happened to the Hudsons and their companions is unknown.
+
+
+Henry Hudson was born around 1565. As of 2025, it has been approximately 470 years since Henry Hudson's birth.Action:
+[{"name": "Calc", "arguments": {"expr": "2025 - 1565"}}]
+Observation: 460
+Henry Hudson was born around 1565, so in 2025, it has been approximately 460 years since his birth.Action:
+[{"name": "Finish", "arguments": {"topic": "460"}}]
+Observation: 460
diff --git a/tests/results/examples/demos/react.0.result b/tests/results/examples/demos/react.0.result
index 279b584af..4f4a4e534 100644
--- a/tests/results/examples/demos/react.0.result
+++ b/tests/results/examples/demos/react.0.result
@@ -10,4 +10,4 @@ Henry Hudson was born around 1565. As of 2025, it has been approximately 470 yea
 Observation: 460
 Henry Hudson was born around 1565, which means he was born approximately 460 years ago as of 2025.Action:
 [{"name": "Finish", "arguments": {"topic": ""}}]
-Observation: 
\ No newline at end of file
+Observation: 460
\ No newline at end of file
diff --git a/tests/results/examples/demos/react.1.result b/tests/results/examples/demos/react.1.result
index ec6f7668e..b171b1896 100644
--- a/tests/results/examples/demos/react.1.result
+++ b/tests/results/examples/demos/react.1.result
@@ -1,15 +1,16 @@
- How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025. When searching for a birthday for a person, simply ask for the name of that person.
-Thought: I need to find out who discovered the Hudson River and then calculate how many years ago they were born based on the current year, 2025.
+How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025. When searching for a birthday for a person, simply ask for the name of that person.
+Thought: I need to search who discovered the Hudson River.
 Action:
 [{"name": "Search", "arguments": {"topic": "Henry Hudson"}}]
 Observation: Henry Hudson (c. 1565 – disappeared 23 June 1611) was an English sea explorer and navigator during the early 17th century, best known for his explorations of present-day Canada and parts of the Northeastern United States.
 In 1607 and 1608, Hudson made two attempts on behalf of English merchants to find a rumoured Northeast Passage to Cathay via a route above the Arctic Circle. In 1609, he landed in North America on behalf of the Dutch East India Company and explored the region around the modern New York metropolitan area. Looking for a Northwest Passage to Asia on his ship Halve Maen ("Half Moon"), he sailed up the Hudson River, which was later named after him, and thereby laid the foundation for Dutch colonization of the region. His contributions to the exploration of the New World were significant and lasting. His voyages helped to establish European contact with the native peoples of North America and contributed to the development of trade and commerce. 
 On his final expedition, while still searching for the Northwest Passage, Hudson became the first European to see Hudson Strait and the immense Hudson Bay. In 1611, after wintering on the shore of James Bay, Hudson wanted to press on to the west, but most of his crew mutinied. The mutineers cast Hudson, his son, and six others adrift; what then happened to the Hudsons and their companions is unknown.
-
-
-Henry Hudson was born around 1565. As of 2025, it has been approximately 470 years since Henry Hudson's birth.Action:
+Thought: Henry Hudson was born around 1565. To find out how many years ago he was born from the year 2025, we subtract 2025 from 1565.
+Calculation: 2025 - 1565 = 460
+Action:
 [{"name": "Calc", "arguments": {"expr": "2025 - 1565"}}]
 Observation: 460
-It has been approximately 460 years since Henry Hudson was born.Action:
+Henry Hudson was born around 460 years before 2025.Action:
 [{"name": "Finish", "arguments": {"topic": "460"}}]
-Observation: 
+Observation: 460
+
diff --git a/tests/results/examples/demos/react.2.result b/tests/results/examples/demos/react.2.result
new file mode 100644
index 000000000..f9520b25c
--- /dev/null
+++ b/tests/results/examples/demos/react.2.result
@@ -0,0 +1,13 @@
+How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025. When searching for a birthday for a person, simply ask for the name of that person.
+Thought: I need to find out who discovered the Hudson River and then calculate how many years ago they were born based on the current year, 2025.
+Action:
+[{"name": "Search", "arguments": {"topic": "Henry Hudson"}}]
+Observation: Henry Hudson (c. 1565 – disappeared 23 June 1611) was an English sea explorer and navigator during the early 17th century, best known for his explorations of present-day Canada and parts of the Northeastern United States.
+In 1607 and 1608, Hudson made two attempts on behalf of English merchants to find a rumoured Northeast Passage to Cathay via a route above the Arctic Circle. In 1609, he landed in North America on behalf of the Dutch East India Company and explored the region around the modern New York metropolitan area. Looking for a Northwest Passage to Asia on his ship Halve Maen ("Half Moon"), he sailed up the Hudson River, which was later named after him, and thereby laid the foundation for Dutch colonization of the region. His contributions to the exploration of the New World were significant and lasting. His voyages helped to establish European contact with the native peoples of North America and contributed to the development of trade and commerce. 
+On his final expedition, while still searching for the Northwest Passage, Hudson became the first European to see Hudson Strait and the immense Hudson Bay. In 1611, after wintering on the shore of James Bay, Hudson wanted to press on to the west, but most of his crew mutinied. The mutineers cast Hudson, his son, and six others adrift; what then happened to the Hudsons and their companions is unknown.
+Henry Hudson was born around 1565. As of 2025, it has been approximately 470 years since Henry Hudson's birth.Action:
+[{"name": "Calc", "arguments": {"expr": "2025 - 1565"}}]
+Observation: 460
+It has been approximately 460 years since Henry Hudson was born.Action:
+[{"name": "Finish", "arguments": {"topic": "460"}}]
+Observation: 460
diff --git a/tests/results/examples/demos/react.3.result b/tests/results/examples/demos/react.3.result
new file mode 100644
index 000000000..a4c21f3c9
--- /dev/null
+++ b/tests/results/examples/demos/react.3.result
@@ -0,0 +1,16 @@
+How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025. When searching for a birthday for a person, simply ask for the name of that person.
+Thought: I need to search who discovered the Hudson River.
+Action:
+[{"name": "Search", "arguments": {"topic": "Henry Hudson"}}]
+Observation: Henry Hudson (c. 1565 – disappeared 23 June 1611) was an English sea explorer and navigator during the early 17th century, best known for his explorations of present-day Canada and parts of the Northeastern United States.
+In 1607 and 1608, Hudson made two attempts on behalf of English merchants to find a rumoured Northeast Passage to Cathay via a route above the Arctic Circle. In 1609, he landed in North America on behalf of the Dutch East India Company and explored the region around the modern New York metropolitan area. Looking for a Northwest Passage to Asia on his ship Halve Maen ("Half Moon"), he sailed up the Hudson River, which was later named after him, and thereby laid the foundation for Dutch colonization of the region. His contributions to the exploration of the New World were significant and lasting. His voyages helped to establish European contact with the native peoples of North America and contributed to the development of trade and commerce. 
+On his final expedition, while still searching for the Northwest Passage, Hudson became the first European to see Hudson Strait and the immense Hudson Bay. In 1611, after wintering on the shore of James Bay, Hudson wanted to press on to the west, but most of his crew mutinied. The mutineers cast Hudson, his son, and six others adrift; what then happened to the Hudsons and their companions is unknown.
+Thought: Henry Hudson was born around 1565. To find out how many years ago he was born from the year 2025, we subtract 2025 from 1565.
+Calculation: 2025 - 1565 = 460
+Action:
+[{"name": "Calc", "arguments": {"expr": "2025 - 1565"}}]
+Observation: 460
+Henry Hudson was born around 460 years before 2025.Action:
+[{"name": "Finish", "arguments": {"topic": "460"}}]
+Observation: 
+
diff --git a/tests/results/examples/demos/react.4.result b/tests/results/examples/demos/react.4.result
new file mode 100644
index 000000000..469ab46c5
--- /dev/null
+++ b/tests/results/examples/demos/react.4.result
@@ -0,0 +1,15 @@
+How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025. When searching for a birthday for a person, simply ask for the name of that person.
+Thought: I need to find out who discovered the Hudson River and then calculate how many years ago they were born based on the current year, 2025.
+Action:
+[{"name": "Search", "arguments": {"topic": "Henry Hudson"}}]
+Observation: Henry Hudson (c. 1565 – disappeared 23 June 1611) was an English sea explorer and navigator during the early 17th century, best known for his explorations of present-day Canada and parts of the Northeastern United States.
+In 1607 and 1608, Hudson made two attempts on behalf of English merchants to find a rumoured Northeast Passage to Cathay via a route above the Arctic Circle. In 1609, he landed in North America on behalf of the Dutch East India Company and explored the region around the modern New York metropolitan area. Looking for a Northwest Passage to Asia on his ship Halve Maen ("Half Moon"), he sailed up the Hudson River, which was later named after him, and thereby laid the foundation for Dutch colonization of the region. His contributions to the exploration of the New World were significant and lasting. His voyages helped to establish European contact with the native peoples of North America and contributed to the development of trade and commerce. 
+On his final expedition, while still searching for the Northwest Passage, Hudson became the first European to see Hudson Strait and the immense Hudson Bay. In 1611, after wintering on the shore of James Bay, Hudson wanted to press on to the west, but most of his crew mutinied. The mutineers cast Hudson, his son, and six others adrift; what then happened to the Hudsons and their companions is unknown.
+
+
+Henry Hudson was born around 1565. As of 2025, it has been approximately 470 years since Henry Hudson's birth.Action:
+[{"name": "Calc", "arguments": {"expr": "2025 - 1565"}}]
+Observation: 460
+It has been approximately 460 years since Henry Hudson was born.Action:
+[{"name": "Finish", "arguments": {"topic": "460"}}]
+Observation: 460
diff --git a/tests/results/examples/map-reduce/python-reduce.0.result b/tests/results/examples/map-reduce/python-reduce.0.result
new file mode 100644
index 000000000..9a037142a
--- /dev/null
+++ b/tests/results/examples/map-reduce/python-reduce.0.result
@@ -0,0 +1 @@
+10
\ No newline at end of file
diff --git a/tests/results/examples/map-reduce/reduce.0.result b/tests/results/examples/map-reduce/reduce.0.result
new file mode 100644
index 000000000..9a037142a
--- /dev/null
+++ b/tests/results/examples/map-reduce/reduce.0.result
@@ -0,0 +1 @@
+10
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/calling_llm_chaining.0.result b/tests/results/examples/tutorial/calling_llm_chaining.0.result
index 241d9a74f..ac37482be 100644
--- a/tests/results/examples/tutorial/calling_llm_chaining.0.result
+++ b/tests/results/examples/tutorial/calling_llm_chaining.0.result
@@ -1,4 +1,4 @@
 Hello
 Hello
-Did you just say Hello?
-Yes, I did. It's a common greeting, similar to how humans might respond when they first interact with an artificial intelligence like me. How can I assist you today?
\ No newline at end of file
+Translate the above to French
+Bonjour
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/calling_llm_chaining.1.result b/tests/results/examples/tutorial/calling_llm_chaining.1.result
deleted file mode 100644
index ac37482be..000000000
--- a/tests/results/examples/tutorial/calling_llm_chaining.1.result
+++ /dev/null
@@ -1,4 +0,0 @@
-Hello
-Hello
-Translate the above to French
-Bonjour
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/calling_llm_with_input_messages_var.0.result b/tests/results/examples/tutorial/calling_llm_with_input_messages_var.0.result
index d2307e4f4..218c1c505 100644
--- a/tests/results/examples/tutorial/calling_llm_with_input_messages_var.0.result
+++ b/tests/results/examples/tutorial/calling_llm_with_input_messages_var.0.result
@@ -1,47 +1,2 @@
-Here is a Python implementation of the Merge Sort algorithm:
-
-```python
-def merge_sort(arr):
-    # Base case: if array has 1 or no elements, it's already sorted
-    if len(arr) <= 1:
-        return arr
-
-    # Divide the array into two halves
-    mid = len(arr) // 2
-    left_half = arr[:mid]
-    right_half = arr[mid:]
-
-    # Recursively sort both halves
-    left_sorted = merge_sort(left_half)
-    right_sorted = merge_sort(right_half)
-
-    # Merge the sorted halves back together
-    return merge(left_sorted, right_sorted)
-
-def merge(left, right):
-    """
-    Merge two sorted lists into a single sorted list.
-    """
-    merged = []  # Initialize an empty list for the result
-    left_index = 0  # Index for the left list
-    right_index = 0  # Index for the right list
-
-    # Continue until we've exhausted both lists
-    while left_index < len(left) and right_index < len(right):
-        if left[left_index] <= right[right_index]:
-            merged.append(left[left_index])
-            left_index += 1
-        else:
-            merged.append(right[right_index])
-            right_index += 1
-
-    # If there are any remaining elements in either list, append them to the result
-    merged.extend(left[left_index:])
-    merged.extend(right[right_index:])
-
-    return merged
-```
-
-This code first checks if the array is already sorted (i.e., has one or zero elements). If so, it returns the array as is. Otherwise, it divides the array into two halves and recursively sorts each half. The `merge` function then combines these sorted halves back together to produce a single sorted list.
-
-The time complexity of Merge Sort is O(n log n) for all cases (best, average, worst), making it efficient even for large lists.
\ No newline at end of file
+Hello
+The translation of 'Hello' into French is 'Bonjour'.
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/calling_llm_with_input_messages_var.1.result b/tests/results/examples/tutorial/calling_llm_with_input_messages_var.1.result
deleted file mode 100644
index 150ac5d58..000000000
--- a/tests/results/examples/tutorial/calling_llm_with_input_messages_var.1.result
+++ /dev/null
@@ -1,53 +0,0 @@
-Here is a Python implementation of the Merge Sort algorithm:
-
-```python
-def merge_sort(arr):
-    # Base case: if array has 1 or no elements, it's already sorted
-    if len(arr) <= 1:
-        return arr
-
-    # Divide the array into two halves
-    mid = len(arr) // 2
-    left_half = arr[:mid]
-    right_half = arr[mid:]
-
-    # Recursively sort both halves
-    left_sorted = merge_sort(left_half)
-    right_sorted = merge_sort(right_half)
-
-    # Merge the sorted halves back together
-    return merge(left_sorted, right_sorted)
-
-def merge(left, right):
-    """
-    Merge two sorted arrays into one sorted array.
-    """
-    merged = []  # Initialize an empty list for the result
-    left_index = 0  # Index for left array
-    right_index = 0  # Index for right array
-
-    # Continue until we've processed all elements in both lists
-    while left_index < len(left) and right_index < len(right):
-        if left[left_index] <= right[right_index]:
-            merged.append(left[left_index])
-            left_index += 1
-        else:
-            merged.append(right[right_index])
-            right_index += 1
-
-    # If there are any remaining elements in either list, append them to the result
-    merged.extend(left[left_index:])
-    merged.extend(right[right_index:])
-
-    return merged
-```
-
-This code first checks if the array is already sorted (i.e., has one or no elements). If not, it divides the array into two halves and recursively sorts them. Then, it merges these sorted halves back together using a helper function `merge()`. The merging process compares elements from both halves and adds the smaller element to the result list until all elements are processed.
-
-You can use this function like so:
-
-```python
-arr = [38, 27, 43, 3, 9, 82, 10]
-sorted_arr = merge_sort(arr)
-print(sorted_arr)  # Outputs: [3, 9, 10, 27, 38, 43, 82]
-```
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/calling_llm_with_input_messages_var.2.result b/tests/results/examples/tutorial/calling_llm_with_input_messages_var.2.result
deleted file mode 100644
index d2307e4f4..000000000
--- a/tests/results/examples/tutorial/calling_llm_with_input_messages_var.2.result
+++ /dev/null
@@ -1,47 +0,0 @@
-Here is a Python implementation of the Merge Sort algorithm:
-
-```python
-def merge_sort(arr):
-    # Base case: if array has 1 or no elements, it's already sorted
-    if len(arr) <= 1:
-        return arr
-
-    # Divide the array into two halves
-    mid = len(arr) // 2
-    left_half = arr[:mid]
-    right_half = arr[mid:]
-
-    # Recursively sort both halves
-    left_sorted = merge_sort(left_half)
-    right_sorted = merge_sort(right_half)
-
-    # Merge the sorted halves back together
-    return merge(left_sorted, right_sorted)
-
-def merge(left, right):
-    """
-    Merge two sorted lists into a single sorted list.
-    """
-    merged = []  # Initialize an empty list for the result
-    left_index = 0  # Index for the left list
-    right_index = 0  # Index for the right list
-
-    # Continue until we've exhausted both lists
-    while left_index < len(left) and right_index < len(right):
-        if left[left_index] <= right[right_index]:
-            merged.append(left[left_index])
-            left_index += 1
-        else:
-            merged.append(right[right_index])
-            right_index += 1
-
-    # If there are any remaining elements in either list, append them to the result
-    merged.extend(left[left_index:])
-    merged.extend(right[right_index:])
-
-    return merged
-```
-
-This code first checks if the array is already sorted (i.e., has one or zero elements). If so, it returns the array as is. Otherwise, it divides the array into two halves and recursively sorts each half. The `merge` function then combines these sorted halves back together to produce a single sorted list.
-
-The time complexity of Merge Sort is O(n log n) for all cases (best, average, worst), making it efficient even for large lists.
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/calling_llm_with_input_messages_var.3.result b/tests/results/examples/tutorial/calling_llm_with_input_messages_var.3.result
deleted file mode 100644
index ca5666e7a..000000000
--- a/tests/results/examples/tutorial/calling_llm_with_input_messages_var.3.result
+++ /dev/null
@@ -1,47 +0,0 @@
-Here is a Python implementation of the Merge Sort algorithm:
-
-```python
-def merge_sort(arr):
-    # Base case: if array has 1 or no elements, it's already sorted
-    if len(arr) <= 1:
-        return arr
-
-    # Divide the array into two halves
-    mid = len(arr) // 2
-    left_half = arr[:mid]
-    right_half = arr[mid:]
-
-    # Recursively sort both halves
-    left_sorted = merge_sort(left_half)
-    right_sorted = merge_sort(right_half)
-
-    # Merge the sorted halves back together
-    return merge(left_sorted, right_sorted)
-
-def merge(left, right):
-    """
-    Merge two sorted arrays into one sorted array.
-    """
-    merged = []  # Initialize an empty list for the merged result
-    left_index = 0  # Index for left array
-    right_index = 0  # Index for right array
-
-    # Continue until we've processed all elements in both lists
-    while left_index < len(left) and right_index < len(right):
-        if left[left_index] <= right[right_index]:
-            merged.append(left[left_index])
-            left_index += 1
-        else:
-            merged.append(right[right_index])
-            right_index += 1
-
-    # If there are any remaining elements in either list, append them to the result
-    merged.extend(left[left_index:])
-    merged.extend(right[right_index:])
-
-    return merged
-```
-
-This code first checks if the array is already sorted (i.e., has one or zero elements). If so, it returns the array as is. Otherwise, it divides the array into two halves and recursively sorts each half. The `merge` function then combines these sorted halves back together in a single sorted list.
-
-The time complexity of merge sort is O(n log n) for all cases (best, average, worst), making it efficient even for large lists.
diff --git a/tests/results/examples/tutorial/calling_llm_with_input_messages_var.4.result b/tests/results/examples/tutorial/calling_llm_with_input_messages_var.4.result
deleted file mode 100644
index 9482c3618..000000000
--- a/tests/results/examples/tutorial/calling_llm_with_input_messages_var.4.result
+++ /dev/null
@@ -1,47 +0,0 @@
-Here is a Python implementation of the Merge Sort algorithm:
-
-```python
-def merge_sort(arr):
-    # Base case: if array has 1 or no elements, it's already sorted
-    if len(arr) <= 1:
-        return arr
-
-    # Divide the array into two halves
-    mid = len(arr) // 2
-    left_half = arr[:mid]
-    right_half = arr[mid:]
-
-    # Recursively sort both halves
-    left_sorted = merge_sort(left_half)
-    right_sorted = merge_sort(right_half)
-
-    # Merge the sorted halves back together
-    return merge(left_sorted, right_sorted)
-
-def merge(left, right):
-    """
-    Merge two sorted arrays into one sorted array.
-    """
-    merged = []  # Initialize an empty list for the result
-    left_index = 0  # Index for the left array
-    right_index = 0  # Index for the right array
-
-    # Continue until we've iterated through both lists
-    while left_index < len(left) and right_index < len(right):
-        if left[left_index] <= right[right_index]:
-            merged.append(left[left_index])
-            left_index += 1
-        else:
-            merged.append(right[right_index])
-            right_index += 1
-
-    # If there are any remaining elements in either list, append them to the result
-    merged.extend(left[left_index:])
-    merged.extend(right[right_index:])
-
-    return merged
-```
-
-This code first checks if the array is already sorted (i.e., has one or zero elements). If so, it returns the array as is. Otherwise, it divides the array into two halves and recursively sorts each half. The `merge` function then combines these sorted halves back together to produce a single sorted array.
-
-The time complexity of Merge Sort is O(n log n) for all cases (best, average, worst), making it efficient even for large lists.
diff --git a/tests/results/examples/tutorial/defs-hello.0.result b/tests/results/examples/tutorial/defs-hello.0.result
deleted file mode 100644
index ffd7606c1..000000000
--- a/tests/results/examples/tutorial/defs-hello.0.result
+++ /dev/null
@@ -1,2 +0,0 @@
-Hello World!
-Good bye
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/defs.0.result b/tests/results/examples/tutorial/defs.0.result
index 2d4182036..680f268e2 100644
--- a/tests/results/examples/tutorial/defs.0.result
+++ b/tests/results/examples/tutorial/defs.0.result
@@ -1,2 +1,9 @@
-'J'aime Paris !'
-The translation of "I love Madrid!" into Spanish is: "Me encanta Madrid!"
\ No newline at end of file
+Hello
+
+In Fench: Bonjour!
+
+Translation of "Hello" in French is "Bonjour".
+
+In Spanish: Hola!
+
+La traducción de "Hello" al español es "Hola".
diff --git a/tests/results/examples/tutorial/defs.1.result b/tests/results/examples/tutorial/defs.1.result
deleted file mode 100644
index d5ba84ddc..000000000
--- a/tests/results/examples/tutorial/defs.1.result
+++ /dev/null
@@ -1,2 +0,0 @@
-'J'aime Paris !'
-The translation of "I love Madrid!" into Spanish is: "Me encanta Madrid."
diff --git a/tests/results/examples/tutorial/function_call_in_jinja.0.result b/tests/results/examples/tutorial/function_call_in_jinja.0.result
new file mode 100644
index 000000000..1a43b5431
--- /dev/null
+++ b/tests/results/examples/tutorial/function_call_in_jinja.0.result
@@ -0,0 +1 @@
+The way to say hello in French is 'Bonjour'.
diff --git a/tests/results/examples/tutorial/function_definition.0.result b/tests/results/examples/tutorial/function_definition.0.result
index 2d4182036..e7122f0e9 100644
--- a/tests/results/examples/tutorial/function_definition.0.result
+++ b/tests/results/examples/tutorial/function_definition.0.result
@@ -1,2 +1,2 @@
-'J'aime Paris !'
-The translation of "I love Madrid!" into Spanish is: "Me encanta Madrid!"
\ No newline at end of file
+J'adore Paris !
+Me encanta Madrid!
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/function_definition.3.result b/tests/results/examples/tutorial/function_definition.3.result
new file mode 100644
index 000000000..80159edaa
--- /dev/null
+++ b/tests/results/examples/tutorial/function_definition.3.result
@@ -0,0 +1,2 @@
+J'aime Paris !
+Amo Madrid!
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/function_empty_context.0.result b/tests/results/examples/tutorial/function_empty_context.0.result
index 4901d530d..b80d21d4d 100644
--- a/tests/results/examples/tutorial/function_empty_context.0.result
+++ b/tests/results/examples/tutorial/function_empty_context.0.result
@@ -1 +1,2 @@
-Hello World!Greetings! I am Granite, a language model developed by IBM in 2024. How may I assist you today?
\ No newline at end of file
+J'aime Paris !
+Me encanta Madrid!
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/function_empty_context.1.result b/tests/results/examples/tutorial/function_empty_context.1.result
index 348e9bbe6..e7122f0e9 100644
--- a/tests/results/examples/tutorial/function_empty_context.1.result
+++ b/tests/results/examples/tutorial/function_empty_context.1.result
@@ -1 +1,2 @@
-Hello World!Hello there! How can I assist you today? If you have any questions or need information on a particular topic, feel free to ask. I'm here to help.
\ No newline at end of file
+J'adore Paris !
+Me encanta Madrid!
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/function_optional_params.0.result b/tests/results/examples/tutorial/function_optional_params.0.result
index f0f021368..000144d17 100644
--- a/tests/results/examples/tutorial/function_optional_params.0.result
+++ b/tests/results/examples/tutorial/function_optional_params.0.result
@@ -1 +1,2 @@
-Hello World Universe!
\ No newline at end of file
+Hello World!
+Hello Earth Planet!
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/lastOf.0.result b/tests/results/examples/tutorial/lastOf.0.result
new file mode 100644
index 000000000..072eed5a2
--- /dev/null
+++ b/tests/results/examples/tutorial/lastOf.0.result
@@ -0,0 +1,3 @@
+Hello
+
+Greetings, I trust this message finds you in good health and high spirits. How may I be of assistance today? Please feel free to pose your query or request, knowing that I am here to serve with diligence and precision.
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/lastOf.1.result b/tests/results/examples/tutorial/lastOf.1.result
new file mode 100644
index 000000000..a5acb19ab
--- /dev/null
+++ b/tests/results/examples/tutorial/lastOf.1.result
@@ -0,0 +1,3 @@
+Hello
+
+Greetings! I trust this message finds you in good health and high spirits. How may I be of assistance today? Please feel free to pose your query or request, knowing that I am here to serve with diligence and precision.
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/local_computation.0.result b/tests/results/examples/tutorial/local_computation.0.result
new file mode 100644
index 000000000..956e25b97
--- /dev/null
+++ b/tests/results/examples/tutorial/local_computation.0.result
@@ -0,0 +1,2 @@
+Hello
+The variable GEN is equal to: Hello
\ No newline at end of file
diff --git a/tests/results/examples/tutorial/muting_block_output.0.result b/tests/results/examples/tutorial/muting_block_output.0.result
index 0701474bb..b015fe531 100644
--- a/tests/results/examples/tutorial/muting_block_output.0.result
+++ b/tests/results/examples/tutorial/muting_block_output.0.result
@@ -1 +1,5 @@
-The french sentence was: 'J'aime Paris !'
\ No newline at end of file
+Hello
+
+In Fench: Bonjour!
+
+Translation of "Hello" in French is "Bonjour".
diff --git a/tests/results/examples/tutorial/muting_block_output.1.result b/tests/results/examples/tutorial/muting_block_output.1.result
deleted file mode 100644
index 3d6699e99..000000000
--- a/tests/results/examples/tutorial/muting_block_output.1.result
+++ /dev/null
@@ -1 +0,0 @@
-The french sentence was: 'J'adore Paris !'
diff --git a/tests/results/examples/tutorial/role.0.result b/tests/results/examples/tutorial/role.0.result
new file mode 100644
index 000000000..a71426c43
--- /dev/null
+++ b/tests/results/examples/tutorial/role.0.result
@@ -0,0 +1,3 @@
+Hello
+You are a polite assistant that likes to answer very formally.
+Greetings! I trust this message finds you in good health and high spirits. How may I be of assistance today? Please feel free to pose your query or request, knowing that I am here to serve with diligence and precision.
\ No newline at end of file
diff --git a/tests/results/examples/sdk/hello.0.result b/tests/results/examples/tutorial/sdk/hello.0.result
similarity index 100%
rename from tests/results/examples/sdk/hello.0.result
rename to tests/results/examples/tutorial/sdk/hello.0.result
diff --git a/tests/results/examples/tutorial/variable_def_use.0.result b/tests/results/examples/tutorial/variable_def_use.0.result
index 72d411660..36f7aa6b0 100644
--- a/tests/results/examples/tutorial/variable_def_use.0.result
+++ b/tests/results/examples/tutorial/variable_def_use.0.result
@@ -1,3 +1,3 @@
 Hello
 Hello
-GEN is equal to: Hello
\ No newline at end of file
+The variable GEN is equal to: Hello
\ No newline at end of file
diff --git a/tests/results/pdl-live-react/src-tauri/tests/cli/model-input-array.2.result b/tests/results/pdl-live-react/src-tauri/tests/cli/model-input-array.2.result
new file mode 100644
index 000000000..4fd6b0a2a
--- /dev/null
+++ b/tests/results/pdl-live-react/src-tauri/tests/cli/model-input-array.2.result
@@ -0,0 +1,5 @@
+As an assistant living in Europe, I'd be happy to share that the fastest land animal native to this continent is actually the Greyhound dog breed. These dogs are renowned for their incredible speed and agility on the ground. They can reach top speeds of around 45-48 miles per hour (72-77 kilometers per hour), making them one of the fastest animals in Europe.
+
+However, if we consider wild animals, the Cheetah is the fastest land animal globally and can be found in parts of Africa, including regions near the European border with North African countries like Libya and Tunisia. Cheetahs typically reach speeds up to 60-70 miles per hour (97-113 kilometers per hour), but they are not native to Europe.
+
+For a truly European animal, the Greyhound remains the fastest land creature in our region.
\ No newline at end of file
diff --git a/tests/test_examples_run.py b/tests/test_examples_run.py
index fd62b39ff..b0b724f34 100644
--- a/tests/test_examples_run.py
+++ b/tests/test_examples_run.py
@@ -102,8 +102,8 @@ class FailedResults:
     """
 
     wrong_results: Dict[str, str] = field(default_factory=lambda: {})
-    unexpected_parse_error: List[str] = field(default_factory=lambda: [])
-    unexpected_runtime_error: List[str] = field(default_factory=lambda: [])
+    unexpected_parse_error: Dict[str, str] = field(default_factory=lambda: {})
+    unexpected_runtime_error: Dict[str, str] = field(default_factory=lambda: {})
 
 
 # pylint: disable=too-many-instance-attributes
@@ -229,9 +229,11 @@ def __execute_file(self, pdl_file_name: str) -> None:
             exec_result.result = str(output["result"])
             exec_result.error_code = ExecutionErrorCode.NO_ERROR
             pdl.write_trace("/dev/null", output["trace"])
-        except PDLParseError:
+        except PDLParseError as exc:
+            exec_result.result = str(exc)
             exec_result.error_code = ExecutionErrorCode.PARSE_ERROR
-        except Exception:
+        except Exception as exc:
+            exec_result.result = str(exc)
             exec_result.error_code = ExecutionErrorCode.RUNTIME_ERROR
 
         self.execution_results[pdl_file_name] = exec_result
@@ -252,8 +254,8 @@ def validate_expected_and_actual(self) -> None:
         """
 
         wrong_result: Dict[str, str] = {}
-        unexpected_parse_error: List[str] = []
-        unexpected_runtime_error: List[str] = []
+        unexpected_parse_error: Dict[str, str] = {}
+        unexpected_runtime_error: Dict[str, str] = {}
 
         for file in self.check:
             if file not in self.skip:
@@ -264,9 +266,9 @@ def validate_expected_and_actual(self) -> None:
                 if not match:
                     # Check if actual results caused any error
                     if actual_result.error_code == ExecutionErrorCode.PARSE_ERROR:
-                        unexpected_parse_error.append(file)
+                        unexpected_parse_error[file] = str(actual_result.result)
                     elif actual_result.error_code == ExecutionErrorCode.RUNTIME_ERROR:
-                        unexpected_runtime_error.append(file)
+                        unexpected_runtime_error[file] = str(actual_result.result)
                     # If no error, then the results are wrong
                     else:
                         if actual_result.result is not None:
@@ -315,6 +317,26 @@ def test_example_runs(capsys: CaptureFixture[str], monkeypatch: MonkeyPatch) ->
     if background.update_results:
         background.write_results()
 
+    # Print the unexpected parse errors
+    for file, actual in background.failed_results.unexpected_parse_error.items():
+        print(
+            "\n============================================================================"
+        )
+        print(f"File that produced unexpected parse error: {file}")
+        print(
+            f"Error message:\n--------------------------------------------------------------\n{actual}\n-------------------------------------------------------------"
+        )
+
+    # Print the runtime errors
+    for file, actual in background.failed_results.unexpected_runtime_error.items():
+        print(
+            "\n============================================================================"
+        )
+        print(f"File that produced unexpected runtime error: {file}")
+        print(
+            f"Error message:\n--------------------------------------------------------------\n{actual}\n-------------------------------------------------------------"
+        )
+
     # Print the actual results for wrong results
     for file, actual in background.failed_results.wrong_results.items():
         print(
diff --git a/tests/test_examples_run.yaml b/tests/test_examples_run.yaml
index 9518039fa..9f2ee20b0 100644
--- a/tests/test_examples_run.yaml
+++ b/tests/test_examples_run.yaml
@@ -1,8 +1,20 @@
-update_results: false
-check: []
+update_results: true
+check:
+  - examples/tutorial/defs.pdl
+  - examples/tutorial/function_definition.pdl
+  - examples/tutorial/function_empty_context.pdl
+  - examples/tutorial/calling_llm_with_input_messages_var.pdl
+  - examples/tutorial/local_computation.pdl
+  - examples/tutorial/role.pdl
+  - examples/tutorial/lastOf.pdl
+  - examples/tutorial/muting_block_output.pdl
+  - examples/tutorial/function_optional_params.pdl
+  - examples/tutorial/function_call_in_jinja.pdl
 skip:
+  - examples/demos/react.pdl
   - examples/cldk/cldk-assistant.pdl
-  - examples/gsm8k/gsm8.pdl
+  - examples/gsm8k/gsm8k.pdl
+  - examples/gsm8k/gsm8k-loop-fission.pdl 
   - examples/gsm8k/gsm8k-plan.pdl
   - examples/gsm8k/gsm8k-plan-few-shots.pdl
   - examples/gsm8k/gsm8k-tot-few-shot.pdl
@@ -28,6 +40,9 @@ skip:
   - examples/optimizer/mbpp.pdl
   - examples/optimizer/fever.pdl
   - examples/optimizer/gsm8k.pdl
+  - examples/optimizer/bea19.pdl
+  - examples/optimizer/eval_levenshtein.pdl
+  - examples/requirements/email.pdl
 with_inputs:
   examples/tutorial/programs/chatbot.pdl:
     stdin: |
diff --git a/tests/test_fallback.py b/tests/test_fallback.py
index bc33cfbef..6bd3934b1 100644
--- a/tests/test_fallback.py
+++ b/tests/test_fallback.py
@@ -76,3 +76,15 @@ def test_type_checking_in_fallback():
         str(exc.value.message)
         == "Type errors during spec checking:\nline 4 - Error should be of type "
     )
+
+
+def test_fallback_and_parser():
+    prog_str = """
+model: "raise an error"
+parser: json
+spec: { xxx: string, age: integer}
+fallback:
+    data: { "xxx": "rosa", "age": 3 }
+"""
+    result = exec_str(prog_str)
+    assert result == {"xxx": "rosa", "age": 3}
diff --git a/tests/test_for.py b/tests/test_for.py
index b7a4b4b43..12694e152 100644
--- a/tests/test_for.py
+++ b/tests/test_for.py
@@ -3,160 +3,369 @@
 from pdl.pdl import exec_dict, exec_str
 from pdl.pdl_interpreter import PDLRuntimeError
 
-for_data = {
-    "description": "For block example",
-    "text": [
-        {
-            "for": {
-                "i": [1, 2, 3, 4],
-            },
-            "repeat": "${ i }\n",
-        }
-    ],
-}
+
+def for_data(loop_kind):
+    return {
+        "description": "For block example",
+        "text": [
+            {
+                "for": {
+                    "i": [1, 2, 3, 4],
+                },
+                loop_kind: "${ i }\n",
+            }
+        ],
+    }
 
 
 def test_for_data():
-    text = exec_dict(for_data)
-    assert text == "1\n2\n3\n4\n"
+    for loop_kind in ["repeat", "map"]:
+        text = exec_dict(for_data(loop_kind))
+        assert text == "1\n2\n3\n4\n"
 
 
-for_data1 = {
-    "description": "For block example",
-    "text": [
-        {
-            "for": {"i": [1, 2, 3, 4], "name": ["A", "B", "C", "D"]},
-            "repeat": "${ i }: ${ name }\n",
-        }
-    ],
-}
+def for_data1(loop_kind):
+    return {
+        "description": "For block example",
+        "text": [
+            {
+                "for": {"i": [1, 2, 3, 4], "name": ["A", "B", "C", "D"]},
+                loop_kind: "${ i }: ${ name }\n",
+            }
+        ],
+    }
 
 
 def test_for_data1():
-    text = exec_dict(for_data1)
-    assert text == "1: A\n2: B\n3: C\n4: D\n"
-
-
-for_data2 = {
-    "description": "For block example",
-    "defs": {"ids": {"data": [5, 6, 7, 8]}},
-    "text": [
-        {
-            "for": {"i": [1, 2, 3, 4], "name": ["A", "B", "C", "D"], "id": "${ ids }"},
-            "repeat": "${ i }: ${ name }: ${ id }\n",
-        }
-    ],
-}
+    for loop_kind in ["repeat", "map"]:
+        text = exec_dict(for_data1(loop_kind))
+        assert text == "1: A\n2: B\n3: C\n4: D\n"
+
+
+def for_data2(loop_kind):
+    return {
+        "description": "For block example",
+        "defs": {"ids": {"data": [5, 6, 7, 8]}},
+        "text": [
+            {
+                "for": {
+                    "i": [1, 2, 3, 4],
+                    "name": ["A", "B", "C", "D"],
+                    "id": "${ ids }",
+                },
+                loop_kind: "${ i }: ${ name }: ${ id }\n",
+            }
+        ],
+    }
 
 
 def test_for_data2():
-    text = exec_dict(for_data2)
-    assert text == "1: A: 5\n2: B: 6\n3: C: 7\n4: D: 8\n"
-
-
-for_data3 = {
-    "description": "For block example",
-    "defs": {"ids": {"data": [5, 6]}},
-    "text": [
-        {
-            "for": {"i": [1, 2, 3, 4], "name": ["A", "B", "C", "D"], "id": "${ ids }"},
-            "repeat": "${ i }: ${ name }: ${ id }\n",
-            "join": {"as": "array"},
-        }
-    ],
-}
+    for loop_kind in ["repeat", "map"]:
+        text = exec_dict(for_data2(loop_kind))
+        assert text == "1: A: 5\n2: B: 6\n3: C: 7\n4: D: 8\n"
+
+
+def for_data3(loop_kind):
+    return {
+        "description": "For block example",
+        "defs": {"ids": {"data": [5, 6]}},
+        "text": [
+            {
+                "for": {
+                    "i": [1, 2, 3, 4],
+                    "name": ["A", "B", "C", "D"],
+                    "id": "${ ids }",
+                },
+                loop_kind: "${ i }: ${ name }: ${ id }\n",
+                "join": {"as": "array"},
+            }
+        ],
+    }
 
 
 def test_for_data3():
     with pytest.raises(PDLRuntimeError):
-        exec_dict(for_data3)
+        for loop_kind in ["repeat", "map"]:
+            exec_dict(for_data3(loop_kind))
 
 
-for_data4 = {
-    "description": "For block def",
-    "text": [
-        {
-            "def": "x",
-            "for": {"i": [1, 2, 3, 4]},
-            "repeat": "${ i + 1 }",
-            "join": {"as": "array"},
-        }
-    ],
-}
+def for_data4(loop_kind):
+    return {
+        "description": "For block def",
+        "text": [
+            {
+                "def": "x",
+                "for": {"i": [1, 2, 3, 4]},
+                loop_kind: "${ i + 1 }",
+                "join": {"as": "array"},
+            }
+        ],
+    }
 
 
 def test_for_data4():
-    result = exec_dict(for_data4, output="all")
-    assert result["result"] == "[2, 3, 4, 5]"
-    assert result["scope"]["x"] == [2, 3, 4, 5]
-
-
-for_as_text_data4 = {
-    "description": "For block def",
-    "text": [
-        {
-            "def": "x",
-            "for": {"i": [1, 2, 3, 4]},
-            "repeat": "${ i + 1 }",
-        }
-    ],
-}
+    for loop_kind in ["repeat", "map"]:
+        result = exec_dict(for_data4(loop_kind), output="all")
+        assert result["result"] == "[2, 3, 4, 5]"
+        assert result["scope"]["x"] == [2, 3, 4, 5]
+
+
+def for_as_text_data4(loop_kind):
+    return {
+        "description": "For block def",
+        "text": [
+            {
+                "def": "x",
+                "for": {"i": [1, 2, 3, 4]},
+                "repeat": "${ i + 1 }",
+            }
+        ],
+    }
 
 
 def test_for_as_text_data4():
-    result = exec_dict(for_as_text_data4, output="all")
-    assert result["result"] == "2345"
-    assert result["scope"]["x"] == "2345"
-
-
-for_data5 = {
-    "description": "For block def",
-    "text": [
-        {
-            "def": "x",
-            "text": {
-                "for": {"i": [1, 2, 3, 4]},
-                "repeat": "${ i }",
-                "join": {"as": "array"},
-            },
-        }
-    ],
-}
+    for loop_kind in ["repeat", "map"]:
+        result = exec_dict(for_as_text_data4(loop_kind), output="all")
+        assert result["result"] == "2345"
+        assert result["scope"]["x"] == "2345"
+
+
+def for_data5(loop_kind):
+    return {
+        "description": "For block def",
+        "text": [
+            {
+                "def": "x",
+                "text": {
+                    "for": {"i": [1, 2, 3, 4]},
+                    loop_kind: "${ i }",
+                    "join": {"as": "array"},
+                },
+            }
+        ],
+    }
 
 
 def test_for_data5():
-    result = exec_dict(for_data5, output="all")
-    assert result["result"] == "[1, 2, 3, 4]"
-    assert result["scope"]["x"] == "[1, 2, 3, 4]"
+    for loop_kind in ["repeat", "map"]:
+        result = exec_dict(for_data5(loop_kind), output="all")
+        assert result["result"] == "[1, 2, 3, 4]"
+        assert result["scope"]["x"] == "[1, 2, 3, 4]"
 
 
 def test_for_nested_array():
-    prog_str = """
+    for loop_kind in ["repeat", "map"]:
+        prog_str = f"""
 for:
     i: [1,2,3]
 repeat:
     for:
         j: [1,2]
-    repeat: "${i}${j}"
+    {loop_kind}: "${{i}}${{j}}"
     join:
         as: array
 join:
     as: array
 """
-    result = exec_str(prog_str)
-    assert result == [["11", "12"], ["21", "22"], ["31", "32"]]
+        result = exec_str(prog_str)
+        assert result == [["11", "12"], ["21", "22"], ["31", "32"]]
 
 
 def test_for_nested_text():
-    prog_str = r"""
+    for loop_kind1 in ["repeat", "map"]:
+        for loop_kind2 in ["repeat", "map"]:
+            prog_str = f"""
 for:
     i: [1,2,3]
-repeat:
+{loop_kind1}:
     for:
         j: [1,2]
-    repeat: "${i}${j}"
+    {loop_kind2}: "${{i}}${{j}}"
+join:
+    with: "\\n"
+"""
+            result = exec_str(prog_str)
+            assert result == "\n".join(["1112", "2122", "3132"])
+
+
+def for_scope(loop_kind):
+    return {
+        "defs": {"x": 0},
+        "text": {
+            "for": {"i": [1, 2, 3, 4]},
+            loop_kind: {"defs": {"x": "${ x + i }"}, "data": "${ i + x }"},
+            "join": {"as": "array"},
+        },
+    }
+
+
+def test_for_scope():
+    for loop_kind in ["repeat", "map"]:
+        result = exec_dict(for_scope(loop_kind), output="all")
+        match loop_kind:
+            case "repeat":
+                assert result["result"] == "[2, 5, 9, 14]"
+                assert result["scope"]["x"] == 10
+            case "map":
+                assert result["result"] == "[2, 4, 6, 8]"
+                assert result["scope"]["x"] == 0
+
+
+def for_index(loop_kind):
+    return {
+        "text": {
+            "index": "idx",
+            "for": {"i": [1, 2, 3, 4]},
+            loop_kind: "${ i + idx }",
+            "join": {"as": "array"},
+        },
+    }
+
+
+def test_for_index():
+    for loop_kind in ["repeat", "map"]:
+        result = exec_dict(for_index(loop_kind), output="all")
+        assert result["result"] == "[1, 3, 5, 7]"
+
+
+def for_context(loop_kind):
+    return {
+        "lastOf": [
+            "Hello",
+            {
+                "for": {
+                    "i": [
+                        1,
+                        2,
+                        3,
+                    ]
+                },
+                loop_kind: "${ pdl_context.serialize('litellm') }",
+                "join": {"as": "array"},
+            },
+        ]
+    }
+
+
+def test_for_context():
+    for loop_kind in ["repeat", "map"]:
+        result = exec_dict(for_context(loop_kind), output="all")
+        match loop_kind:
+            case "repeat":
+                assert result["result"] == [
+                    [{"role": "user", "content": "Hello", "pdl__defsite": "lastOf.0"}],
+                    [
+                        {
+                            "role": "user",
+                            "content": "Hello",
+                            "pdl__defsite": "lastOf.0",
+                        },
+                        {
+                            "role": "user",
+                            "content": [
+                                {
+                                    "role": "user",
+                                    "content": "Hello",
+                                    "pdl__defsite": "lastOf.0",
+                                }
+                            ],
+                            "pdl__defsite": "lastOf.1.repeat.0",
+                        },
+                    ],
+                    [
+                        {
+                            "role": "user",
+                            "content": "Hello",
+                            "pdl__defsite": "lastOf.0",
+                        },
+                        {
+                            "role": "user",
+                            "content": [
+                                {
+                                    "role": "user",
+                                    "content": "Hello",
+                                    "pdl__defsite": "lastOf.0",
+                                }
+                            ],
+                            "pdl__defsite": "lastOf.1.repeat.0",
+                        },
+                        {
+                            "role": "user",
+                            "content": [
+                                {
+                                    "role": "user",
+                                    "content": "Hello",
+                                    "pdl__defsite": "lastOf.0",
+                                },
+                                {
+                                    "role": "user",
+                                    "content": [
+                                        {
+                                            "role": "user",
+                                            "content": "Hello",
+                                            "pdl__defsite": "lastOf.0",
+                                        }
+                                    ],
+                                    "pdl__defsite": "lastOf.1.repeat.0",
+                                },
+                            ],
+                            "pdl__defsite": "lastOf.1.repeat.1",
+                        },
+                    ],
+                ]
+            case "map":
+                assert result["result"] == [
+                    [{"role": "user", "content": "Hello", "pdl__defsite": "lastOf.0"}],
+                    [{"role": "user", "content": "Hello", "pdl__defsite": "lastOf.0"}],
+                    [{"role": "user", "content": "Hello", "pdl__defsite": "lastOf.0"}],
+                ]
+
+
+def test_for_reduce():
+    for loop_kind1 in ["repeat", "map"]:
+        prog_str = f"""
+defs:
+  plus:
+    function:
+        x: number
+        y: number
+    return: ${{ x + y }}
+for:
+  i: [1,2,3,4]
+{loop_kind1}: ${{ i }}
+join:
+  reduce: ${{ plus }}
+"""
+        result = exec_str(prog_str)
+        assert result == 10
+
+
+def test_for_reduce_python():
+    for loop_kind1 in ["repeat", "map"]:
+        prog_str = f"""
+defs:
+  plus:
+    lang: python
+    code: |
+      import operator
+      result = operator.add
+for:
+  i: [1,2,3,4]
+{loop_kind1}: ${{ i }}
 join:
-    with: "\n"
+  reduce: ${{ plus }}
+"""
+        result = exec_str(prog_str)
+        assert result == 10
+
+
+def test_map_max_workers():
+    for max_workers in [0, "null", 2, 4]:
+        prog_str = f"""
+for:
+  i: [1,2,3,4]
+map: ${{ i }}
+maxWorkers: {max_workers}
 """
-    result = exec_str(prog_str)
-    assert result == "\n".join(["1112", "2122", "3132"])
+        result = exec_str(prog_str)
+        assert result == "1234"
diff --git a/tests/test_function.py b/tests/test_function.py
index c2ce7ab48..a2c32ca5b 100644
--- a/tests/test_function.py
+++ b/tests/test_function.py
@@ -1,4 +1,4 @@
-from pdl.pdl import exec_dict, exec_file
+from pdl.pdl import exec_dict, exec_file, exec_str
 
 hello_def = {
     "def": "hello",
@@ -126,3 +126,134 @@ def test_call_expression_args():
         result
         == "FN::get_current_stock:: 'Simple call!'\n{'product_name': 'from_object'}\nFN::get_current_stock:: 'from_object'\n"
     )
+
+
+def test_call_from_code_01():
+    prog = """
+defs:
+  f:
+    function:
+      x:
+      y:
+    return:
+      ${x + y}
+array:
+- call: ${f}
+  args:
+    x: 1
+    y: 2
+- ${ f(x=1, y=2) }
+- lang: python
+  code:
+    result = f(x=1, y=2)
+"""
+    result = exec_str(prog)
+    assert result == [3, 3, 3]
+
+
+def test_call_from_code_02():
+    prog = """
+defs:
+  f:
+    function:
+    return:
+      ${pdl_context}
+lastOf:
+- Hello
+- context: independent
+  array:
+  - call: ${f}
+  - ${ f() }
+  - lang: python
+    code:
+      result = f()
+"""
+    result = exec_str(prog)
+    assert [ctx.serialize("litellm") for ctx in result] == [
+        [{"role": "user", "content": "Hello", "pdl__defsite": "lastOf.0"}],
+        [{"role": "user", "content": "Hello", "pdl__defsite": "lastOf.0"}],
+        [{"role": "user", "content": "Hello", "pdl__defsite": "lastOf.0"}],
+    ]
+
+
+def test_call_from_code_03():
+    prog = """
+defs:
+  f:
+    function:
+    return:
+      ${pdl_context}
+lastOf:
+- Hello
+- context: independent
+  array:
+  - call: ${f}
+    args:
+      pdl_context: []
+  - ${ f(pdl_context=[]) }
+  - lang: python
+    code:
+      result = f(pdl_context=[])
+"""
+    result = exec_str(prog)
+    assert [ctx.serialize("litellm") for ctx in result] == [
+        [],
+        [],
+        [],
+    ]
+
+
+def test_call_from_code_04():
+    prog = """
+defs:
+  f:
+    function:
+    return:
+      lastOf:
+      - How are you?
+      - Bye
+lastOf:
+- Hello
+- context: independent
+  array:
+  - text:
+    - call: ${f}
+    - ${pdl_context}
+  - text:
+    - ${f()}
+    - ${pdl_context}
+  - text:
+    - lang: python
+      code:
+        result = f()
+    - ${pdl_context}
+"""
+    result = exec_str(prog)
+    assert result == [
+        "Bye[{'role': 'user', 'content': 'Hello', 'pdl__defsite': 'lastOf.0'},{'role': 'user', 'content': 'How are you?', 'pdl__defsite': 'lastOf.1.array.0.text.0.call.lastOf.0'},{'role': 'user', 'content': 'Bye', 'pdl__defsite': 'lastOf.1.array.0.text.0.call.lastOf.1'}]",
+        "Bye[{'role': 'user', 'content': 'Hello', 'pdl__defsite': 'lastOf.0'},{'role': 'user', 'content': 'Bye', 'pdl__defsite': 'lastOf.1.array.1.text.0'}]",
+        "Bye[{'role': 'user', 'content': 'Hello', 'pdl__defsite': 'lastOf.0'},{'role': 'user', 'content': 'Bye', 'pdl__defsite': 'lastOf.1.array.2.text.0.code'}]",
+    ]
+
+
+def test_call_from_code_05():
+    prog = """
+defs:
+  f:
+    function:
+      x:
+      y:
+    return:
+      ${x - y}
+array:
+- call: ${f}
+  args:
+    x: 2
+    y: 1
+- ${ f(2, 1) }
+- lang: python
+  code:
+    result = f(2, 1)
+"""
+    result = exec_str(prog)
+    assert result == [1, 1, 1]
diff --git a/tests/test_line_table.py b/tests/test_line_table.py
index 4e1e24642..d612da584 100644
--- a/tests/test_line_table.py
+++ b/tests/test_line_table.py
@@ -168,8 +168,8 @@ def test_line13(capsys: CaptureFixture[str]):
     "file": "tests/data/line/hello14.pdl",
     "errors": [
         "",
-        "tests/data/line/hello14.pdl:25 - Type errors in result of function call to ${ translate }:",
-        "tests/data/line/hello14.pdl:25 - Bonjour le monde! should be of type ",
+        "tests/data/line/hello14.pdl:16 - Type errors in result of the function translate:",
+        "tests/data/line/hello14.pdl:16 - Bonjour le monde! should be of type ",
     ],
 }
 
diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py
index 76c5ed7ad..4ceef96e0 100644
--- a/tests/test_optimizer.py
+++ b/tests/test_optimizer.py
@@ -2,7 +2,8 @@
 from pprint import pprint
 
 import pytest
-from datasets import Dataset, DatasetDict
+from datasets.arrow_dataset import Dataset
+from datasets.dataset_dict import DatasetDict
 
 from examples.optimizer.fever_evaluator import FEVEREvaluator
 from examples.optimizer.gsm8k_evaluator import Gsm8kEvaluator
@@ -16,11 +17,14 @@ def test_gsm8k_cot():
     pattern = "cot"
     num_demonstrations = 3
     config = OptimizationConfig(
-        benchmark="gsm8k",
-        initial_test_set_size=1,
+        pdl_path="tests/data/optimizer_gsm8k.pdl",
+        dataset="gsm8k",
+        demonstration_columns=["question", "reasoning", "answer"],
+        instance_columns=["question", "reasoning"],
+        groundtruth_column="answer",
+        initial_validation_set_size=1,
         max_test_set_size=1,
         num_candidates=5,
-        num_demonstrations=num_demonstrations,
         parallelism=1,
         shuffle_test=False,
         test_set_name="test",
@@ -348,7 +352,6 @@ def test_gsm8k_cot():
         },
     )
     optim = PDLOptimizer(
-        pdl_path=Path("tests/data/optimizer_gsm8k.pdl"),
         dataset=gsm8k,
         trial_thread=Gsm8kEvaluator,
         yield_output=True,
@@ -374,11 +377,14 @@ def test_gsm8k_cot():
 
 def run_optimizer_gsm8k(pattern, num_demonstrations=0):
     config = OptimizationConfig(
-        benchmark="gsm8k",
-        initial_test_set_size=1,
+        pdl_path="tests/data/optimizer_gsm8k.pdl",
+        dataset="gsm8k",
+        demonstration_columns=["question", "reasoning", "answer"],
+        instance_columns=["question", "reasoning"],
+        groundtruth_column="answer",
+        initial_validation_set_size=1,
         max_test_set_size=1,
         num_candidates=1,
-        num_demonstrations=num_demonstrations,
         parallelism=1,
         shuffle_test=False,
         test_set_name="test",
@@ -707,7 +713,6 @@ def run_optimizer_gsm8k(pattern, num_demonstrations=0):
         },
     )
     optim = PDLOptimizer(
-        pdl_path=Path("examples/optimizer/gsm8k.pdl"),
         dataset=gsm8k,
         trial_thread=Gsm8kEvaluator,
         yield_output=True,
@@ -723,11 +728,22 @@ def run_optimizer_gsm8k(pattern, num_demonstrations=0):
 
 def run_optimizer_fever(pattern, num_demonstrations=0):
     config = OptimizationConfig(
-        benchmark="fever",
-        initial_test_set_size=1,
+        pdl_path="examples/optimizer/fever.pdl",
+        dataset="fever",
+        demonstration_columns=[
+            "question",
+            "reasoning",
+            "reasoning",
+            "traj_keys",
+            "traj_values",
+            "rewoo_traj_keys",
+            "rewoo_traj_values",
+        ],
+        instance_columns=["claim"],
+        groundtruth_column="label",
+        initial_validation_set_size=1,
         max_test_set_size=1,
         num_candidates=1,
-        num_demonstrations=num_demonstrations,
         parallelism=1,
         shuffle_test=False,
         test_set_name="test",
@@ -1063,7 +1079,6 @@ def run_optimizer_fever(pattern, num_demonstrations=0):
     )
 
     optim = PDLOptimizer(
-        pdl_path=Path("examples/optimizer/fever.pdl"),
         dataset=fever,  # pyright: ignore
         trial_thread=FEVEREvaluator,
         yield_output=True,
@@ -1079,11 +1094,18 @@ def run_optimizer_fever(pattern, num_demonstrations=0):
 
 def run_optimizer_mbpp(pattern, num_demonstrations=0):
     config = OptimizationConfig(
-        benchmark="mbpp",
-        initial_test_set_size=1,
+        pdl_path="examples/optimizer/mbpp.pdl",
+        dataset="mbpp",
+        demonstration_columns=[
+            "prompt",
+            "traj_keys",
+            "traj_values",
+        ],
+        instance_columns=["claim"],
+        groundtruth_column="canonical_solution",
+        initial_validation_set_size=1,
         max_test_set_size=1,
         num_candidates=1,
-        num_demonstrations=num_demonstrations,
         parallelism=1,
         shuffle_test=False,
         test_set_name="test",
@@ -1102,7 +1124,6 @@ def run_optimizer_mbpp(pattern, num_demonstrations=0):
     )
 
     optim = PDLOptimizer(
-        pdl_path=Path("examples/optimizer/mbpp.pdl"),
         dataset=mbpp_dataset,  # pyright: ignore
         trial_thread=MBPPEvaluator,
         yield_output=True,