Integrate Notarius extraction into the D&D pipeline
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
dnd_pipeline_audita_version: v0.9.1
|
||||
dnd_pipeline_narratio_version: v2.0.0
|
||||
dnd_pipeline_notarius_version: v0.6.0
|
||||
dnd_pipeline_notarius_version: v0.7.0
|
||||
dnd_pipeline_seriatim_version: v1.5.0
|
||||
dnd_pipeline_scriptorium_version: v0.13.0
|
||||
dnd_pipeline_manage_build_dependencies: true
|
||||
@@ -54,6 +54,157 @@ dnd_pipeline_audita_context_description: >-
|
||||
to actual D&D gameplay.
|
||||
dnd_pipeline_audita_diagnostics_work_dir: /tmp/audita
|
||||
dnd_pipeline_audita_diagnostics_retention: auto
|
||||
dnd_pipeline_notarius_pipelines:
|
||||
dnd-session:
|
||||
llm_profile: dnd-extraction
|
||||
input:
|
||||
module: seriatim
|
||||
chunk:
|
||||
module: dnd/scenes
|
||||
retries: 2
|
||||
output:
|
||||
module: json
|
||||
options:
|
||||
include_chunk_map: true
|
||||
evidence_context:
|
||||
enabled: true
|
||||
window_units: 3
|
||||
lanes:
|
||||
- item-occurrences
|
||||
- item-registry
|
||||
- location-registry
|
||||
- location-occurrences
|
||||
- npc-registry
|
||||
- spells
|
||||
- combat-turns
|
||||
- npc-occurrences
|
||||
- enemy-events
|
||||
steps:
|
||||
- id: describe-session
|
||||
artifacts:
|
||||
item-registry:
|
||||
extract:
|
||||
module: dnd/item-registry
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/item-registry
|
||||
npc-registry:
|
||||
extract:
|
||||
module: dnd/npc-registry
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/npc-registry
|
||||
retries: 2
|
||||
location-registry:
|
||||
extract:
|
||||
module: dnd/location-registry
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/location-registry
|
||||
retries: 2
|
||||
scene-descriptions:
|
||||
extract:
|
||||
module: dnd/scene-descriptions
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/scene-descriptions
|
||||
- id: extract-events
|
||||
references:
|
||||
location_registry:
|
||||
artifact:
|
||||
step: describe-session
|
||||
lane: location-registry
|
||||
npc_registry:
|
||||
artifact:
|
||||
step: describe-session
|
||||
lane: npc-registry
|
||||
scene_descriptions:
|
||||
artifact:
|
||||
step: describe-session
|
||||
lane: scene-descriptions
|
||||
item_registry:
|
||||
artifact:
|
||||
step: describe-session
|
||||
lane: item-registry
|
||||
artifacts:
|
||||
item-occurrences:
|
||||
extract:
|
||||
module: dnd/item-occurrences
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/item-occurrences
|
||||
spells:
|
||||
extract:
|
||||
module: dnd/spells
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/spells
|
||||
combat-turns:
|
||||
extract:
|
||||
module: dnd/combat-turns
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/combat-turns
|
||||
npc-occurrences:
|
||||
extract:
|
||||
module: dnd/npc-occurrences
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/npc-occurrences
|
||||
location-occurrences:
|
||||
extract:
|
||||
module: dnd/location-occurrences
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/location-occurrences
|
||||
- id: track-enemies
|
||||
references:
|
||||
npc_registry:
|
||||
artifact:
|
||||
step: describe-session
|
||||
lane: npc-registry
|
||||
scene_descriptions:
|
||||
artifact:
|
||||
step: describe-session
|
||||
lane: scene-descriptions
|
||||
combat_turns:
|
||||
artifact:
|
||||
step: extract-events
|
||||
lane: combat-turns
|
||||
npc_occurrences:
|
||||
artifact:
|
||||
step: extract-events
|
||||
lane: npc-occurrences
|
||||
artifacts:
|
||||
enemy-events:
|
||||
extract:
|
||||
module: dnd/enemy-events
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/enemy-events
|
||||
dnd_pipeline_notarius_cache_root: /var/cache/notarius
|
||||
dnd_pipeline_notarius_cache_chunk_plans_mode: auto
|
||||
dnd_pipeline_notarius_cache_checkpoints_enabled: true
|
||||
dnd_pipeline_narratio_seriatim_output_schema: seriatim-intermediate
|
||||
dnd_pipeline_narratio_normalize_output_path: transcripts/final.json
|
||||
dnd_pipeline_narratio_normalize_output_schema: seriatim-intermediate
|
||||
@@ -62,6 +213,72 @@ dnd_pipeline_narratio_trim_output_path: transcripts/final.trimmed.json
|
||||
dnd_pipeline_narratio_trim_bounds_prompt_id: dnd.session_bounds
|
||||
dnd_pipeline_narratio_trim_bounds_transcript_input_name: transcript
|
||||
dnd_pipeline_narratio_trim_bounds_output_path: artifacts/session_bounds.json
|
||||
dnd_pipeline_narratio_notarius_pipeline_id: dnd-session
|
||||
dnd_pipeline_narratio_notarius_references:
|
||||
party: narratio.input.party
|
||||
players: narratio.input.players
|
||||
glossary: narratio.input.glossary
|
||||
dnd_pipeline_narratio_notarius_outputs:
|
||||
item_registry:
|
||||
lane_id: item-registry
|
||||
media_type: application/json
|
||||
schema_id: notarius.dnd.item_registry
|
||||
schema_version: v1
|
||||
module_key: dnd/item-registry
|
||||
npc_registry:
|
||||
lane_id: npc-registry
|
||||
media_type: application/json
|
||||
schema_id: notarius.dnd.npc_registry
|
||||
schema_version: v1
|
||||
module_key: dnd/npc-registry
|
||||
location_registry:
|
||||
lane_id: location-registry
|
||||
media_type: application/json
|
||||
schema_id: notarius.dnd.location_registry
|
||||
schema_version: v1
|
||||
module_key: dnd/location-registry
|
||||
scene_descriptions:
|
||||
lane_id: scene-descriptions
|
||||
media_type: application/json
|
||||
schema_id: notarius.dnd.scene_descriptions
|
||||
schema_version: v1
|
||||
module_key: dnd/scene-descriptions
|
||||
item_occurrences:
|
||||
lane_id: item-occurrences
|
||||
media_type: application/json
|
||||
schema_id: notarius.dnd.item_occurrences
|
||||
schema_version: v1
|
||||
module_key: dnd/item-occurrences
|
||||
spells:
|
||||
lane_id: spells
|
||||
media_type: application/json
|
||||
schema_id: notarius.dnd.spells
|
||||
schema_version: v1
|
||||
module_key: dnd/spells
|
||||
combat_turns:
|
||||
lane_id: combat-turns
|
||||
media_type: application/json
|
||||
schema_id: notarius.dnd.combat_turns
|
||||
schema_version: v1
|
||||
module_key: dnd/combat-turns
|
||||
npc_occurrences:
|
||||
lane_id: npc-occurrences
|
||||
media_type: application/json
|
||||
schema_id: notarius.dnd.npc_occurrences
|
||||
schema_version: v1
|
||||
module_key: dnd/npc-occurrences
|
||||
location_occurrences:
|
||||
lane_id: location-occurrences
|
||||
media_type: application/json
|
||||
schema_id: notarius.dnd.location_occurrences
|
||||
schema_version: v1
|
||||
module_key: dnd/location-occurrences
|
||||
enemy_events:
|
||||
lane_id: enemy-events
|
||||
media_type: application/json
|
||||
schema_id: notarius.dnd.enemy_events
|
||||
schema_version: v1
|
||||
module_key: dnd/enemy-events
|
||||
dnd_pipeline_narratio_render_enabled: true
|
||||
dnd_pipeline_narratio_render_format: markdown
|
||||
dnd_pipeline_narratio_session_recap_artifact:
|
||||
|
||||
@@ -196,6 +196,22 @@ argument_specs:
|
||||
type: str
|
||||
required: true
|
||||
description: Audita diagnostics retention policy.
|
||||
dnd_pipeline_notarius_pipelines:
|
||||
type: dict
|
||||
required: true
|
||||
description: Complete native map of Notarius pipeline definitions.
|
||||
dnd_pipeline_notarius_cache_root:
|
||||
type: path
|
||||
required: true
|
||||
description: Shared root for Notarius cache state.
|
||||
dnd_pipeline_notarius_cache_chunk_plans_mode:
|
||||
type: str
|
||||
required: true
|
||||
description: Notarius chunk-plan cache policy.
|
||||
dnd_pipeline_notarius_cache_checkpoints_enabled:
|
||||
type: bool
|
||||
required: true
|
||||
description: Whether Notarius records checkpoints.
|
||||
dnd_pipeline_narratio_seriatim_output_schema:
|
||||
type: str
|
||||
required: true
|
||||
@@ -228,6 +244,18 @@ argument_specs:
|
||||
type: str
|
||||
required: true
|
||||
description: Canonical session-bounds artifact output path.
|
||||
dnd_pipeline_narratio_notarius_pipeline_id:
|
||||
type: str
|
||||
required: true
|
||||
description: Notarius pipeline selected by Narratio.
|
||||
dnd_pipeline_narratio_notarius_references:
|
||||
type: dict
|
||||
required: true
|
||||
description: Complete native map of Narratio prepared-reference bindings.
|
||||
dnd_pipeline_narratio_notarius_outputs:
|
||||
type: dict
|
||||
required: true
|
||||
description: Complete native map of accepted Notarius lane outputs.
|
||||
dnd_pipeline_narratio_render_enabled:
|
||||
type: bool
|
||||
required: true
|
||||
|
||||
@@ -44,6 +44,11 @@ dependencies:
|
||||
narratio_audita_config_path: /usr/local/etc/audita/config.yml
|
||||
narratio_notarius_binary: /usr/local/bin/notarius
|
||||
narratio_notarius_config_path: /usr/local/etc/notarius/config.yml
|
||||
narratio_notarius_enabled: true
|
||||
narratio_notarius_pipeline_id: "{{ dnd_pipeline_narratio_notarius_pipeline_id }}"
|
||||
narratio_notarius_working_directory: /usr/local/etc/notarius
|
||||
narratio_notarius_references: "{{ dnd_pipeline_narratio_notarius_references }}"
|
||||
narratio_notarius_outputs: "{{ dnd_pipeline_narratio_notarius_outputs }}"
|
||||
narratio_scriptorium_binary: /usr/local/bin/scriptorium
|
||||
narratio_scriptorium_config_path: /usr/local/etc/scriptorium/config.yml
|
||||
- role: rakestraw.seriatim
|
||||
@@ -101,6 +106,12 @@ dependencies:
|
||||
notarius_config_group: "{{ dnd_pipeline_runtime_group }}"
|
||||
notarius_config_directory_mode: "{{ dnd_pipeline_config_directory_mode }}"
|
||||
notarius_config_file_mode: "{{ dnd_pipeline_config_file_mode }}"
|
||||
notarius_configkit_imports:
|
||||
- path: pipelines/dnd-session.yml
|
||||
notarius_cache_chunk_plans_mode: "{{ dnd_pipeline_notarius_cache_chunk_plans_mode }}"
|
||||
notarius_cache_chunk_plans_directory: "{{ dnd_pipeline_notarius_cache_root ~ '/chunk-plans' }}"
|
||||
notarius_cache_checkpoints_enabled: "{{ dnd_pipeline_notarius_cache_checkpoints_enabled }}"
|
||||
notarius_cache_checkpoints_directory: "{{ dnd_pipeline_notarius_cache_root ~ '/checkpoints' }}"
|
||||
- role: rakestraw.scriptorium
|
||||
vars:
|
||||
scriptorium_version: "{{ dnd_pipeline_scriptorium_version }}"
|
||||
|
||||
@@ -11,7 +11,7 @@ roles:
|
||||
- name: rakestraw.notarius
|
||||
src: https://gitea.maximumdirect.net/eric/ansible-role-notarius.git
|
||||
scm: git
|
||||
version: e9ae2dc34023e1e8462bf0991de62b97d8c0e0ee
|
||||
version: 14a38e04e35ef524d6a97fa7fb5a04981a0a2161
|
||||
- name: rakestraw.scriptorium
|
||||
src: https://gitea.maximumdirect.net/eric/ansible-role-scriptorium.git
|
||||
scm: git
|
||||
|
||||
@@ -7,6 +7,15 @@
|
||||
update_cache: true
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Create the Notarius cache root
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ dnd_pipeline_notarius_cache_root }}"
|
||||
state: directory
|
||||
owner: "{{ dnd_pipeline_runtime_user }}"
|
||||
group: "{{ dnd_pipeline_runtime_group }}"
|
||||
mode: "2775"
|
||||
|
||||
- name: Converge access ACLs on Narratio writable roots
|
||||
become: true
|
||||
ansible.posix.acl:
|
||||
@@ -16,7 +25,7 @@
|
||||
state: present
|
||||
loop: >-
|
||||
{{
|
||||
['/var/lib/narratio', '/var/spool/narratio', '/var/cache/narratio'] |
|
||||
['/var/lib/narratio', '/var/spool/narratio', '/var/cache/narratio', dnd_pipeline_notarius_cache_root] |
|
||||
product([
|
||||
{'etype': 'user', 'permissions': 'rwx'},
|
||||
{'etype': 'group', 'permissions': 'rwx'},
|
||||
@@ -37,7 +46,7 @@
|
||||
state: present
|
||||
loop: >-
|
||||
{{
|
||||
['/var/lib/narratio', '/var/spool/narratio', '/var/cache/narratio'] |
|
||||
['/var/lib/narratio', '/var/spool/narratio', '/var/cache/narratio', dnd_pipeline_notarius_cache_root] |
|
||||
product([
|
||||
{'etype': 'user', 'permissions': 'rwx'},
|
||||
{'etype': 'group', 'permissions': 'rwx'},
|
||||
@@ -89,6 +98,24 @@
|
||||
- artifact-families
|
||||
- profiles
|
||||
|
||||
- name: Create the Notarius pipeline configuration directory
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /usr/local/etc/notarius/pipelines
|
||||
state: directory
|
||||
owner: "{{ dnd_pipeline_runtime_user }}"
|
||||
group: "{{ dnd_pipeline_runtime_group }}"
|
||||
mode: "{{ dnd_pipeline_config_directory_mode }}"
|
||||
|
||||
- name: Deploy the Notarius D&D pipeline configuration
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: dnd-session.yml.j2
|
||||
dest: /usr/local/etc/notarius/pipelines/dnd-session.yml
|
||||
owner: "{{ dnd_pipeline_runtime_user }}"
|
||||
group: "{{ dnd_pipeline_runtime_group }}"
|
||||
mode: "{{ dnd_pipeline_config_file_mode }}"
|
||||
|
||||
- name: Deploy Narratio D&D configuration fragments
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
|
||||
2
templates/dnd-session.yml.j2
Normal file
2
templates/dnd-session.yml.j2
Normal file
@@ -0,0 +1,2 @@
|
||||
pipelines:
|
||||
{{ dnd_pipeline_notarius_pipelines | to_nice_yaml(indent=2) | indent(2, true) }}
|
||||
Reference in New Issue
Block a user