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
// Bind against the design-extension world from the component's perspective.
// wasmtime bindgen! generates:
// - add_to_linker() for `import` items (host implements these for the component)
// - typed export accessors for `export` items (host calls these on the component)
//
// NOTE: wasmtime appends a version suffix to package module names when multiple
// versions of the same package namespace coexist in wit/deps (required for v2
// dual-support). The unversioned paths that existed before Task 1 become:
// greentic::extension_design -> exports::greentic::extension_design0_2_0
// greentic::extension_base -> greentic::extension_base0_1_0
// Callers in runtime*.rs use these versioned paths directly.
bindgen!;
// ---------------------------------------------------------------------------
// Deploy-extension bindings
//
// Generated in a sibling `mod deploy` to keep the type namespace isolated
// from the design-extension bindings above. Both worlds share
// `greentic:extension-base` + `greentic:extension-host/*`, so generating
// them in the root module would cause duplicate-type errors.
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// Bundle-extension bindings
//
// Same pattern as deploy: isolated submodule because all three worlds share
// `extension-base` + `extension-host` types and re-binding them at the root
// would conflict. The bundle world exports `recipes` and `bundling` (the
// host calls `bundling.render(...)` in `runtime::render_bundle`); it imports
// the standard host triplet (logging / i18n / broker), wired through the
// shared `add_to_linker` helpers.
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// DW-Composer-extension bindings
//
// Isolated submodule for the `greentic:dw-composer/dw-composer-extension`
// world. Composer extensions export a domain-specific `composer` interface
// (`greentic:dw-composer/composer@0.1.0`) instead of the generic
// `greentic:extension-design/tools` interface. Keeping them in their own
// submodule avoids duplicate-type conflicts with the design-extension
// bindings above.
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// v2-contract bindings (unified 6-variant extension-error, spec
// 2026-06-07-extension-response-envelope-design.md). Old-world modules above
// stay for extensions built against the previous WIT; the runtime resolves
// per-extension at dispatch time (see runtime::resolve_iface_versions).
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// design-extension @0.4.0 bindings.
//
// Identical to the @0.3.0 world plus one additive import:
// `greentic:oauth-broker/broker-v1@1.0.0`. The version bump (rather than an
// in-place edit of @0.3.0) keeps the world signature versioned, so a component
// compiled against the broker-capable world is distinguishable from one that is
// not. This is the only world that generates the oauth-broker host bindings;
// the broker `Host` impl (host_state.rs) and linker wiring (loaded.rs) target
// this module. Registering broker-v1 once in the shared linker covers every
// instantiated component regardless of the world version it targets.
// ---------------------------------------------------------------------------