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
//! The `agent` scaffold for `aion new`: a durable agent loop
//! (scout -> act -> verify -> signal-gated human review) emitted as a
//! runnable `aion_flow` Gleam package plus its agent-step worker crate.
//!
//! The shape generalises the dogfooded stacked-dev family into configuration:
//! the three agent steps are worker-served activities parameterised by
//! prompts carried in the start input, and the human approval pause is a
//! durable `workflow.receive` raced against a caller-chosen deadline — not a
//! bespoke polling mechanism. The scaffold bundles no agent runtime; the
//! worker (`worker/`) is where a real driver plugs in, and it stays
//! worker-side (ADR-011). No step or review deadline is invented (ADR-003):
//! the per-step activities run unbounded until the worker answers, and the
//! review wait uses the required `review_timeout_ms` start-input field.
//!
//! The template is on the types-first path (ADR-014): the boundary types are
//! authored once in `src/{{name}}_io.gleam`, and the JSON codecs module plus
//! every `schemas/*.json` artifact ship pre-generated — byte-identical to
//! what `aion generate` reproduces from the types module (proven by the
//! scaffold gates), so a fresh scaffold builds without running the toolchain
//! and `aion generate . --check` passes clean. The template pins the
//! published hex `aion_flow` 0.4.x, which predates `activity.declare` /
//! `aion/manifest` and `workflow.entrypoint`, so the workflow keeps the
//! generated-marker `run` adapter and the activity declarations stay implicit
//! in the workflow body; once 0.5.x publishes, an authored
//! `src/{{name}}_activities.gleam` `manifest()` puts the activity wrappers,
//! the worker `main.rs`, and the wire-compat golden under `aion generate` too
//! (0.5.0-publish follow-up).
//!
//! This module owns only the agent template's file manifest; placeholder
//! substitution, name validation, target-directory checks, and emission live
//! in [`crate::new::scaffold`], shared with every other template.
use crateManifestFile;
/// The agent template's project files (shared files are prepended by the
/// template layer). The `src/{{name}}.gleam` workflow drives the loop over
/// the authored boundary types in `src/{{name}}_io.gleam`; the pre-generated
/// codecs module and schema artifacts, `workflow.toml`, and `README.md`
/// complete a runnable package.
pub const AGENT_FILES: & = &;
/// The agent-step worker crate emitted with `--worker rust`. It serves the
/// three parameterised steps the workflow dispatches (`RemoteRust` tier,
/// ADR-011 — the agent driver stays worker-side); its `StepInput`/`StepOutput`
/// structs mirror the boundary types declared in `src/{{name}}_io.gleam`, and
/// the handler bodies are trivial echoes a real agent driver replaces. Once
/// the 0.5.x SDK publishes and the template gains an authored activities
/// `manifest()`, this `main.rs` becomes an `aion generate` artifact (the
/// bodies move to a hand-written `handlers.rs`).
///
/// The on-disk manifest is `Cargo.toml.tmpl`, not `Cargo.toml`: cargo excludes
/// subdirectories containing a `Cargo.toml` when packaging this crate, which
/// would break `include_str!` on the published crate.
pub const AGENT_WORKER_FILES: & = &;
/// The three parameterised agent steps the workflow dispatches to the worker.
pub const AGENT_ACTIVITIES: & = &;