@salesforce/metadata-plugins 1.3.0 → 1.4.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.
Files changed (71) hide show
  1. package/dist/index.d.ts +4 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +9 -2
  4. package/dist/plugins/agent/AgentParser.d.ts +34 -0
  5. package/dist/plugins/agent/AgentParser.d.ts.map +1 -0
  6. package/dist/plugins/agent/AgentParser.js +189 -0
  7. package/dist/plugins/agent/AgentVisualizer.d.ts +27 -0
  8. package/dist/plugins/agent/AgentVisualizer.d.ts.map +1 -0
  9. package/dist/plugins/agent/AgentVisualizer.js +36 -0
  10. package/dist/plugins/agent/extract/assertNever.d.ts +23 -0
  11. package/dist/plugins/agent/extract/assertNever.d.ts.map +1 -0
  12. package/dist/plugins/agent/extract/assertNever.js +24 -0
  13. package/dist/plugins/agent/extract/ast-to-graph.d.ts +137 -0
  14. package/dist/plugins/agent/extract/ast-to-graph.d.ts.map +1 -0
  15. package/dist/plugins/agent/extract/ast-to-graph.js +523 -0
  16. package/dist/plugins/agent/extract/ast-utils.d.ts +61 -0
  17. package/dist/plugins/agent/extract/ast-utils.d.ts.map +1 -0
  18. package/dist/plugins/agent/extract/ast-utils.js +7 -0
  19. package/dist/plugins/agent/extract/parseNamespacedRef.d.ts +31 -0
  20. package/dist/plugins/agent/extract/parseNamespacedRef.d.ts.map +1 -0
  21. package/dist/plugins/agent/extract/parseNamespacedRef.js +31 -0
  22. package/dist/plugins/agent/extract/reasoningParser.d.ts +112 -0
  23. package/dist/plugins/agent/extract/reasoningParser.d.ts.map +1 -0
  24. package/dist/plugins/agent/extract/reasoningParser.js +804 -0
  25. package/dist/plugins/agent/types/AgentScriptData.d.ts +31 -0
  26. package/dist/plugins/agent/types/AgentScriptData.d.ts.map +1 -0
  27. package/dist/plugins/agent/types/AgentScriptData.js +7 -0
  28. package/dist/plugins/agent/ui/assets/index-CTzSDPPx.css +1 -0
  29. package/dist/plugins/agent/ui/assets/index-D0wb9GBs.js +71 -0
  30. package/dist/plugins/agent/ui/index.html +14 -0
  31. package/dist/plugins/flexipage/FlexipageParser.d.ts +1 -1
  32. package/dist/plugins/flexipage/FlexipageParser.js +1 -1
  33. package/dist/plugins/flexipage/FlexipageVisualizer.d.ts +1 -1
  34. package/dist/plugins/flexipage/FlexipageVisualizer.js +1 -1
  35. package/dist/plugins/flexipage/transformer/FlexipageToUemTransformer.d.ts +1 -1
  36. package/dist/plugins/flexipage/transformer/FlexipageToUemTransformer.js +1 -1
  37. package/dist/plugins/flexipage/transformer/FlexipageTransformerUtils.d.ts +1 -1
  38. package/dist/plugins/flexipage/transformer/FlexipageTransformerUtils.js +1 -1
  39. package/dist/plugins/flexipage/types/FlexipageMetadata.d.ts +1 -1
  40. package/dist/plugins/flexipage/types/FlexipageMetadata.js +1 -1
  41. package/dist/plugins/schema/SchemaParser.d.ts +1 -1
  42. package/dist/plugins/schema/SchemaParser.js +1 -1
  43. package/dist/plugins/schema/SchemaVisualizer.d.ts +1 -1
  44. package/dist/plugins/schema/SchemaVisualizer.js +1 -1
  45. package/dist/plugins/schema/types/SchemaERDData.d.ts +1 -1
  46. package/dist/plugins/schema/types/SchemaERDData.js +1 -1
  47. package/dist/shared/bootstrap/createPluginApp.d.ts +1 -1
  48. package/dist/shared/bootstrap/createPluginApp.js +1 -1
  49. package/dist/shared/components/ErrorBoundary.d.ts +1 -1
  50. package/dist/shared/components/ErrorBoundary.js +1 -1
  51. package/dist/shared/uem/transformer/ITransformer.d.ts +1 -1
  52. package/dist/shared/uem/transformer/ITransformer.js +1 -1
  53. package/dist/shared/uem/transformer/TransformerRegistry.d.ts +1 -1
  54. package/dist/shared/uem/transformer/TransformerRegistry.js +1 -1
  55. package/dist/shared/uem/transformer/UemBasedVisualizer.d.ts +1 -1
  56. package/dist/shared/uem/transformer/UemBasedVisualizer.js +1 -1
  57. package/dist/shared/uem/types/UemMetadata.d.ts +1 -1
  58. package/dist/shared/uem/types/UemMetadata.js +1 -1
  59. package/dist/shared/uem/ui/components/PropertyRenderer/PropertyRenderer.d.ts +1 -1
  60. package/dist/shared/uem/ui/components/PropertyRenderer/PropertyRenderer.js +1 -1
  61. package/dist/shared/uem/ui/components/UEMVisualization/UEMVisualization.d.ts +1 -1
  62. package/dist/shared/uem/ui/components/UEMVisualization/UEMVisualization.js +1 -1
  63. package/dist/shared/utils/isPluginError.d.ts +1 -1
  64. package/dist/shared/utils/isPluginError.js +1 -1
  65. package/dist/shared/utils/patternMatcher.d.ts +1 -1
  66. package/dist/shared/utils/patternMatcher.js +1 -1
  67. package/dist/shared/utils/uemTreeUtils.d.ts +1 -1
  68. package/dist/shared/utils/uemTreeUtils.js +1 -1
  69. package/dist/shared/utils/vizDependentPathsHelper.d.ts +1 -1
  70. package/dist/shared/utils/vizDependentPathsHelper.js +1 -1
  71. package/package.json +4 -1
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ export type Op = '==' | '!=' | '>=' | '<=' | '>' | '<' | '=' | 'is' | 'is not';
8
+ export interface Clause {
9
+ /** undefined for the first clause; `'and'` / `'or'` for subsequent ones. */
10
+ joiner?: 'and' | 'or';
11
+ /** Unary `not` prefix on the clause (e.g. `not @variables.flag`). */
12
+ negate?: boolean;
13
+ left: string;
14
+ op: Op;
15
+ right: string;
16
+ /** True when the right-hand side was authored as a `"quoted"` literal. */
17
+ rightIsString: boolean;
18
+ /**
19
+ * Nested clause list when this slot came from a parenthesized sub-expression
20
+ * like `(A or B)`. When present, `left`/`op`/`right` are placeholders and the
21
+ * renderer shows the sub-list inside parens.
22
+ */
23
+ group?: Clause[];
24
+ }
25
+ export type Inline = {
26
+ kind: 'text';
27
+ text: string;
28
+ } | {
29
+ kind: 'bold';
30
+ children: Inline[];
31
+ } | {
32
+ kind: 'ident';
33
+ name: string;
34
+ } | {
35
+ kind: 'varRef';
36
+ path: string;
37
+ } | {
38
+ kind: 'arrow';
39
+ };
40
+ export interface IfBlock {
41
+ kind: 'if';
42
+ clauses: Clause[];
43
+ /** Inline consequent when the source uses `If X → Y` on a single line. */
44
+ consequent?: Inline[];
45
+ body: ReasoningBlock[];
46
+ /** Body of the `else:` block when the If has one. If + Else collapse together. */
47
+ elseBody?: ReasoningBlock[];
48
+ }
49
+ /** Top-level `set @var = expr`. */
50
+ export interface SetBlock {
51
+ kind: 'set';
52
+ target: string;
53
+ value: string;
54
+ valueIsString: boolean;
55
+ }
56
+ /** Top-level `to @target` / `transition @target`. */
57
+ export interface TransitionBlock {
58
+ kind: 'transition';
59
+ target: string;
60
+ }
61
+ /** `run @action` followed by zero+ indented `with` / `set` / `to` clauses. */
62
+ export interface RunBlock {
63
+ kind: 'run';
64
+ action: string;
65
+ clauses: RunClause[];
66
+ }
67
+ export interface RunClause {
68
+ /** `with X = Y` (input), `set @X = Y` (output), or `to X` (transition target). */
69
+ kind: 'with' | 'set' | 'to';
70
+ target: string;
71
+ value?: string;
72
+ valueIsString?: boolean;
73
+ }
74
+ export interface DeclarationBlock {
75
+ kind: 'declaration';
76
+ label: Inline[];
77
+ value: string;
78
+ }
79
+ export interface HeaderBlock {
80
+ kind: 'header';
81
+ level: number;
82
+ inline: Inline[];
83
+ }
84
+ export interface BulletBlock {
85
+ kind: 'bullet';
86
+ inline: Inline[];
87
+ }
88
+ export interface NumberedBlock {
89
+ kind: 'numbered';
90
+ n: number;
91
+ inline: Inline[];
92
+ }
93
+ export interface ProseBlock {
94
+ kind: 'prose';
95
+ inline: Inline[];
96
+ }
97
+ export type ReasoningBlock = IfBlock | SetBlock | TransitionBlock | RunBlock | DeclarationBlock | HeaderBlock | BulletBlock | NumberedBlock | ProseBlock;
98
+ /** Top-level entry point. Returns the structured tree of blocks. */
99
+ export declare function parseReasoning(text: string): ReasoningBlock[];
100
+ /** True when the parser produced at least one structural block. */
101
+ export declare function hasStructure(blocks: ReasoningBlock[]): boolean;
102
+ /**
103
+ * Collect identifier names that match a known action set, walking the
104
+ * block tree in source order. Used by the header flow strip as a
105
+ * navigation aid.
106
+ */
107
+ export declare function collectActionRefs(blocks: ReasoningBlock[], actionNames: Set<string>): string[];
108
+ /** Single-pass inline tokenizer for the body of a block. */
109
+ export declare function parseInline(text: string): Inline[];
110
+ /** Display glyph for an operator — `<=` becomes `≤`, etc. */
111
+ export declare function opGlyph(op: Op): string;
112
+ //# sourceMappingURL=reasoningParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reasoningParser.d.ts","sourceRoot":"","sources":["../../../../src/plugins/agent/extract/reasoningParser.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AA+BJ,MAAM,MAAM,EAAE,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,QAAQ,CAAC;AAE/E,MAAM,WAAW,MAAM;IACrB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACtB,qEAAqE;IACrE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,EAAE,CAAC;IACP,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,aAAa,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,MAAM,MAAM,GACd;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAI9B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/B;IA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