1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/*
* Copyright 2025-2026 Colliery Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//! Inventory entry types reachable from packaged cdylibs.
//!
//! These types live in `cloacina-workflow-plugin` (a leaf crate that
//! packaged cdylibs depend on) so the unified `cloacina::package!()` shell
//! macro can walk `inventory::iter::<T>` at FFI call time without dragging
//! in the full `cloacina` engine.
//!
//! `cloacina` (the host engine) re-exports these types from
//! `cloacina_workflow_plugin::inventory` so existing engine code paths
//! continue to compile unchanged.
//!
//! T-C (CLOACI-T-0549) relocated `TaskEntry` and `ComputationGraphEntry`
//! here so the shell's `get_task_metadata` / `execute_task` /
//! `get_graph_metadata` / `execute_graph` bodies can walk these inventories
//! from packaged cdylibs. `TriggerEntry` / `TriggerlessGraphEntry` /
//! `WorkflowEntry` / `StreamBackendEntry` remain in
//! `cloacina/src/inventory_entries.rs` until their constructor return
//! types likewise relocate.
use ;
use ;
use Future;
use Pin;
use Arc;
// ----------------------------------------------------------------------------
// Trigger-less computation graph types (T-0552 — relocated from
// cloacina/src/computation_graph/triggerless.rs so packaged cdylibs can
// reach them).
// ----------------------------------------------------------------------------
/// The compiled function emitted for a trigger-less computation graph.
///
/// Takes the workflow context the graph was invoked with; returns a
/// `GraphResult` whose terminal outputs are pre-serialized to
/// `serde_json::Value`.
pub type TriggerlessGraphFn = ;
/// Runtime-side description of a trigger-less computation graph.
/// Compile-time link from a `Graph` handle to its trigger-less invocation
/// surface.
///
/// The `#[computation_graph]` macro emits an `impl TriggerlessGraph for
/// __CGHandle_<mod>` only when the graph is trigger-less.
/// Reactor entry emitted by the `#[reactor]` attribute macro. The `package!()`
/// shell walks `inventory::iter::<ReactorEntry>` at FFI call time to produce
/// `Vec<ReactorPackageMetadata>` for `get_reactor_metadata`.
collect!;
/// Task entry emitted by `#[task]`. The `package!()` shell walks
/// `inventory::iter::<TaskEntry>` to build the per-task metadata in
/// `get_task_metadata` and to dispatch task execution by name in
/// `execute_task`.
collect!;
/// Workflow descriptor entry emitted by `#[workflow]`. Provides the
/// metadata fields the unified `cloacina::package!()` shell can't infer
/// from `TaskEntry` alone (description, author, fingerprint, graph_data,
/// triggers). Walked by the shell's `get_task_metadata` body to populate
/// `PackageTasksMetadata`. (T-C / I-0102)
collect!;
/// Computation graph entry emitted by `#[computation_graph]` for the
/// reactor-triggered (split) form. The `package!()` shell walks
/// `inventory::iter::<ComputationGraphEntry>` to build the metadata
/// returned by `get_graph_metadata` and to dispatch
/// execution in `execute_graph`. At most one entry is expected per cdylib;
/// the shell's body errors if it finds more than one.
collect!;
/// Trigger entry emitted by `#[trigger]`. The `package!()` shell walks
/// `inventory::iter::<TriggerEntry>` to populate `get_trigger_metadata`,
/// calling each entry's constructor and querying the resulting trigger's
/// `name` / `poll_interval` / `cron_expression` / `allow_concurrent`.
/// (T-0552 — relocated from `cloacina` so packaged cdylibs can reach it.)
collect!;
/// Trigger-less computation graph entry emitted by `#[computation_graph]`
/// for graphs declared without a `trigger = reactor(...)` clause. These
/// graphs operate on `Context<Value>` rather than `InputCache` and are
/// invoked directly by workflow tasks. (T-0552 — relocated from `cloacina`.)
collect!;