@abco20/btxml-checker 0.1.0

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.
@@ -0,0 +1,425 @@
1
+ import { D as Diagnostic } from './diagnostic-B5htzyJ9.js';
2
+ import { z } from 'zod';
3
+
4
+ declare const severitySchema: z.ZodEnum<{
5
+ error: "error";
6
+ info: "info";
7
+ off: "off";
8
+ warn: "warn";
9
+ }>;
10
+ declare const ruleConfigSchema: z.ZodUnion<readonly [z.ZodEnum<{
11
+ error: "error";
12
+ info: "info";
13
+ off: "off";
14
+ warn: "warn";
15
+ }>, z.ZodTuple<[z.ZodEnum<{
16
+ error: "error";
17
+ info: "info";
18
+ off: "off";
19
+ warn: "warn";
20
+ }>, z.ZodRecord<z.ZodString, z.ZodUnknown>], null>]>;
21
+ declare const filesConfigSchema: z.ZodObject<{
22
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
+ ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
24
+ useGitignore: z.ZodOptional<z.ZodBoolean>;
25
+ followSymlinks: z.ZodOptional<z.ZodBoolean>;
26
+ maxSize: z.ZodOptional<z.ZodNumber>;
27
+ }, z.core.$strict>;
28
+ declare const resolverIncludesConfigSchema: z.ZodObject<{
29
+ elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
30
+ name: z.ZodString;
31
+ attribute: z.ZodString;
32
+ base: z.ZodOptional<z.ZodEnum<{
33
+ file: "file";
34
+ "project-root": "project-root";
35
+ }>>;
36
+ }, z.core.$strict>>>;
37
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
38
+ allowOutsideRoot: z.ZodOptional<z.ZodBoolean>;
39
+ maxDepth: z.ZodOptional<z.ZodNumber>;
40
+ maxFiles: z.ZodOptional<z.ZodNumber>;
41
+ }, z.core.$strict>;
42
+ declare const resolverConfigSchema: z.ZodObject<{
43
+ entrypoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
44
+ includes: z.ZodOptional<z.ZodObject<{
45
+ elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
46
+ name: z.ZodString;
47
+ attribute: z.ZodString;
48
+ base: z.ZodOptional<z.ZodEnum<{
49
+ file: "file";
50
+ "project-root": "project-root";
51
+ }>>;
52
+ }, z.core.$strict>>>;
53
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
54
+ allowOutsideRoot: z.ZodOptional<z.ZodBoolean>;
55
+ maxDepth: z.ZodOptional<z.ZodNumber>;
56
+ maxFiles: z.ZodOptional<z.ZodNumber>;
57
+ }, z.core.$strict>>;
58
+ behaviorTreeIds: z.ZodOptional<z.ZodEnum<{
59
+ "workspace-unique": "workspace-unique";
60
+ "file-local-first": "file-local-first";
61
+ "allow-ambiguous": "allow-ambiguous";
62
+ }>>;
63
+ }, z.core.$strict>;
64
+ declare const modelsConfigSchema: z.ZodObject<{
65
+ builtins: z.ZodOptional<z.ZodArray<z.ZodEnum<{
66
+ "btcpp-v4.6.2": "btcpp-v4.6.2";
67
+ "btcpp-v4.8.2": "btcpp-v4.8.2";
68
+ "btcpp-v4.9.0": "btcpp-v4.9.0";
69
+ "btcpp-v4": "btcpp-v4";
70
+ }>>>;
71
+ files: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
+ augmentations: z.ZodOptional<z.ZodArray<z.ZodString>>;
73
+ definitions: z.ZodOptional<z.ZodArray<z.ZodString>>;
74
+ inline: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
75
+ kind: z.ZodEnum<{
76
+ Action: "Action";
77
+ Condition: "Condition";
78
+ Control: "Control";
79
+ Decorator: "Decorator";
80
+ SubTree: "SubTree";
81
+ }>;
82
+ ports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
83
+ direction: z.ZodOptional<z.ZodEnum<{
84
+ input: "input";
85
+ output: "output";
86
+ inout: "inout";
87
+ }>>;
88
+ type: z.ZodOptional<z.ZodString>;
89
+ required: z.ZodOptional<z.ZodBoolean>;
90
+ default: z.ZodOptional<z.ZodString>;
91
+ description: z.ZodOptional<z.ZodString>;
92
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
93
+ }, z.core.$strict>>>;
94
+ description: z.ZodOptional<z.ZodString>;
95
+ }, z.core.$strict>>>;
96
+ }, z.core.$strict>;
97
+ declare const linterSuppressionsConfigSchema: z.ZodObject<{
98
+ inline: z.ZodOptional<z.ZodEnum<{
99
+ allow: "allow";
100
+ deny: "deny";
101
+ }>>;
102
+ }, z.core.$strict>;
103
+ declare const linterConfigSchema: z.ZodObject<{
104
+ enabled: z.ZodOptional<z.ZodBoolean>;
105
+ rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
106
+ error: "error";
107
+ info: "info";
108
+ off: "off";
109
+ warn: "warn";
110
+ }>, z.ZodTuple<[z.ZodEnum<{
111
+ error: "error";
112
+ info: "info";
113
+ off: "off";
114
+ warn: "warn";
115
+ }>, z.ZodRecord<z.ZodString, z.ZodUnknown>], null>]>>>;
116
+ baseline: z.ZodOptional<z.ZodString>;
117
+ suppressions: z.ZodOptional<z.ZodObject<{
118
+ inline: z.ZodOptional<z.ZodEnum<{
119
+ allow: "allow";
120
+ deny: "deny";
121
+ }>>;
122
+ }, z.core.$strict>>;
123
+ }, z.core.$strict>;
124
+ declare const formatterConfigSchema: z.ZodObject<{
125
+ indentWidth: z.ZodOptional<z.ZodNumber>;
126
+ xmlDeclaration: z.ZodOptional<z.ZodEnum<{
127
+ always: "always";
128
+ never: "never";
129
+ preserve: "preserve";
130
+ }>>;
131
+ blankLineBetweenBehaviorTrees: z.ZodOptional<z.ZodBoolean>;
132
+ lineEnding: z.ZodOptional<z.ZodEnum<{
133
+ lf: "lf";
134
+ crlf: "crlf";
135
+ auto: "auto";
136
+ }>>;
137
+ }, z.core.$strict>;
138
+ declare const overrideConfigSchema: z.ZodObject<{
139
+ files: z.ZodArray<z.ZodString>;
140
+ linter: z.ZodOptional<z.ZodObject<{
141
+ rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
142
+ error: "error";
143
+ info: "info";
144
+ off: "off";
145
+ warn: "warn";
146
+ }>, z.ZodTuple<[z.ZodEnum<{
147
+ error: "error";
148
+ info: "info";
149
+ off: "off";
150
+ warn: "warn";
151
+ }>, z.ZodRecord<z.ZodString, z.ZodUnknown>], null>]>>>;
152
+ suppressions: z.ZodOptional<z.ZodObject<{
153
+ inline: z.ZodOptional<z.ZodEnum<{
154
+ allow: "allow";
155
+ deny: "deny";
156
+ }>>;
157
+ }, z.core.$strict>>;
158
+ }, z.core.$strict>>;
159
+ formatter: z.ZodOptional<z.ZodObject<{
160
+ indentWidth: z.ZodOptional<z.ZodNumber>;
161
+ xmlDeclaration: z.ZodOptional<z.ZodEnum<{
162
+ always: "always";
163
+ never: "never";
164
+ preserve: "preserve";
165
+ }>>;
166
+ blankLineBetweenBehaviorTrees: z.ZodOptional<z.ZodBoolean>;
167
+ lineEnding: z.ZodOptional<z.ZodEnum<{
168
+ lf: "lf";
169
+ crlf: "crlf";
170
+ auto: "auto";
171
+ }>>;
172
+ }, z.core.$strict>>;
173
+ }, z.core.$strict>;
174
+ declare const rawBtxmlConfigSchema: z.ZodObject<{
175
+ $schema: z.ZodOptional<z.ZodString>;
176
+ strict: z.ZodOptional<z.ZodBoolean>;
177
+ files: z.ZodOptional<z.ZodObject<{
178
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
179
+ ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
180
+ useGitignore: z.ZodOptional<z.ZodBoolean>;
181
+ followSymlinks: z.ZodOptional<z.ZodBoolean>;
182
+ maxSize: z.ZodOptional<z.ZodNumber>;
183
+ }, z.core.$strict>>;
184
+ resolver: z.ZodOptional<z.ZodObject<{
185
+ entrypoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
186
+ includes: z.ZodOptional<z.ZodObject<{
187
+ elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
188
+ name: z.ZodString;
189
+ attribute: z.ZodString;
190
+ base: z.ZodOptional<z.ZodEnum<{
191
+ file: "file";
192
+ "project-root": "project-root";
193
+ }>>;
194
+ }, z.core.$strict>>>;
195
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
196
+ allowOutsideRoot: z.ZodOptional<z.ZodBoolean>;
197
+ maxDepth: z.ZodOptional<z.ZodNumber>;
198
+ maxFiles: z.ZodOptional<z.ZodNumber>;
199
+ }, z.core.$strict>>;
200
+ behaviorTreeIds: z.ZodOptional<z.ZodEnum<{
201
+ "workspace-unique": "workspace-unique";
202
+ "file-local-first": "file-local-first";
203
+ "allow-ambiguous": "allow-ambiguous";
204
+ }>>;
205
+ }, z.core.$strict>>;
206
+ models: z.ZodOptional<z.ZodObject<{
207
+ builtins: z.ZodOptional<z.ZodArray<z.ZodEnum<{
208
+ "btcpp-v4.6.2": "btcpp-v4.6.2";
209
+ "btcpp-v4.8.2": "btcpp-v4.8.2";
210
+ "btcpp-v4.9.0": "btcpp-v4.9.0";
211
+ "btcpp-v4": "btcpp-v4";
212
+ }>>>;
213
+ files: z.ZodOptional<z.ZodArray<z.ZodString>>;
214
+ augmentations: z.ZodOptional<z.ZodArray<z.ZodString>>;
215
+ definitions: z.ZodOptional<z.ZodArray<z.ZodString>>;
216
+ inline: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
217
+ kind: z.ZodEnum<{
218
+ Action: "Action";
219
+ Condition: "Condition";
220
+ Control: "Control";
221
+ Decorator: "Decorator";
222
+ SubTree: "SubTree";
223
+ }>;
224
+ ports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
225
+ direction: z.ZodOptional<z.ZodEnum<{
226
+ input: "input";
227
+ output: "output";
228
+ inout: "inout";
229
+ }>>;
230
+ type: z.ZodOptional<z.ZodString>;
231
+ required: z.ZodOptional<z.ZodBoolean>;
232
+ default: z.ZodOptional<z.ZodString>;
233
+ description: z.ZodOptional<z.ZodString>;
234
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
235
+ }, z.core.$strict>>>;
236
+ description: z.ZodOptional<z.ZodString>;
237
+ }, z.core.$strict>>>;
238
+ }, z.core.$strict>>;
239
+ linter: z.ZodOptional<z.ZodObject<{
240
+ enabled: z.ZodOptional<z.ZodBoolean>;
241
+ rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
242
+ error: "error";
243
+ info: "info";
244
+ off: "off";
245
+ warn: "warn";
246
+ }>, z.ZodTuple<[z.ZodEnum<{
247
+ error: "error";
248
+ info: "info";
249
+ off: "off";
250
+ warn: "warn";
251
+ }>, z.ZodRecord<z.ZodString, z.ZodUnknown>], null>]>>>;
252
+ baseline: z.ZodOptional<z.ZodString>;
253
+ suppressions: z.ZodOptional<z.ZodObject<{
254
+ inline: z.ZodOptional<z.ZodEnum<{
255
+ allow: "allow";
256
+ deny: "deny";
257
+ }>>;
258
+ }, z.core.$strict>>;
259
+ }, z.core.$strict>>;
260
+ formatter: z.ZodOptional<z.ZodObject<{
261
+ indentWidth: z.ZodOptional<z.ZodNumber>;
262
+ xmlDeclaration: z.ZodOptional<z.ZodEnum<{
263
+ always: "always";
264
+ never: "never";
265
+ preserve: "preserve";
266
+ }>>;
267
+ blankLineBetweenBehaviorTrees: z.ZodOptional<z.ZodBoolean>;
268
+ lineEnding: z.ZodOptional<z.ZodEnum<{
269
+ lf: "lf";
270
+ crlf: "crlf";
271
+ auto: "auto";
272
+ }>>;
273
+ }, z.core.$strict>>;
274
+ overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
275
+ files: z.ZodArray<z.ZodString>;
276
+ linter: z.ZodOptional<z.ZodObject<{
277
+ rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
278
+ error: "error";
279
+ info: "info";
280
+ off: "off";
281
+ warn: "warn";
282
+ }>, z.ZodTuple<[z.ZodEnum<{
283
+ error: "error";
284
+ info: "info";
285
+ off: "off";
286
+ warn: "warn";
287
+ }>, z.ZodRecord<z.ZodString, z.ZodUnknown>], null>]>>>;
288
+ suppressions: z.ZodOptional<z.ZodObject<{
289
+ inline: z.ZodOptional<z.ZodEnum<{
290
+ allow: "allow";
291
+ deny: "deny";
292
+ }>>;
293
+ }, z.core.$strict>>;
294
+ }, z.core.$strict>>;
295
+ formatter: z.ZodOptional<z.ZodObject<{
296
+ indentWidth: z.ZodOptional<z.ZodNumber>;
297
+ xmlDeclaration: z.ZodOptional<z.ZodEnum<{
298
+ always: "always";
299
+ never: "never";
300
+ preserve: "preserve";
301
+ }>>;
302
+ blankLineBetweenBehaviorTrees: z.ZodOptional<z.ZodBoolean>;
303
+ lineEnding: z.ZodOptional<z.ZodEnum<{
304
+ lf: "lf";
305
+ crlf: "crlf";
306
+ auto: "auto";
307
+ }>>;
308
+ }, z.core.$strict>>;
309
+ }, z.core.$strict>>>;
310
+ }, z.core.$strict>;
311
+ type RawBtxmlConfigInput = z.input<typeof rawBtxmlConfigSchema>;
312
+ type RawBtxmlConfig = z.output<typeof rawBtxmlConfigSchema>;
313
+ type ConfigSeverity = z.output<typeof severitySchema>;
314
+ type RuleConfig = z.output<typeof ruleConfigSchema>;
315
+ type RawFilesConfig = z.output<typeof filesConfigSchema>;
316
+ type RawResolverIncludesConfig = z.output<typeof resolverIncludesConfigSchema>;
317
+ type RawResolverConfig = z.output<typeof resolverConfigSchema>;
318
+ type RawModelsConfig = z.output<typeof modelsConfigSchema>;
319
+ type RawLinterSuppressionsConfig = z.output<typeof linterSuppressionsConfigSchema>;
320
+ type RawLinterConfig = z.output<typeof linterConfigSchema>;
321
+ type RawFormatterConfig = z.output<typeof formatterConfigSchema>;
322
+ type RawOverrideConfig = z.output<typeof overrideConfigSchema>;
323
+
324
+ type ResolvedFilesConfig = {
325
+ include: string[];
326
+ ignore: string[];
327
+ useGitignore: boolean;
328
+ followSymlinks: boolean;
329
+ maxSize: number;
330
+ };
331
+ type ResolvedResolverIncludesConfig = {
332
+ elements: {
333
+ name: string;
334
+ attribute: string;
335
+ base: "file" | "project-root";
336
+ }[];
337
+ variables: Record<string, string>;
338
+ allowOutsideRoot: boolean;
339
+ maxDepth: number;
340
+ maxFiles: number;
341
+ };
342
+ type ResolvedResolverConfig = {
343
+ entrypoints: string[];
344
+ includes: ResolvedResolverIncludesConfig;
345
+ behaviorTreeIds: "workspace-unique" | "file-local-first" | "allow-ambiguous";
346
+ };
347
+ type ResolvedModelsConfig = {
348
+ builtins: string[];
349
+ files: string[];
350
+ augmentations: string[];
351
+ definitions: string[];
352
+ inline: Record<string, unknown>;
353
+ };
354
+ type ResolvedLinterSuppressionsConfig = {
355
+ inline: "allow" | "deny";
356
+ };
357
+ type ResolvedLinterConfig = {
358
+ enabled: boolean;
359
+ rules: Record<string, RuleConfig>;
360
+ baseline: string | undefined;
361
+ suppressions: ResolvedLinterSuppressionsConfig;
362
+ };
363
+ type ResolvedFormatterConfig = {
364
+ indentWidth: number;
365
+ xmlDeclaration: "always" | "never" | "preserve";
366
+ blankLineBetweenBehaviorTrees: boolean;
367
+ lineEnding: "lf" | "crlf" | "auto";
368
+ };
369
+ type PartialResolvedLinterSuppressionsConfig = {
370
+ inline?: ResolvedLinterSuppressionsConfig["inline"];
371
+ };
372
+ type PartialResolvedLinterConfig = {
373
+ enabled?: ResolvedLinterConfig["enabled"];
374
+ rules?: ResolvedLinterConfig["rules"];
375
+ baseline?: ResolvedLinterConfig["baseline"];
376
+ suppressions?: PartialResolvedLinterSuppressionsConfig;
377
+ };
378
+ type PartialResolvedFormatterConfig = {
379
+ indentWidth?: ResolvedFormatterConfig["indentWidth"];
380
+ xmlDeclaration?: ResolvedFormatterConfig["xmlDeclaration"];
381
+ blankLineBetweenBehaviorTrees?: ResolvedFormatterConfig["blankLineBetweenBehaviorTrees"];
382
+ lineEnding?: ResolvedFormatterConfig["lineEnding"];
383
+ };
384
+ type ResolvedOverrideConfig = {
385
+ files: string[];
386
+ linter?: PartialResolvedLinterConfig;
387
+ formatter?: PartialResolvedFormatterConfig;
388
+ };
389
+ type ResolvedBtxmlConfig = {
390
+ files: ResolvedFilesConfig;
391
+ resolver: ResolvedResolverConfig;
392
+ models: ResolvedModelsConfig;
393
+ linter: ResolvedLinterConfig;
394
+ formatter: ResolvedFormatterConfig;
395
+ overrides: ResolvedOverrideConfig[];
396
+ };
397
+ type EffectiveFileConfig = {
398
+ files: ResolvedFilesConfig;
399
+ resolver: ResolvedResolverConfig;
400
+ models: ResolvedModelsConfig;
401
+ linter: ResolvedLinterConfig;
402
+ formatter: ResolvedFormatterConfig;
403
+ };
404
+ type ConfigDiagnostic = {
405
+ code: string;
406
+ severity: "error" | "warning";
407
+ message: string;
408
+ path?: string;
409
+ help?: string;
410
+ };
411
+ type ConfigParseResult = {
412
+ ok: true;
413
+ value: RawBtxmlConfig;
414
+ diagnostics: ConfigDiagnostic[];
415
+ } | {
416
+ ok: false;
417
+ diagnostics: ConfigDiagnostic[];
418
+ };
419
+ type ConfigNormalizeResult = {
420
+ ok: boolean;
421
+ config: ResolvedBtxmlConfig;
422
+ diagnostics: Diagnostic[];
423
+ };
424
+
425
+ export type { ConfigDiagnostic as C, EffectiveFileConfig as E, ResolvedBtxmlConfig as R, RawBtxmlConfig as a, RawBtxmlConfigInput as b, ResolvedOverrideConfig as c, ConfigNormalizeResult as d, ConfigParseResult as e, ConfigSeverity as f, RawFilesConfig as g, RawFormatterConfig as h, RawLinterConfig as i, RawLinterSuppressionsConfig as j, RawModelsConfig as k, RawOverrideConfig as l, RawResolverConfig as m, RawResolverIncludesConfig as n, ResolvedFilesConfig as o, ResolvedFormatterConfig as p, ResolvedLinterConfig as q, ResolvedLinterSuppressionsConfig as r, ResolvedModelsConfig as s, ResolvedResolverConfig as t, ResolvedResolverIncludesConfig as u, RuleConfig as v };
@@ -0,0 +1,105 @@
1
+ import { S as SourceRange } from './diagnostic-B5htzyJ9.js';
2
+ import { T as TreeNodeKind$1, a as TreeNodeModelDef, N as NodeModelSource, P as PortDef } from './public-types-B2noBQY9.js';
3
+ import { N as NodeUsageResolution, P as PortUsageResolution, S as SubTreeResolution, U as UsageResolverConfig, a as NodeUsagePolicy } from './types-SY4-jKCn.js';
4
+
5
+ type TreeNodeKind = TreeNodeKind$1;
6
+ type BuildSemanticDocumentViewOptions = {
7
+ readonly config?: UsageResolverConfig;
8
+ readonly policy?: Partial<NodeUsagePolicy>;
9
+ };
10
+ interface BlackboardReferenceView {
11
+ readonly raw: string;
12
+ readonly key: string;
13
+ readonly range: SourceRange;
14
+ readonly syntax: "braced" | "bare" | "invalid";
15
+ }
16
+ interface SemanticAttributeView {
17
+ readonly name: string;
18
+ readonly value: string;
19
+ readonly range: SourceRange;
20
+ readonly nameRange: SourceRange;
21
+ readonly valueRange: SourceRange | undefined;
22
+ }
23
+ type SemanticNodeModelResolution = {
24
+ readonly status: "resolved";
25
+ readonly model: TreeNodeModelDef;
26
+ readonly source: NodeModelSource | undefined;
27
+ } | {
28
+ readonly status: "unresolved";
29
+ readonly nodeType: string;
30
+ } | {
31
+ readonly status: "ambiguous";
32
+ readonly nodeType: string;
33
+ readonly candidates: readonly TreeNodeModelDef[];
34
+ };
35
+ type SemanticPortResolution = {
36
+ readonly status: "resolved";
37
+ readonly port: PortDef;
38
+ } | {
39
+ readonly status: "allowed-arbitrary";
40
+ readonly name: string;
41
+ } | {
42
+ readonly status: "undeclared";
43
+ readonly name: string;
44
+ } | {
45
+ readonly status: "unknown-node-model";
46
+ };
47
+ interface SemanticPortBindingView {
48
+ readonly nodeId: string;
49
+ readonly portName: string;
50
+ readonly rawValue: string;
51
+ readonly direction: "input" | "output" | "inout" | "unknown";
52
+ readonly valueKind: "literal" | "blackboard-reference" | "substitution" | "empty" | "unknown";
53
+ readonly range: SourceRange;
54
+ readonly nameRange: SourceRange;
55
+ readonly valueRange: SourceRange | undefined;
56
+ readonly resolution: SemanticPortResolution;
57
+ readonly usage: PortUsageResolution;
58
+ readonly blackboardReferences: readonly BlackboardReferenceView[];
59
+ }
60
+ interface SemanticBehaviorTreeView {
61
+ readonly id: string | undefined;
62
+ readonly range: SourceRange;
63
+ readonly idRange: SourceRange | undefined;
64
+ readonly rootNodeId: string | undefined;
65
+ readonly nodeIds: readonly string[];
66
+ }
67
+ interface SemanticTreeNodeView {
68
+ readonly nodeId: string;
69
+ readonly path: readonly number[];
70
+ readonly instancePath: string;
71
+ readonly tagName: string;
72
+ readonly nodeType: string;
73
+ readonly name: string | undefined;
74
+ readonly idAttr: string | undefined;
75
+ readonly kind: TreeNodeKind | "unknown";
76
+ readonly range: SourceRange;
77
+ readonly fullRange: SourceRange | undefined;
78
+ readonly nameRange: SourceRange | undefined;
79
+ readonly parentNodeId: string | undefined;
80
+ readonly childNodeIds: readonly string[];
81
+ readonly behaviorTreeId: string | undefined;
82
+ readonly attributes: readonly SemanticAttributeView[];
83
+ readonly identityCandidates: readonly string[];
84
+ readonly model: SemanticNodeModelResolution;
85
+ readonly usage: NodeUsageResolution;
86
+ readonly portBindings: readonly SemanticPortBindingView[];
87
+ }
88
+ interface SemanticSubTreeCallView {
89
+ readonly nodeId: string;
90
+ readonly callId: string | undefined;
91
+ readonly range: SourceRange;
92
+ readonly target: SubTreeResolution;
93
+ readonly portBindings: readonly SemanticPortBindingView[];
94
+ }
95
+ interface SemanticDocumentView {
96
+ readonly uri: string;
97
+ readonly kind: "bt-xml" | "model-xml" | "unknown";
98
+ readonly mainTreeToExecute: string | undefined;
99
+ readonly mainTreeToExecuteRange: SourceRange | undefined;
100
+ readonly behaviorTrees: readonly SemanticBehaviorTreeView[];
101
+ readonly nodes: readonly SemanticTreeNodeView[];
102
+ readonly subtreeCalls: readonly SemanticSubTreeCallView[];
103
+ }
104
+
105
+ export type { BuildSemanticDocumentViewOptions as B, SemanticDocumentView as S, SemanticTreeNodeView as a, SemanticPortBindingView as b, SemanticSubTreeCallView as c };
@@ -0,0 +1,112 @@
1
+ import { a as BtXmlElement, b as BtXmlAttribute } from './ast-BbfR3S_b.js';
2
+ import { B as BehaviorTreeDef, a as TreeNodeModelDef, P as PortDef } from './public-types-B2noBQY9.js';
3
+ import { S as SemanticIndex, R as ResolveSubTreeInput } from './types-BaOc_AYN.js';
4
+
5
+ type SubTreeResolution = {
6
+ readonly status: "resolved";
7
+ readonly kind: "behavior-tree";
8
+ readonly treeId: string;
9
+ readonly behaviorTree: BehaviorTreeDef;
10
+ } | {
11
+ readonly status: "resolved";
12
+ readonly kind: "node-model";
13
+ readonly modelId: string;
14
+ readonly model: TreeNodeModelDef;
15
+ } | {
16
+ readonly status: "ambiguous";
17
+ readonly candidates: readonly string[];
18
+ readonly behaviorTrees: readonly BehaviorTreeDef[];
19
+ readonly definitions: readonly TreeNodeModelDef[];
20
+ } | {
21
+ readonly status: "unresolved";
22
+ readonly id: string | undefined;
23
+ };
24
+ declare function resolveSubTreeTarget(index: SemanticIndex, input: ResolveSubTreeInput): SubTreeResolution;
25
+
26
+ type NodeTagForm = "root" | "behavior-tree" | "tree-nodes-model" | "model-definition" | "include" | "concrete-node" | "generic-node" | "subtree" | "unknown-xml";
27
+ type UnknownSubTreePortMode = "allow" | "reject";
28
+ type NodeUsagePolicy = {
29
+ readonly unknownSubTreePorts: UnknownSubTreePortMode;
30
+ };
31
+ type NodeUsageModelResolution = {
32
+ readonly status: "resolved";
33
+ readonly model: TreeNodeModelDef;
34
+ } | {
35
+ readonly status: "ambiguous";
36
+ readonly nodeType: string;
37
+ readonly candidates: readonly TreeNodeModelDef[];
38
+ } | {
39
+ readonly status: "unresolved";
40
+ readonly nodeType: string | undefined;
41
+ } | {
42
+ readonly status: "not-a-node";
43
+ };
44
+ type PortUsageResolution = {
45
+ readonly status: "resolved";
46
+ readonly attribute: BtXmlAttribute;
47
+ readonly name: string;
48
+ readonly value: string;
49
+ readonly port: PortDef;
50
+ } | {
51
+ readonly status: "undeclared";
52
+ readonly attribute: BtXmlAttribute;
53
+ readonly name: string;
54
+ readonly value: string;
55
+ } | {
56
+ readonly status: "allowed-arbitrary";
57
+ readonly attribute: BtXmlAttribute;
58
+ readonly name: string;
59
+ readonly value: string;
60
+ } | {
61
+ readonly status: "reserved-attribute";
62
+ readonly attribute: BtXmlAttribute;
63
+ readonly name: string;
64
+ readonly value: string;
65
+ } | {
66
+ readonly status: "unknown-node-model";
67
+ readonly attribute: BtXmlAttribute;
68
+ readonly name: string;
69
+ readonly value: string;
70
+ };
71
+ type NodeUsageResolution = {
72
+ readonly element: BtXmlElement;
73
+ readonly tagName: string;
74
+ readonly tagForm: NodeTagForm;
75
+ readonly nodeType?: string;
76
+ readonly model: NodeUsageModelResolution;
77
+ readonly subtree?: {
78
+ readonly id?: string;
79
+ readonly target: SubTreeResolution;
80
+ };
81
+ readonly ports: readonly PortDef[];
82
+ readonly allowsArbitraryAttributes: boolean;
83
+ readonly portUsages: readonly PortUsageResolution[];
84
+ };
85
+ type UsageResolverBehaviorTreeIdPolicy = "workspace-unique" | "file-local-first" | "allow-ambiguous";
86
+ type UsageResolverConfig = {
87
+ readonly resolver?: {
88
+ readonly behaviorTreeIds?: UsageResolverBehaviorTreeIdPolicy;
89
+ };
90
+ };
91
+ type ResolveNodeUsageInput = {
92
+ readonly element: BtXmlElement;
93
+ /**
94
+ * Root element of the parsed document that owns `element`.
95
+ *
96
+ * Required for distinguishing runtime node usages from TreeNodesModel
97
+ * declarations such as <Action>, <Condition>, <SubTree>, and port
98
+ * definition tags.
99
+ *
100
+ * Pass undefined only for intentionally detached elements.
101
+ */
102
+ readonly documentRoot: BtXmlElement | undefined;
103
+ readonly uri?: string;
104
+ readonly config?: UsageResolverConfig;
105
+ readonly policy?: Partial<NodeUsagePolicy>;
106
+ readonly isModelDefinition?: boolean;
107
+ };
108
+ type ResolvePortUsageInput = ResolveNodeUsageInput & {
109
+ readonly attributeName: string;
110
+ };
111
+
112
+ export { type NodeUsageResolution as N, type PortUsageResolution as P, type ResolveNodeUsageInput as R, type SubTreeResolution as S, type UsageResolverConfig as U, type NodeUsagePolicy as a, type ResolvePortUsageInput as b, resolveSubTreeTarget as r };