@lace-cloud/proto 0.0.1-bootstrap.0 → 0.6.3-next.25704378412
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +19 -0
- package/README.md +41 -8
- package/dist/index.cjs +7199 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +867 -0
- package/dist/index.d.ts +867 -0
- package/dist/index.mjs +7152 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +32 -8
- package/index.js +0 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,867 @@
|
|
|
1
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
|
+
|
|
3
|
+
interface Bundle {
|
|
4
|
+
schema_version: string;
|
|
5
|
+
kind: string;
|
|
6
|
+
entry: string;
|
|
7
|
+
modules: {
|
|
8
|
+
[key: string]: Module;
|
|
9
|
+
};
|
|
10
|
+
environments: {
|
|
11
|
+
[key: string]: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
} | undefined;
|
|
14
|
+
};
|
|
15
|
+
environment_backends: {
|
|
16
|
+
[key: string]: BackendConfig;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
declare const Bundle: MessageFns$1<Bundle>;
|
|
20
|
+
interface Module {
|
|
21
|
+
id: string;
|
|
22
|
+
version: string;
|
|
23
|
+
source: Source | undefined;
|
|
24
|
+
interface: Interface | undefined;
|
|
25
|
+
modules: Use[];
|
|
26
|
+
resources: Resource[];
|
|
27
|
+
locals: Local[];
|
|
28
|
+
exports: Exports | undefined;
|
|
29
|
+
terraform: TerraformBlock | undefined;
|
|
30
|
+
providers: ProviderConfig[];
|
|
31
|
+
}
|
|
32
|
+
declare const Module: MessageFns$1<Module>;
|
|
33
|
+
interface Interface {
|
|
34
|
+
inputs: InputDef$1[];
|
|
35
|
+
outputs: OutputDef$1[];
|
|
36
|
+
}
|
|
37
|
+
declare const Interface: MessageFns$1<Interface>;
|
|
38
|
+
interface InputDef$1 {
|
|
39
|
+
name: string;
|
|
40
|
+
type: string;
|
|
41
|
+
required: boolean;
|
|
42
|
+
description: string;
|
|
43
|
+
default_value: any | undefined;
|
|
44
|
+
validation: ValidationBlock$1 | undefined;
|
|
45
|
+
}
|
|
46
|
+
declare const InputDef$1: MessageFns$1<InputDef$1>;
|
|
47
|
+
interface ValidationBlock$1 {
|
|
48
|
+
condition: string;
|
|
49
|
+
error_message: string;
|
|
50
|
+
}
|
|
51
|
+
declare const ValidationBlock$1: MessageFns$1<ValidationBlock$1>;
|
|
52
|
+
interface OutputDef$1 {
|
|
53
|
+
name: string;
|
|
54
|
+
type: string;
|
|
55
|
+
description: string;
|
|
56
|
+
sensitive: boolean;
|
|
57
|
+
}
|
|
58
|
+
declare const OutputDef$1: MessageFns$1<OutputDef$1>;
|
|
59
|
+
interface Source {
|
|
60
|
+
kind: string;
|
|
61
|
+
repo: string;
|
|
62
|
+
subdir: string;
|
|
63
|
+
ref: string;
|
|
64
|
+
organization: string;
|
|
65
|
+
}
|
|
66
|
+
declare const Source: MessageFns$1<Source>;
|
|
67
|
+
interface Local {
|
|
68
|
+
name: string;
|
|
69
|
+
value: Binding | undefined;
|
|
70
|
+
}
|
|
71
|
+
declare const Local: MessageFns$1<Local>;
|
|
72
|
+
interface Use {
|
|
73
|
+
id: string;
|
|
74
|
+
module: string;
|
|
75
|
+
inputs: {
|
|
76
|
+
[key: string]: Binding;
|
|
77
|
+
};
|
|
78
|
+
depends_on: string[];
|
|
79
|
+
}
|
|
80
|
+
declare const Use: MessageFns$1<Use>;
|
|
81
|
+
interface Resource {
|
|
82
|
+
id: string;
|
|
83
|
+
kind: string;
|
|
84
|
+
type: string;
|
|
85
|
+
inputs: {
|
|
86
|
+
[key: string]: Binding;
|
|
87
|
+
};
|
|
88
|
+
depends_on: string[];
|
|
89
|
+
}
|
|
90
|
+
declare const Resource: MessageFns$1<Resource>;
|
|
91
|
+
interface Exports {
|
|
92
|
+
outputs: {
|
|
93
|
+
[key: string]: OutputExport;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
declare const Exports: MessageFns$1<Exports>;
|
|
97
|
+
interface OutputExport {
|
|
98
|
+
out: OutputRef | undefined;
|
|
99
|
+
lit: any | undefined;
|
|
100
|
+
var: string;
|
|
101
|
+
expr: Expression | undefined;
|
|
102
|
+
}
|
|
103
|
+
declare const OutputExport: MessageFns$1<OutputExport>;
|
|
104
|
+
interface Binding {
|
|
105
|
+
lit?: any | undefined;
|
|
106
|
+
var?: string | undefined;
|
|
107
|
+
out?: OutputRef | undefined;
|
|
108
|
+
expr?: Expression | undefined;
|
|
109
|
+
}
|
|
110
|
+
declare const Binding: MessageFns$1<Binding>;
|
|
111
|
+
interface OutputRef {
|
|
112
|
+
module: string;
|
|
113
|
+
name: string;
|
|
114
|
+
}
|
|
115
|
+
declare const OutputRef: MessageFns$1<OutputRef>;
|
|
116
|
+
interface Expression {
|
|
117
|
+
lang: string;
|
|
118
|
+
value: string;
|
|
119
|
+
}
|
|
120
|
+
declare const Expression: MessageFns$1<Expression>;
|
|
121
|
+
interface TerraformBlock {
|
|
122
|
+
required_version: string;
|
|
123
|
+
required_providers: {
|
|
124
|
+
[key: string]: ProviderRequirement;
|
|
125
|
+
};
|
|
126
|
+
backend: BackendConfig | undefined;
|
|
127
|
+
}
|
|
128
|
+
declare const TerraformBlock: MessageFns$1<TerraformBlock>;
|
|
129
|
+
interface ProviderRequirement {
|
|
130
|
+
source: string;
|
|
131
|
+
version: string;
|
|
132
|
+
}
|
|
133
|
+
declare const ProviderRequirement: MessageFns$1<ProviderRequirement>;
|
|
134
|
+
interface BackendConfig {
|
|
135
|
+
type: string;
|
|
136
|
+
config: {
|
|
137
|
+
[key: string]: any | undefined;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
declare const BackendConfig: MessageFns$1<BackendConfig>;
|
|
141
|
+
interface ProviderConfig {
|
|
142
|
+
name: string;
|
|
143
|
+
alias: string;
|
|
144
|
+
config: {
|
|
145
|
+
[key: string]: any | undefined;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
declare const ProviderConfig: MessageFns$1<ProviderConfig>;
|
|
149
|
+
interface GraphLayout {
|
|
150
|
+
nodes: {
|
|
151
|
+
[key: string]: NodeLayout;
|
|
152
|
+
};
|
|
153
|
+
groups: {
|
|
154
|
+
[key: string]: NodeGroup;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
declare const GraphLayout: MessageFns$1<GraphLayout>;
|
|
158
|
+
interface NodeGroup {
|
|
159
|
+
id: string;
|
|
160
|
+
label: string;
|
|
161
|
+
node_ids: string[];
|
|
162
|
+
collapsed: boolean;
|
|
163
|
+
}
|
|
164
|
+
declare const NodeGroup: MessageFns$1<NodeGroup>;
|
|
165
|
+
interface NodeLayout {
|
|
166
|
+
position: Position$1 | undefined;
|
|
167
|
+
}
|
|
168
|
+
declare const NodeLayout: MessageFns$1<NodeLayout>;
|
|
169
|
+
interface Position$1 {
|
|
170
|
+
x: number;
|
|
171
|
+
y: number;
|
|
172
|
+
}
|
|
173
|
+
declare const Position$1: MessageFns$1<Position$1>;
|
|
174
|
+
/**
|
|
175
|
+
* Top-level wrapper so the `layouts` map can travel as its own multipart
|
|
176
|
+
* body part alongside `bundle` bytes on POST /api/v1/runs. Separating
|
|
177
|
+
* bundle + layouts into two binary parts keeps server-side bundle
|
|
178
|
+
* hashing trivial — the server hashes the `bundle` part bytes directly
|
|
179
|
+
* without decoding or re-encoding.
|
|
180
|
+
*/
|
|
181
|
+
interface LayoutsMap {
|
|
182
|
+
layouts: {
|
|
183
|
+
[key: string]: GraphLayout;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
declare const LayoutsMap: MessageFns$1<LayoutsMap>;
|
|
187
|
+
/**
|
|
188
|
+
* PolicyResolution is the wire-shape of a Lace policy evaluation result.
|
|
189
|
+
* Mirrors `apps/cli/internal/policy.Resolution` + relevant DecisionLog
|
|
190
|
+
* fields. Used both by the Subscribe stream's authoring-time preview
|
|
191
|
+
* and by the PreviewPolicyResolution RPC for counterfactual queries.
|
|
192
|
+
*
|
|
193
|
+
* `mode` is one of: auto_apply, lightweight_audit, awaiting_approval,
|
|
194
|
+
* policy_blocked. `runner_location` is local|managed (empty for
|
|
195
|
+
* awaiting_approval / policy_blocked, where no run will be dispatched).
|
|
196
|
+
*/
|
|
197
|
+
interface PolicyResolution {
|
|
198
|
+
mode: string;
|
|
199
|
+
runner_location: string;
|
|
200
|
+
policy_id: string;
|
|
201
|
+
rules_fired: string[];
|
|
202
|
+
reason: string;
|
|
203
|
+
approval_mode: string;
|
|
204
|
+
condition_trace: PolicyConditionTrace[];
|
|
205
|
+
/**
|
|
206
|
+
* True when the resolution was computed against synthetic
|
|
207
|
+
* authoring-time input (no real terraform plan). Drives the
|
|
208
|
+
* "Preview" UI affordance in the canvas sidebar.
|
|
209
|
+
*/
|
|
210
|
+
is_authoring_time_preview: boolean;
|
|
211
|
+
}
|
|
212
|
+
declare const PolicyResolution: MessageFns$1<PolicyResolution>;
|
|
213
|
+
/**
|
|
214
|
+
* PolicyConditionTrace is one rule's contribution to the resolution:
|
|
215
|
+
* whether it fired plus the per-predicate breakdown that produced the
|
|
216
|
+
* fire/no-fire outcome. Mirrors `apps/cli/internal/policy.ConditionTrace`.
|
|
217
|
+
*/
|
|
218
|
+
interface PolicyConditionTrace {
|
|
219
|
+
policy_id: string;
|
|
220
|
+
label: string;
|
|
221
|
+
fired: boolean;
|
|
222
|
+
predicates: PolicyPredicateTrace[];
|
|
223
|
+
}
|
|
224
|
+
declare const PolicyConditionTrace: MessageFns$1<PolicyConditionTrace>;
|
|
225
|
+
/**
|
|
226
|
+
* PolicyPredicateTrace is one predicate within a condition. `predicate`
|
|
227
|
+
* names the predicate kind (resourceDestroyGte, attributePath,
|
|
228
|
+
* riskFormula, etc.). `evaluated` is a JSON-encoded scalar (Evaluated
|
|
229
|
+
* is `any` on the Go side; proto carries it as string for portability).
|
|
230
|
+
*
|
|
231
|
+
* `cannot_evaluate` distinguishes "predicate honestly evaluated false"
|
|
232
|
+
* (cannot_evaluate=false, fired=false) from "input did not contain the
|
|
233
|
+
* data this predicate needs" (cannot_evaluate=true, fired=false). The
|
|
234
|
+
* latter is the common case in canvas authoring-time preview where no
|
|
235
|
+
* real terraform plan exists, but it can also surface in authoritative
|
|
236
|
+
* eval if a plan is genuinely missing an expected attribute path —
|
|
237
|
+
* either way the audit log gains fidelity.
|
|
238
|
+
*/
|
|
239
|
+
interface PolicyPredicateTrace {
|
|
240
|
+
predicate: string;
|
|
241
|
+
fired: boolean;
|
|
242
|
+
evaluated: string;
|
|
243
|
+
cannot_evaluate: boolean;
|
|
244
|
+
}
|
|
245
|
+
declare const PolicyPredicateTrace: MessageFns$1<PolicyPredicateTrace>;
|
|
246
|
+
type Builtin$1 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
247
|
+
type DeepPartial$1<T> = T extends Builtin$1 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$1<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$1<U>> : T extends {} ? {
|
|
248
|
+
[K in keyof T]?: DeepPartial$1<T[K]>;
|
|
249
|
+
} : Partial<T>;
|
|
250
|
+
type KeysOfUnion$1<T> = T extends T ? keyof T : never;
|
|
251
|
+
type Exact$1<P, I extends P> = P extends Builtin$1 ? P : P & {
|
|
252
|
+
[K in keyof P]: Exact$1<P[K], I[K]>;
|
|
253
|
+
} & {
|
|
254
|
+
[K in Exclude<keyof I, KeysOfUnion$1<P>>]: never;
|
|
255
|
+
};
|
|
256
|
+
interface MessageFns$1<T> {
|
|
257
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
258
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
259
|
+
fromJSON(object: any): T;
|
|
260
|
+
toJSON(message: T): unknown;
|
|
261
|
+
create<I extends Exact$1<DeepPartial$1<T>, I>>(base?: I): T;
|
|
262
|
+
fromPartial<I extends Exact$1<DeepPartial$1<T>, I>>(object: I): T;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
declare enum NodeKind {
|
|
266
|
+
NODE_KIND_UNSPECIFIED = 0,
|
|
267
|
+
NODE_KIND_MODULE = 1,
|
|
268
|
+
NODE_KIND_RESOURCE = 2,
|
|
269
|
+
NODE_KIND_DATA = 3,
|
|
270
|
+
UNRECOGNIZED = -1
|
|
271
|
+
}
|
|
272
|
+
declare enum InputMode {
|
|
273
|
+
INPUT_MODE_UNSPECIFIED = 0,
|
|
274
|
+
INPUT_MODE_EMPTY = 1,
|
|
275
|
+
INPUT_MODE_LITERAL = 2,
|
|
276
|
+
INPUT_MODE_VARIABLE = 3,
|
|
277
|
+
INPUT_MODE_EXPRESSION = 4,
|
|
278
|
+
INPUT_MODE_WIRED = 5,
|
|
279
|
+
UNRECOGNIZED = -1
|
|
280
|
+
}
|
|
281
|
+
interface OutputExportEntry {
|
|
282
|
+
name: string;
|
|
283
|
+
source_instance: string;
|
|
284
|
+
source_output: string;
|
|
285
|
+
}
|
|
286
|
+
declare const OutputExportEntry: MessageFns<OutputExportEntry>;
|
|
287
|
+
/**
|
|
288
|
+
* BundleState is the authoritative session state over the wire: the
|
|
289
|
+
* Bundle IR + per-scope layouts + session-undo metadata. Consumers
|
|
290
|
+
* (VS Code extension, portal, tests) project this locally via the
|
|
291
|
+
* canvas package's `projectCanvasView` to produce a renderable
|
|
292
|
+
* CanvasView.
|
|
293
|
+
*
|
|
294
|
+
* Not to be confused with the `bundle_snapshot` API entity, which is
|
|
295
|
+
* the content-addressed immutable archival form in D1 + R2. BundleState
|
|
296
|
+
* is a live, per-session wire shape.
|
|
297
|
+
*/
|
|
298
|
+
interface BundleState {
|
|
299
|
+
bundle: Bundle | undefined;
|
|
300
|
+
layouts: {
|
|
301
|
+
[key: string]: GraphLayout;
|
|
302
|
+
};
|
|
303
|
+
can_undo: boolean;
|
|
304
|
+
can_redo: boolean;
|
|
305
|
+
is_dirty: boolean;
|
|
306
|
+
}
|
|
307
|
+
declare const BundleState: MessageFns<BundleState>;
|
|
308
|
+
interface CanvasView$1 {
|
|
309
|
+
module_name: string;
|
|
310
|
+
nodes: RenderNode$1[];
|
|
311
|
+
edges: RenderEdge$1[];
|
|
312
|
+
errors: RenderError$1[];
|
|
313
|
+
can_undo: boolean;
|
|
314
|
+
can_redo: boolean;
|
|
315
|
+
is_dirty: boolean;
|
|
316
|
+
groups: RenderGroup$1[];
|
|
317
|
+
}
|
|
318
|
+
declare const CanvasView$1: MessageFns<CanvasView$1>;
|
|
319
|
+
/**
|
|
320
|
+
* RenderGroup represents an expand/collapse container on the canvas.
|
|
321
|
+
* One `group` on the canvas corresponds to either a child Use whose
|
|
322
|
+
* target module has its own sub-modules, or a user-created group
|
|
323
|
+
* produced via CreateGroupAction.
|
|
324
|
+
*
|
|
325
|
+
* A group's behaviour:
|
|
326
|
+
* - Registry drops whose target has sub-modules: module_key names
|
|
327
|
+
* that target; inputs/outputs mirror its declared Interface.
|
|
328
|
+
* - User-created groups (via "Group" canvas action): module_key is
|
|
329
|
+
* empty; inputs/outputs are derived from crossing edges by the
|
|
330
|
+
* webview.
|
|
331
|
+
*
|
|
332
|
+
* Groups arrive collapsed (collapsed=true) across all creation paths
|
|
333
|
+
* for consistency. Expand/collapse is a pure view toggle that never
|
|
334
|
+
* changes the IR or generated .tf — ungroup is the destructive
|
|
335
|
+
* dissolve action.
|
|
336
|
+
*/
|
|
337
|
+
interface RenderGroup$1 {
|
|
338
|
+
id: string;
|
|
339
|
+
label: string;
|
|
340
|
+
node_ids: string[];
|
|
341
|
+
collapsed: boolean;
|
|
342
|
+
/**
|
|
343
|
+
* Bundle source identifier (e.g. "aws/examples/iam_stack@v1.0.0")
|
|
344
|
+
* for groups backed by a registry drop; empty for user-created
|
|
345
|
+
* local groups.
|
|
346
|
+
*/
|
|
347
|
+
module_key: string;
|
|
348
|
+
/**
|
|
349
|
+
* Boundary input pins — what the group's target accepts from its
|
|
350
|
+
* parent scope. Rendered on the left rail when collapsed; derived
|
|
351
|
+
* from the target's Interface.Inputs (module-backed groups) or the
|
|
352
|
+
* crossing edges (user-created groups).
|
|
353
|
+
*/
|
|
354
|
+
inputs: NodePin$1[];
|
|
355
|
+
/**
|
|
356
|
+
* Boundary output pins — what the group's target exposes to its
|
|
357
|
+
* parent scope. Rendered on the right rail when collapsed; derived
|
|
358
|
+
* from the target's Exports (module-backed groups) or outgoing
|
|
359
|
+
* crossing edges (user-created groups).
|
|
360
|
+
*/
|
|
361
|
+
outputs: NodePin$1[];
|
|
362
|
+
}
|
|
363
|
+
declare const RenderGroup$1: MessageFns<RenderGroup$1>;
|
|
364
|
+
interface RenderNode$1 {
|
|
365
|
+
id: string;
|
|
366
|
+
label: string;
|
|
367
|
+
kind: NodeKind;
|
|
368
|
+
module_key: string;
|
|
369
|
+
icon_url: string;
|
|
370
|
+
position: Position | undefined;
|
|
371
|
+
has_errors: boolean;
|
|
372
|
+
error_messages: string[];
|
|
373
|
+
inputs: NodePin$1[];
|
|
374
|
+
outputs: NodePin$1[];
|
|
375
|
+
}
|
|
376
|
+
declare const RenderNode$1: MessageFns<RenderNode$1>;
|
|
377
|
+
/**
|
|
378
|
+
* NodePin is a compact handle descriptor rendered on the canvas. One pin is
|
|
379
|
+
* emitted per input variable (left rail) and per output (right rail) so the
|
|
380
|
+
* webview can draw Blender-style per-variable connection handles.
|
|
381
|
+
*/
|
|
382
|
+
interface NodePin$1 {
|
|
383
|
+
name: string;
|
|
384
|
+
/** HCL type string, e.g. "string", "list(object)" */
|
|
385
|
+
type: string;
|
|
386
|
+
/** inputs only; always false for outputs */
|
|
387
|
+
required: boolean;
|
|
388
|
+
/** input has an Out binding, or output feeds >=1 edge */
|
|
389
|
+
wired: boolean;
|
|
390
|
+
description: string;
|
|
391
|
+
/** outputs only */
|
|
392
|
+
sensitive: boolean;
|
|
393
|
+
}
|
|
394
|
+
declare const NodePin$1: MessageFns<NodePin$1>;
|
|
395
|
+
interface RenderEdge$1 {
|
|
396
|
+
id: string;
|
|
397
|
+
source: string;
|
|
398
|
+
target: string;
|
|
399
|
+
source_output: string;
|
|
400
|
+
target_input: string;
|
|
401
|
+
}
|
|
402
|
+
declare const RenderEdge$1: MessageFns<RenderEdge$1>;
|
|
403
|
+
interface RenderInput$1 {
|
|
404
|
+
name: string;
|
|
405
|
+
type: string;
|
|
406
|
+
required: boolean;
|
|
407
|
+
description: string;
|
|
408
|
+
default_value: any | undefined;
|
|
409
|
+
validation: ValidationBlock | undefined;
|
|
410
|
+
mode: InputMode;
|
|
411
|
+
value: any | undefined;
|
|
412
|
+
variable: string;
|
|
413
|
+
expression: string;
|
|
414
|
+
wired_source: string;
|
|
415
|
+
}
|
|
416
|
+
declare const RenderInput$1: MessageFns<RenderInput$1>;
|
|
417
|
+
interface RenderOutput$1 {
|
|
418
|
+
name: string;
|
|
419
|
+
type: string;
|
|
420
|
+
description: string;
|
|
421
|
+
sensitive: boolean;
|
|
422
|
+
}
|
|
423
|
+
declare const RenderOutput$1: MessageFns<RenderOutput$1>;
|
|
424
|
+
interface NodeConfig$1 {
|
|
425
|
+
instance_id: string;
|
|
426
|
+
inputs: RenderInput$1[];
|
|
427
|
+
outputs: RenderOutput$1[];
|
|
428
|
+
sibling_ids: string[];
|
|
429
|
+
depends_on: string[];
|
|
430
|
+
available_variables: VariableRef[];
|
|
431
|
+
}
|
|
432
|
+
declare const NodeConfig$1: MessageFns<NodeConfig$1>;
|
|
433
|
+
interface VariableRef {
|
|
434
|
+
name: string;
|
|
435
|
+
type: string;
|
|
436
|
+
}
|
|
437
|
+
declare const VariableRef: MessageFns<VariableRef>;
|
|
438
|
+
interface EdgeConfig$1 {
|
|
439
|
+
source_instance: string;
|
|
440
|
+
target_instance: string;
|
|
441
|
+
source_outputs: RenderOutput$1[];
|
|
442
|
+
target_unbound_inputs: RenderInput$1[];
|
|
443
|
+
}
|
|
444
|
+
declare const EdgeConfig$1: MessageFns<EdgeConfig$1>;
|
|
445
|
+
interface SettingsConfig$1 {
|
|
446
|
+
terraform: TerraformView | undefined;
|
|
447
|
+
providers: ProviderView[];
|
|
448
|
+
locals: LocalView[];
|
|
449
|
+
environments: {
|
|
450
|
+
[key: string]: {
|
|
451
|
+
[key: string]: any;
|
|
452
|
+
} | undefined;
|
|
453
|
+
};
|
|
454
|
+
environment_backends: {
|
|
455
|
+
[key: string]: BackendView;
|
|
456
|
+
};
|
|
457
|
+
/**
|
|
458
|
+
* Interface — the entry module's curated public surface, surfaced to
|
|
459
|
+
* the UnifiedSettingsPanel's Module > Interface accordion. Inputs are
|
|
460
|
+
* the composition's `var.xxx` declarations (auto-derived on first
|
|
461
|
+
* generate, edited by hand thereafter). Exports name which child
|
|
462
|
+
* outputs are surfaced to consumers; output_defs carries the matching
|
|
463
|
+
* type/description/sensitive metadata.
|
|
464
|
+
*/
|
|
465
|
+
variables: InputDef[];
|
|
466
|
+
exports: OutputExportEntry[];
|
|
467
|
+
output_defs: OutputDef[];
|
|
468
|
+
}
|
|
469
|
+
declare const SettingsConfig$1: MessageFns<SettingsConfig$1>;
|
|
470
|
+
interface TerraformView {
|
|
471
|
+
required_version: string;
|
|
472
|
+
required_providers: ProviderReqView[];
|
|
473
|
+
backend: BackendView | undefined;
|
|
474
|
+
}
|
|
475
|
+
declare const TerraformView: MessageFns<TerraformView>;
|
|
476
|
+
interface ProviderReqView {
|
|
477
|
+
name: string;
|
|
478
|
+
source: string;
|
|
479
|
+
version: string;
|
|
480
|
+
}
|
|
481
|
+
declare const ProviderReqView: MessageFns<ProviderReqView>;
|
|
482
|
+
interface BackendView {
|
|
483
|
+
type: string;
|
|
484
|
+
config: {
|
|
485
|
+
[key: string]: any | undefined;
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
declare const BackendView: MessageFns<BackendView>;
|
|
489
|
+
interface ProviderView {
|
|
490
|
+
name: string;
|
|
491
|
+
alias: string;
|
|
492
|
+
config: {
|
|
493
|
+
[key: string]: any | undefined;
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
declare const ProviderView: MessageFns<ProviderView>;
|
|
497
|
+
interface LocalView {
|
|
498
|
+
name: string;
|
|
499
|
+
mode: string;
|
|
500
|
+
value_display: string;
|
|
501
|
+
}
|
|
502
|
+
declare const LocalView: MessageFns<LocalView>;
|
|
503
|
+
interface RenderError$1 {
|
|
504
|
+
instance_id: string;
|
|
505
|
+
input_name: string;
|
|
506
|
+
message: string;
|
|
507
|
+
}
|
|
508
|
+
declare const RenderError$1: MessageFns<RenderError$1>;
|
|
509
|
+
interface Position {
|
|
510
|
+
x: number;
|
|
511
|
+
y: number;
|
|
512
|
+
}
|
|
513
|
+
declare const Position: MessageFns<Position>;
|
|
514
|
+
interface InputDef {
|
|
515
|
+
name: string;
|
|
516
|
+
type: string;
|
|
517
|
+
required: boolean;
|
|
518
|
+
description: string;
|
|
519
|
+
default_value: any | undefined;
|
|
520
|
+
validation: ValidationBlock | undefined;
|
|
521
|
+
}
|
|
522
|
+
declare const InputDef: MessageFns<InputDef>;
|
|
523
|
+
interface ValidationBlock {
|
|
524
|
+
condition: string;
|
|
525
|
+
error_message: string;
|
|
526
|
+
}
|
|
527
|
+
declare const ValidationBlock: MessageFns<ValidationBlock>;
|
|
528
|
+
interface OutputDef {
|
|
529
|
+
name: string;
|
|
530
|
+
type: string;
|
|
531
|
+
description: string;
|
|
532
|
+
sensitive: boolean;
|
|
533
|
+
}
|
|
534
|
+
declare const OutputDef: MessageFns<OutputDef>;
|
|
535
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
536
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
537
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
538
|
+
} : Partial<T>;
|
|
539
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
540
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
541
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
542
|
+
} & {
|
|
543
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
544
|
+
};
|
|
545
|
+
interface MessageFns<T> {
|
|
546
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
547
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
548
|
+
fromJSON(object: any): T;
|
|
549
|
+
toJSON(message: T): unknown;
|
|
550
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
551
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
type ProtoDiagnosticLike = {
|
|
555
|
+
severity: number;
|
|
556
|
+
message: string;
|
|
557
|
+
file: string;
|
|
558
|
+
line: number;
|
|
559
|
+
column: number;
|
|
560
|
+
instance_id?: string;
|
|
561
|
+
address?: string;
|
|
562
|
+
};
|
|
563
|
+
type ProtoRenderInputLike = {
|
|
564
|
+
name: string;
|
|
565
|
+
type: string;
|
|
566
|
+
required: boolean;
|
|
567
|
+
description: string;
|
|
568
|
+
default_value?: unknown;
|
|
569
|
+
validation?: {
|
|
570
|
+
condition: string;
|
|
571
|
+
error_message: string;
|
|
572
|
+
} | ValidationBlock;
|
|
573
|
+
mode: number;
|
|
574
|
+
value?: unknown;
|
|
575
|
+
variable: string;
|
|
576
|
+
expression: string;
|
|
577
|
+
wired_source: string;
|
|
578
|
+
};
|
|
579
|
+
type ProtoRenderNodeLike = {
|
|
580
|
+
id: string;
|
|
581
|
+
label: string;
|
|
582
|
+
kind: number;
|
|
583
|
+
module_key: string;
|
|
584
|
+
icon_url: string;
|
|
585
|
+
position?: {
|
|
586
|
+
x: number;
|
|
587
|
+
y: number;
|
|
588
|
+
} | Position;
|
|
589
|
+
has_errors: boolean;
|
|
590
|
+
error_messages: string[];
|
|
591
|
+
inputs: NodePin$1[];
|
|
592
|
+
outputs: NodePin$1[];
|
|
593
|
+
};
|
|
594
|
+
type ProtoRenderErrorLike = {
|
|
595
|
+
instance_id: string;
|
|
596
|
+
input_name: string;
|
|
597
|
+
message: string;
|
|
598
|
+
};
|
|
599
|
+
type ProtoCanvasViewLike = {
|
|
600
|
+
module_name: string;
|
|
601
|
+
nodes: ProtoRenderNodeLike[];
|
|
602
|
+
edges: RenderEdge$1[];
|
|
603
|
+
errors: ProtoRenderErrorLike[];
|
|
604
|
+
can_undo: boolean;
|
|
605
|
+
can_redo: boolean;
|
|
606
|
+
is_dirty: boolean;
|
|
607
|
+
groups: RenderGroup$1[];
|
|
608
|
+
};
|
|
609
|
+
type ProtoNodeConfigLike = {
|
|
610
|
+
instance_id: string;
|
|
611
|
+
inputs: ProtoRenderInputLike[];
|
|
612
|
+
outputs: RenderOutput$1[];
|
|
613
|
+
sibling_ids: string[];
|
|
614
|
+
depends_on: string[];
|
|
615
|
+
available_variables: VariableRef[];
|
|
616
|
+
};
|
|
617
|
+
type ProtoEdgeConfigLike = {
|
|
618
|
+
source_instance: string;
|
|
619
|
+
target_instance: string;
|
|
620
|
+
source_outputs: RenderOutput$1[];
|
|
621
|
+
target_unbound_inputs: ProtoRenderInputLike[];
|
|
622
|
+
};
|
|
623
|
+
type ProtoInputDefLike = {
|
|
624
|
+
name: string;
|
|
625
|
+
type: string;
|
|
626
|
+
required: boolean;
|
|
627
|
+
description: string;
|
|
628
|
+
default_value?: unknown;
|
|
629
|
+
validation?: {
|
|
630
|
+
condition: string;
|
|
631
|
+
error_message: string;
|
|
632
|
+
} | ValidationBlock;
|
|
633
|
+
};
|
|
634
|
+
type ProtoOutputDefLike = {
|
|
635
|
+
name: string;
|
|
636
|
+
type: string;
|
|
637
|
+
description: string;
|
|
638
|
+
sensitive: boolean;
|
|
639
|
+
};
|
|
640
|
+
type ProtoOutputExportEntryLike = {
|
|
641
|
+
name: string;
|
|
642
|
+
source_instance: string;
|
|
643
|
+
source_output: string;
|
|
644
|
+
};
|
|
645
|
+
type ProtoSettingsConfigLike = {
|
|
646
|
+
terraform?: TerraformView;
|
|
647
|
+
providers: ProviderView[];
|
|
648
|
+
locals: LocalView[];
|
|
649
|
+
environments: Record<string, Record<string, unknown> | undefined>;
|
|
650
|
+
variables: ProtoInputDefLike[];
|
|
651
|
+
exports: ProtoOutputExportEntryLike[];
|
|
652
|
+
output_defs: ProtoOutputDefLike[];
|
|
653
|
+
};
|
|
654
|
+
|
|
655
|
+
type CanvasView = {
|
|
656
|
+
module_name: string;
|
|
657
|
+
nodes: RenderNode[];
|
|
658
|
+
edges: RenderEdge[];
|
|
659
|
+
errors: RenderError[];
|
|
660
|
+
can_undo: boolean;
|
|
661
|
+
can_redo: boolean;
|
|
662
|
+
is_dirty: boolean;
|
|
663
|
+
groups: RenderGroup[];
|
|
664
|
+
};
|
|
665
|
+
type RenderGroup = {
|
|
666
|
+
id: string;
|
|
667
|
+
label: string;
|
|
668
|
+
node_ids: string[];
|
|
669
|
+
collapsed: boolean;
|
|
670
|
+
module_key?: string;
|
|
671
|
+
inputs?: NodePin[];
|
|
672
|
+
outputs?: NodePin[];
|
|
673
|
+
};
|
|
674
|
+
type RenderNode = {
|
|
675
|
+
id: string;
|
|
676
|
+
label: string;
|
|
677
|
+
kind: 'module' | 'resource' | 'data';
|
|
678
|
+
module_key?: string;
|
|
679
|
+
icon_url?: string;
|
|
680
|
+
position: {
|
|
681
|
+
x: number;
|
|
682
|
+
y: number;
|
|
683
|
+
};
|
|
684
|
+
has_errors: boolean;
|
|
685
|
+
error_messages: string[];
|
|
686
|
+
inputs: NodePin[];
|
|
687
|
+
outputs: NodePin[];
|
|
688
|
+
};
|
|
689
|
+
type NodePin = {
|
|
690
|
+
name: string;
|
|
691
|
+
type: string;
|
|
692
|
+
type_family?: string;
|
|
693
|
+
required?: boolean;
|
|
694
|
+
wired?: boolean;
|
|
695
|
+
description?: string;
|
|
696
|
+
sensitive?: boolean;
|
|
697
|
+
};
|
|
698
|
+
type RenderEdge = {
|
|
699
|
+
id: string;
|
|
700
|
+
source: string;
|
|
701
|
+
target: string;
|
|
702
|
+
source_output: string;
|
|
703
|
+
target_input: string;
|
|
704
|
+
};
|
|
705
|
+
type RenderInput = {
|
|
706
|
+
name: string;
|
|
707
|
+
type: string;
|
|
708
|
+
required: boolean;
|
|
709
|
+
description?: string;
|
|
710
|
+
default_value?: unknown;
|
|
711
|
+
validation?: {
|
|
712
|
+
condition: string;
|
|
713
|
+
error_message: string;
|
|
714
|
+
};
|
|
715
|
+
mode: 'empty' | 'literal' | 'variable' | 'expression' | 'wired';
|
|
716
|
+
value?: unknown;
|
|
717
|
+
variable?: string;
|
|
718
|
+
expression?: string;
|
|
719
|
+
wired_source?: string;
|
|
720
|
+
};
|
|
721
|
+
type RenderOutput = {
|
|
722
|
+
name: string;
|
|
723
|
+
type: string;
|
|
724
|
+
description?: string;
|
|
725
|
+
sensitive?: boolean;
|
|
726
|
+
};
|
|
727
|
+
type NodeConfig = {
|
|
728
|
+
instance_id: string;
|
|
729
|
+
inputs: RenderInput[];
|
|
730
|
+
outputs: RenderOutput[];
|
|
731
|
+
sibling_ids: string[];
|
|
732
|
+
depends_on: string[];
|
|
733
|
+
available_variables: Array<{
|
|
734
|
+
name: string;
|
|
735
|
+
type: string;
|
|
736
|
+
}>;
|
|
737
|
+
};
|
|
738
|
+
type EdgeConfig = {
|
|
739
|
+
source_instance: string;
|
|
740
|
+
target_instance: string;
|
|
741
|
+
source_outputs: RenderOutput[];
|
|
742
|
+
target_unbound_inputs: RenderInput[];
|
|
743
|
+
};
|
|
744
|
+
type SettingsConfig = {
|
|
745
|
+
terraform: {
|
|
746
|
+
required_version: string;
|
|
747
|
+
required_providers: Array<{
|
|
748
|
+
name: string;
|
|
749
|
+
source: string;
|
|
750
|
+
version: string;
|
|
751
|
+
}>;
|
|
752
|
+
};
|
|
753
|
+
providers: Array<{
|
|
754
|
+
name: string;
|
|
755
|
+
alias: string;
|
|
756
|
+
config: Record<string, unknown>;
|
|
757
|
+
}>;
|
|
758
|
+
locals: Array<{
|
|
759
|
+
name: string;
|
|
760
|
+
mode: string;
|
|
761
|
+
value_display: string;
|
|
762
|
+
}>;
|
|
763
|
+
environments: Record<string, Record<string, unknown>>;
|
|
764
|
+
variables: Array<{
|
|
765
|
+
name: string;
|
|
766
|
+
type: string;
|
|
767
|
+
required: boolean;
|
|
768
|
+
description?: string;
|
|
769
|
+
default_value?: unknown;
|
|
770
|
+
}>;
|
|
771
|
+
exports: Array<{
|
|
772
|
+
name: string;
|
|
773
|
+
source_instance: string;
|
|
774
|
+
source_output: string;
|
|
775
|
+
}>;
|
|
776
|
+
output_defs: Array<{
|
|
777
|
+
name: string;
|
|
778
|
+
type: string;
|
|
779
|
+
description?: string;
|
|
780
|
+
sensitive?: boolean;
|
|
781
|
+
}>;
|
|
782
|
+
};
|
|
783
|
+
type RenderError = {
|
|
784
|
+
instance_id?: string;
|
|
785
|
+
input_name?: string;
|
|
786
|
+
message: string;
|
|
787
|
+
};
|
|
788
|
+
type Diagnostic = {
|
|
789
|
+
severity: 'error' | 'warning' | 'info';
|
|
790
|
+
message: string;
|
|
791
|
+
instance_id?: string;
|
|
792
|
+
address?: string;
|
|
793
|
+
file?: string;
|
|
794
|
+
line?: number;
|
|
795
|
+
column?: number;
|
|
796
|
+
};
|
|
797
|
+
type GeneratePhase = 'generating' | 'formatting' | 'validating';
|
|
798
|
+
type ViewportIntent = {
|
|
799
|
+
kind: 'fit-all';
|
|
800
|
+
padding?: number;
|
|
801
|
+
duration?: number;
|
|
802
|
+
} | {
|
|
803
|
+
kind: 'focus-node';
|
|
804
|
+
nodeId: string;
|
|
805
|
+
padding?: number;
|
|
806
|
+
duration?: number;
|
|
807
|
+
};
|
|
808
|
+
|
|
809
|
+
type HostToWebview = {
|
|
810
|
+
command: 'loadState';
|
|
811
|
+
state: BundleState;
|
|
812
|
+
viewportIntent?: ViewportIntent;
|
|
813
|
+
} | {
|
|
814
|
+
command: 'generateProgress';
|
|
815
|
+
phase: GeneratePhase;
|
|
816
|
+
} | {
|
|
817
|
+
command: 'generateSuccess';
|
|
818
|
+
files?: string[];
|
|
819
|
+
} | {
|
|
820
|
+
command: 'generateError';
|
|
821
|
+
message: string;
|
|
822
|
+
diagnostics?: Diagnostic[];
|
|
823
|
+
} | {
|
|
824
|
+
command: 'policyResolution';
|
|
825
|
+
resolution: PolicyResolution;
|
|
826
|
+
} | {
|
|
827
|
+
command: 'engineResult';
|
|
828
|
+
requestId: string;
|
|
829
|
+
result?: unknown;
|
|
830
|
+
error?: string;
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
declare function convertNodeKind(value: number): 'module' | 'resource' | 'data';
|
|
834
|
+
declare function convertInputMode(value: number): 'empty' | 'literal' | 'variable' | 'expression' | 'wired';
|
|
835
|
+
declare function convertDiagnosticSeverity(value: number): 'error' | 'warning' | 'info';
|
|
836
|
+
declare function modeToInputMode(mode: string): number;
|
|
837
|
+
declare function convertRenderInput(input: ProtoRenderInputLike): RenderInput;
|
|
838
|
+
declare function convertRenderNode(node: ProtoRenderNodeLike): RenderNode;
|
|
839
|
+
declare function convertRenderError(error: ProtoRenderErrorLike): RenderError;
|
|
840
|
+
declare function convertCanvasView(proto: ProtoCanvasViewLike): CanvasView;
|
|
841
|
+
declare function convertNodeConfig(proto: ProtoNodeConfigLike): NodeConfig;
|
|
842
|
+
declare function convertEdgeConfig(proto: ProtoEdgeConfigLike): EdgeConfig;
|
|
843
|
+
declare function convertSettingsConfig(proto: ProtoSettingsConfigLike): SettingsConfig;
|
|
844
|
+
declare function convertDiagnostic(d: ProtoDiagnosticLike): Diagnostic;
|
|
845
|
+
|
|
846
|
+
type ProjectionMeta = {
|
|
847
|
+
moduleName?: string;
|
|
848
|
+
canUndo: boolean;
|
|
849
|
+
canRedo: boolean;
|
|
850
|
+
isDirty: boolean;
|
|
851
|
+
};
|
|
852
|
+
declare function projectCanvasView(bundle: Bundle, layouts: {
|
|
853
|
+
[key: string]: GraphLayout;
|
|
854
|
+
}, meta: ProjectionMeta): CanvasView;
|
|
855
|
+
|
|
856
|
+
type ParsedModuleKey = {
|
|
857
|
+
id: string;
|
|
858
|
+
version: string;
|
|
859
|
+
};
|
|
860
|
+
declare function parseModuleKey(key: string): ParsedModuleKey;
|
|
861
|
+
|
|
862
|
+
declare const CanvasViewProto: MessageFns<CanvasView$1>;
|
|
863
|
+
declare const NodeConfigProto: MessageFns<NodeConfig$1>;
|
|
864
|
+
declare const EdgeConfigProto: MessageFns<EdgeConfig$1>;
|
|
865
|
+
declare const SettingsConfigProto: MessageFns<SettingsConfig$1>;
|
|
866
|
+
|
|
867
|
+
export { Bundle, type CanvasView, CanvasViewProto, type DeepPartial$1 as DeepPartial, type Diagnostic, type EdgeConfig, EdgeConfigProto, type GeneratePhase, GraphLayout, type HostToWebview, LayoutsMap, type NodeConfig, NodeConfigProto, type NodePin, type ParsedModuleKey, type ProjectionMeta, type ProtoCanvasViewLike, type ProtoDiagnosticLike, type ProtoEdgeConfigLike, type ProtoInputDefLike, type ProtoNodeConfigLike, type ProtoOutputDefLike, type ProtoOutputExportEntryLike, type ProtoRenderErrorLike, type ProtoRenderInputLike, type ProtoRenderNodeLike, type ProtoSettingsConfigLike, type RenderEdge, type RenderError, type RenderGroup, type RenderInput, type RenderNode, type RenderOutput, type SettingsConfig, SettingsConfigProto, type ViewportIntent, convertCanvasView, convertDiagnostic, convertDiagnosticSeverity, convertEdgeConfig, convertInputMode, convertNodeConfig, convertNodeKind, convertRenderError, convertRenderInput, convertRenderNode, convertSettingsConfig, modeToInputMode, parseModuleKey, projectCanvasView };
|