@salesforce/metadata-plugins 1.5.0 → 1.7.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 (78) hide show
  1. package/dist/index.d.ts +3 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +4 -0
  4. package/dist/plugins/agent/AgentParser.d.ts +7 -1
  5. package/dist/plugins/agent/AgentParser.d.ts.map +1 -1
  6. package/dist/plugins/agent/AgentParser.js +9 -0
  7. package/dist/plugins/agent/agentSelectionGraph.d.ts +101 -0
  8. package/dist/plugins/agent/agentSelectionGraph.d.ts.map +1 -0
  9. package/dist/plugins/agent/agentSelectionGraph.js +407 -0
  10. package/dist/plugins/agent/extract/ast-to-graph.d.ts +2 -0
  11. package/dist/plugins/agent/extract/ast-to-graph.d.ts.map +1 -1
  12. package/dist/plugins/agent/extract/ast-to-graph.js +1 -0
  13. package/dist/plugins/agent/ui/assets/index-C_Q6Mc2L.js +71 -0
  14. package/dist/plugins/agent/ui/assets/index-DX8JtDoL.css +1 -0
  15. package/dist/plugins/agent/ui/index.html +2 -2
  16. package/dist/plugins/flexipage/FlexipageParser.d.ts +12 -1
  17. package/dist/plugins/flexipage/FlexipageParser.d.ts.map +1 -1
  18. package/dist/plugins/flexipage/FlexipageParser.js +14 -0
  19. package/dist/plugins/flexipage/ui/assets/index-CuJYcAx_.js +48 -0
  20. package/dist/plugins/flexipage/ui/assets/index-DBy19jKB.css +1 -0
  21. package/dist/plugins/flexipage/ui/index.html +2 -2
  22. package/dist/plugins/flow/FlowParser.d.ts +8 -1
  23. package/dist/plugins/flow/FlowParser.d.ts.map +1 -1
  24. package/dist/plugins/flow/FlowParser.js +10 -0
  25. package/dist/plugins/flow/flowSelectionGraph.d.ts +71 -0
  26. package/dist/plugins/flow/flowSelectionGraph.d.ts.map +1 -0
  27. package/dist/plugins/flow/flowSelectionGraph.js +196 -0
  28. package/dist/plugins/flow/ui/assets/index-DJP9DbPL.js +48 -0
  29. package/dist/plugins/flow/ui/assets/index-H7g-xvR-.css +1 -0
  30. package/dist/plugins/flow/ui/index.html +2 -2
  31. package/dist/plugins/permissionset/PermissionSetParser.d.ts +41 -0
  32. package/dist/plugins/permissionset/PermissionSetParser.d.ts.map +1 -0
  33. package/dist/plugins/permissionset/PermissionSetParser.js +250 -0
  34. package/dist/plugins/permissionset/PermissionSetVisualizer.d.ts +36 -0
  35. package/dist/plugins/permissionset/PermissionSetVisualizer.d.ts.map +1 -0
  36. package/dist/plugins/permissionset/PermissionSetVisualizer.js +39 -0
  37. package/dist/plugins/permissionset/parser/parseGrants.d.ts +38 -0
  38. package/dist/plugins/permissionset/parser/parseGrants.d.ts.map +1 -0
  39. package/dist/plugins/permissionset/parser/parseGrants.js +247 -0
  40. package/dist/plugins/permissionset/parser/rawTypes.d.ts +124 -0
  41. package/dist/plugins/permissionset/parser/rawTypes.d.ts.map +1 -0
  42. package/dist/plugins/permissionset/parser/rawTypes.js +7 -0
  43. package/dist/plugins/permissionset/parser/xmlHelpers.d.ts +13 -0
  44. package/dist/plugins/permissionset/parser/xmlHelpers.d.ts.map +1 -0
  45. package/dist/plugins/permissionset/parser/xmlHelpers.js +25 -0
  46. package/dist/plugins/permissionset/types/PermissionSetData.d.ts +137 -0
  47. package/dist/plugins/permissionset/types/PermissionSetData.d.ts.map +1 -0
  48. package/dist/plugins/permissionset/types/PermissionSetData.js +7 -0
  49. package/dist/plugins/permissionset/ui/assets/index-CMOgdp7q.css +1 -0
  50. package/dist/plugins/permissionset/ui/assets/index-D_FwDkAf.js +48 -0
  51. package/dist/plugins/permissionset/ui/index.html +14 -0
  52. package/dist/plugins/schema/SchemaParser.d.ts +12 -1
  53. package/dist/plugins/schema/SchemaParser.d.ts.map +1 -1
  54. package/dist/plugins/schema/SchemaParser.js +14 -0
  55. package/dist/plugins/schema/schemaSelectionGraph.d.ts +34 -0
  56. package/dist/plugins/schema/schemaSelectionGraph.d.ts.map +1 -0
  57. package/dist/plugins/schema/schemaSelectionGraph.js +77 -0
  58. package/dist/plugins/schema/ui/assets/index-BHwyhVGF.js +70 -0
  59. package/dist/plugins/schema/ui/assets/index-Cp1nVgsx.css +1 -0
  60. package/dist/plugins/schema/ui/index.html +2 -2
  61. package/dist/shared/bootstrap/createPluginApp.d.ts +14 -0
  62. package/dist/shared/bootstrap/createPluginApp.d.ts.map +1 -1
  63. package/dist/shared/bootstrap/createPluginApp.js +4 -0
  64. package/dist/shared/uem/ui/components/UEMVisualization/UEMVisualization.d.ts +9 -1
  65. package/dist/shared/uem/ui/components/UEMVisualization/UEMVisualization.d.ts.map +1 -1
  66. package/dist/shared/uem/ui/components/UEMVisualization/UEMVisualization.js +55 -30
  67. package/dist/shared/utils/uemTreeUtils.d.ts +33 -3
  68. package/dist/shared/utils/uemTreeUtils.d.ts.map +1 -1
  69. package/dist/shared/utils/uemTreeUtils.js +82 -5
  70. package/package.json +3 -3
  71. package/dist/plugins/agent/ui/assets/index-CTzSDPPx.css +0 -1
  72. package/dist/plugins/agent/ui/assets/index-D0wb9GBs.js +0 -71
  73. package/dist/plugins/flexipage/ui/assets/index-DT5lcUwK.js +0 -48
  74. package/dist/plugins/flexipage/ui/assets/index-U3SB2gLS.css +0 -1
  75. package/dist/plugins/flow/ui/assets/index-Cb-x8fUq.css +0 -1
  76. package/dist/plugins/flow/ui/assets/index-DDfQ7eDI.js +0 -48
  77. package/dist/plugins/schema/ui/assets/index-DCLgZby3.css +0 -1
  78. package/dist/plugins/schema/ui/assets/index-jqcasNAD.js +0 -70
package/dist/index.d.ts CHANGED
@@ -8,14 +8,17 @@ export { FlexipageVisualizer } from './plugins/flexipage/FlexipageVisualizer.js'
8
8
  export { SchemaVisualizer } from './plugins/schema/SchemaVisualizer.js';
9
9
  export { AgentVisualizer } from './plugins/agent/AgentVisualizer.js';
10
10
  export { FlowVisualizer } from './plugins/flow/FlowVisualizer.js';
11
+ export { PermissionSetVisualizer } from './plugins/permissionset/PermissionSetVisualizer.js';
11
12
  export { FlexipageParser } from './plugins/flexipage/FlexipageParser.js';
12
13
  export { SchemaParser } from './plugins/schema/SchemaParser.js';
13
14
  export { AgentParser } from './plugins/agent/AgentParser.js';
14
15
  export { FlowParser } from './plugins/flow/FlowParser.js';
16
+ export { PermissionSetParser } from './plugins/permissionset/PermissionSetParser.js';
15
17
  export type { FlexipageMetadata } from './plugins/flexipage/types/FlexipageMetadata.js';
16
18
  export type { SchemaERDData } from './plugins/schema/types/SchemaERDData.js';
17
19
  export type { AgentScriptData } from './plugins/agent/types/AgentScriptData.js';
18
20
  export type { FlowModel } from './plugins/flow/types/FlowData.js';
21
+ export type { PermissionSetData } from './plugins/permissionset/types/PermissionSetData.js';
19
22
  import { IVisualizationPlugin, PluginConfig } from '@salesforce/metadata-core-sdk';
20
23
  /**
21
24
  * Get all visualization plugins
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAoBJ,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAG1D,YAAY,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACxF,YAAY,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAC7E,YAAY,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAChF,YAAY,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAA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FlexipageVisualizer } from './plugins/flexipage/FlexipageVisualizer.js'
19
19
  import { SchemaVisualizer } from './plugins/schema/SchemaVisualizer.js';
20
20
  import { AgentVisualizer } from './plugins/agent/AgentVisualizer.js';
21
21
  import { FlowVisualizer } from './plugins/flow/FlowVisualizer.js';
22
+ import { PermissionSetVisualizer } from './plugins/permissionset/PermissionSetVisualizer.js';
22
23
  // Export visualization plugins
23
24
  export { FlexipageVisualizer } from './plugins/flexipage/FlexipageVisualizer.js';
24
25
  export { SchemaVisualizer } from './plugins/schema/SchemaVisualizer.js';
25
26
  export { AgentVisualizer } from './plugins/agent/AgentVisualizer.js';
26
27
  export { FlowVisualizer } from './plugins/flow/FlowVisualizer.js';
28
+ export { PermissionSetVisualizer } from './plugins/permissionset/PermissionSetVisualizer.js';
27
29
  // Export parsers
28
30
  export { FlexipageParser } from './plugins/flexipage/FlexipageParser.js';
29
31
  export { SchemaParser } from './plugins/schema/SchemaParser.js';
30
32
  export { AgentParser } from './plugins/agent/AgentParser.js';
31
33
  export { FlowParser } from './plugins/flow/FlowParser.js';
34
+ export { PermissionSetParser } from './plugins/permissionset/PermissionSetParser.js';
32
35
  /**
33
36
  * Get all visualization plugins
34
37
  *
@@ -45,6 +48,7 @@ export function getAllVisualizers(config) {
45
48
  new SchemaVisualizer(),
46
49
  new AgentVisualizer(),
47
50
  new FlowVisualizer(),
51
+ new PermissionSetVisualizer(),
48
52
  ];
49
53
  if (!config?.pluginSettings) {
50
54
  return all;
@@ -16,7 +16,7 @@
16
16
  * webview bundle, so it boots fast and `getPluginData` doesn't time out — the
17
17
  * webview only ships React Flow + dagre and renders the pre-built JSON graph.
18
18
  */
19
- import { IMetadataParser, MetadataFileInfo, IPlatformContext, VersionInfo } from '@salesforce/metadata-core-sdk';
19
+ import { IMetadataParser, MetadataFileInfo, IPlatformContext, VersionInfo, type SelectableNode } from '@salesforce/metadata-core-sdk';
20
20
  import { AgentScriptData } from './types/AgentScriptData.js';
21
21
  export declare class AgentParser implements IMetadataParser<AgentScriptData> {
22
22
  private platformContext?;
@@ -30,5 +30,11 @@ export declare class AgentParser implements IMetadataParser<AgentScriptData> {
30
30
  * basename).
31
31
  */
32
32
  extractMetadataInfo(data: AgentScriptData): MetadataFileInfo | null;
33
+ /**
34
+ * SelectionGraph (vibe-edit): project the subagent nodes into the normalized
35
+ * selectable-node contract. Delegates to the shared projection so the ids
36
+ * match the `data-mv-id` the webview renders on each subagent node.
37
+ */
38
+ getSelectableNodes(data: AgentScriptData): SelectableNode[];
33
39
  }
34
40
  //# sourceMappingURL=AgentParser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgentParser.d.ts","sourceRoot":"","sources":["../../../src/plugins/agent/AgentParser.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAGhB,WAAW,EAGZ,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAoD7D,qBAAa,WAAY,YAAW,eAAe,CAAC,eAAe,CAAC;IAClE,OAAO,CAAC,eAAe,CAAC,CAAmB;IAC3C,OAAO,CAAC,MAAM,CAAC,CAAU;IACzB,OAAO,CAAC,SAAS,CAAC,CAAa;IAE/B,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAM7C,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC;IA+HlF;;;;OAIG;IACH,mBAAmB,CAAC,IAAI,EAAE,eAAe,GAAG,gBAAgB,GAAG,IAAI;CAIpE"}
1
+ {"version":3,"file":"AgentParser.d.ts","sourceRoot":"","sources":["../../../src/plugins/agent/AgentParser.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAGhB,WAAW,EAGX,KAAK,cAAc,EACpB,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAoD7D,qBAAa,WAAY,YAAW,eAAe,CAAC,eAAe,CAAC;IAClE,OAAO,CAAC,eAAe,CAAC,CAAmB;IAC3C,OAAO,CAAC,MAAM,CAAC,CAAU;IACzB,OAAO,CAAC,SAAS,CAAC,CAAa;IAE/B,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAM7C,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC;IA+HlF;;;;OAIG;IACH,mBAAmB,CAAC,IAAI,EAAE,eAAe,GAAG,gBAAgB,GAAG,IAAI;IAKnE;;;;OAIG;IACH,kBAAkB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,EAAE;CAG5D"}
@@ -17,6 +17,7 @@
17
17
  * webview only ships React Flow + dagre and renders the pre-built JSON graph.
18
18
  */
19
19
  import { ErrorBuilder, ErrorCategory, } from '@salesforce/metadata-core-sdk';
20
+ import { agentSelectableNodes } from './agentSelectionGraph.js';
20
21
  // Official AgentScript parser (public npm package). The default entry uses
21
22
  // the pure-TS `parser-javascript` backend — no WASM, no native bindings, no
22
23
  // async init — so it runs fine in the Node extension host. It accepts both
@@ -186,4 +187,12 @@ export class AgentParser {
186
187
  const metaNode = data.graph?.nodes.find((n) => n.data.nodeType === 'meta');
187
188
  return metaNode?.data.label ? { label: metaNode.data.label } : null;
188
189
  }
190
+ /**
191
+ * SelectionGraph (vibe-edit): project the subagent nodes into the normalized
192
+ * selectable-node contract. Delegates to the shared projection so the ids
193
+ * match the `data-mv-id` the webview renders on each subagent node.
194
+ */
195
+ getSelectableNodes(data) {
196
+ return agentSelectableNodes(data);
197
+ }
189
198
  }
@@ -0,0 +1,101 @@
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
+ /**
8
+ * SelectionGraph projection for the agent plugin (vibe-edit).
9
+ *
10
+ * The host already builds the overview graph with stable, unique node ids
11
+ * (`subagent-<name>`), so the projection is a thin map: every subagent/topic
12
+ * node becomes one `SelectableNode`. Reusing the graph node id verbatim as the
13
+ * `SelectableNode.id` guarantees it matches the `data-mv-id` the node component
14
+ * renders (the C4 determinism requirement) — no separate id derivation needed.
15
+ *
16
+ * The parser calls this (via `getSelectableNodes`) and the webview calls the
17
+ * same function for `useVibeEdit`, so both sides agree by construction.
18
+ */
19
+ import type { SelectableNode } from '@salesforce/metadata-core-sdk';
20
+ import type { ActionDetail } from './extract/ast-to-graph.js';
21
+ import type { AgentScriptData } from './types/AgentScriptData.js';
22
+ /** Strip the graph-node id prefix to recover the source block name. */
23
+ export declare function subagentApiName(nodeId: string): string;
24
+ /** The agent title label inside the meta tile (a pure-label heading). */
25
+ export declare function metaTitleNodeId(): string;
26
+ /** The agent's inline description paragraph inside the meta tile. */
27
+ export declare function metaDescriptionNodeId(): string;
28
+ /** The meta tile's System Instructions action row. */
29
+ export declare function metaSystemInstructionsNodeId(): string;
30
+ /** The meta tile's Messages action row (welcome / error messages). */
31
+ export declare function metaMessagesNodeId(): string;
32
+ /** The title label inside a subagent/topic tile. */
33
+ export declare function subagentTitleNodeId(nodeId: string): string;
34
+ /** The title label inside the start-agent tile. */
35
+ export declare function startAgentTitleNodeId(nodeId: string): string;
36
+ /** The subagent header card (its label / description / system instructions). */
37
+ export declare function subagentDetailNodeId(apiName: string): string;
38
+ /** The subagent's description paragraph, on its own so it can be edited alone. */
39
+ export declare function subagentDescriptionNodeId(): string;
40
+ /** The subagent's system-instructions block, selectable on its own. */
41
+ export declare function subagentSystemNodeId(): string;
42
+ /** A reasoning block card. `which` distinguishes the three reasoning slots. */
43
+ export declare function reasoningNodeId(which: 'reasoning' | 'before' | 'after'): string;
44
+ /** Keys for the card / section headings that live once per subagent. */
45
+ export type HeadingKey = 'subagent-role' | 'reasoning' | 'before-reasoning' | 'after-reasoning' | 'actions' | 'reasoning-actions';
46
+ /** A card / section heading rendered once per subagent (e.g. ACTIONS, REASONING). */
47
+ export declare function headingNodeId(key: HeadingKey): string;
48
+ /** A heading inside a single action's L3 detail (title, name, INPUTS, OUTPUTS). */
49
+ export declare function actionHeadingNodeId(actionName: string, key: 'title' | 'name' | 'inputs' | 'outputs'): string;
50
+ /** An individual action pill. */
51
+ export declare function actionNodeId(actionName: string): string;
52
+ /**
53
+ * A pill in the "ACTIONS AVAILABLE FOR REASONING" list. Kept DISTINCT from
54
+ * `actionNodeId` because the same action name also appears in the top-level
55
+ * ACTIONS card — a shared id would produce two DOM elements with the same
56
+ * `data-mv-id`, making selection ambiguous. Keyed by the raw ref so aliased
57
+ * refs stay unique.
58
+ */
59
+ export declare function reasoningActionNodeId(ref: string): string;
60
+ /** The TARGET row inside an action's L3 detail. */
61
+ export declare function actionTargetNodeId(actionName: string): string;
62
+ /**
63
+ * A single INPUT / OUTPUT param inside an action's L3 detail. Namespaced by
64
+ * action + direction because a param name can repeat across inputs/outputs and
65
+ * across actions.
66
+ */
67
+ export declare function actionParamNodeId(actionName: string, direction: 'input' | 'output', paramName: string): string;
68
+ /**
69
+ * Project everything editable inside a subagent's detail overlay into selectable
70
+ * nodes: the subagent itself (its description/instructions), its reasoning
71
+ * blocks (main / before / after), and each of its actions. The user can select
72
+ * any of these to send to the agent for editing. Ids match the `data-mv-id`
73
+ * each card renders; `parentId` links children to the subagent so the spatial
74
+ * context carries the owning subagent's name.
75
+ */
76
+ export declare function agentDetailSelectableNodes(subagent: {
77
+ apiName: string;
78
+ label: string;
79
+ sourceKeyword: string;
80
+ description?: string;
81
+ systemInstructions?: string;
82
+ reasoning?: {
83
+ instructions?: string;
84
+ actionRefs?: string[];
85
+ } | undefined;
86
+ beforeReasoning?: string;
87
+ afterReasoning?: string;
88
+ actions?: ReadonlyArray<ActionDetail>;
89
+ }, filePath?: string): SelectableNode[];
90
+ /**
91
+ * Project the overview graph's editable nodes into selectable nodes. The root
92
+ * agent (`meta`) card, the start-agent node, and every subagent/topic node are
93
+ * all selectable — each carries editable content (the agent's description /
94
+ * system instructions / messages, the start-agent's routing, and each
95
+ * subagent's body). Only `junction` layout nodes are excluded (pure chrome).
96
+ *
97
+ * The node id is reused verbatim as the `SelectableNode.id`, so it matches the
98
+ * `data-mv-id` each node component renders (C4 determinism).
99
+ */
100
+ export declare function agentSelectableNodes(data: AgentScriptData): SelectableNode[];
101
+ //# sourceMappingURL=agentSelectionGraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentSelectionGraph.d.ts","sourceRoot":"","sources":["../../../src/plugins/agent/agentSelectionGraph.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EACV,YAAY,EAKb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAYD,yEAAyE;AACzE,wBAAgB,eAAe,IAAI,MAAM,CAExC;AACD,qEAAqE;AACrE,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AACD,sDAAsD;AACtD,wBAAgB,4BAA4B,IAAI,MAAM,CAErD;AACD,sEAAsE;AACtE,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAWD,oDAAoD;AACpD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1D;AAID,mDAAmD;AACnD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE5D;AAOD,gFAAgF;AAChF,wBAAgB,oBAAoB,CAAC,O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AE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,SAAS,CAAC;IACzE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CACvC,EACD,QAAQ,CAAC,EAAE,MAAM,GAChB,cAAc,EAAE,CAyLlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,EAAE,CAyH5E"}
@@ -0,0 +1,407 @@
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
+ /** Strip the graph-node id prefix to recover the source block name. */
8
+ export function subagentApiName(nodeId) {
9
+ return nodeId.replace(/^subagent-/, '');
10
+ }
11
+ // --- L1 (overview graph) meta-tile child selectable ids ---
12
+ // The root agent (`meta`) tile is itself selectable, but its title label, its
13
+ // inline description paragraph, and its System Instructions / Messages action
14
+ // rows are ALSO individually selectable, so the user can vibe-edit just the
15
+ // agent's name, its description, its system instructions, or its messages
16
+ // without selecting the whole tile. Each id maps 1:1 to a `data-mv-id` the
17
+ // MetaInfoNode renders; the click resolver picks the innermost (smallest)
18
+ // match, so a click on a row targets the row, a click on tile chrome targets
19
+ // the tile.
20
+ /** The agent title label inside the meta tile (a pure-label heading). */
21
+ export function metaTitleNodeId() {
22
+ return 'meta-title';
23
+ }
24
+ /** The agent's inline description paragraph inside the meta tile. */
25
+ export function metaDescriptionNodeId() {
26
+ return 'meta-description';
27
+ }
28
+ /** The meta tile's System Instructions action row. */
29
+ export function metaSystemInstructionsNodeId() {
30
+ return 'meta-system-instructions';
31
+ }
32
+ /** The meta tile's Messages action row (welcome / error messages). */
33
+ export function metaMessagesNodeId() {
34
+ return 'meta-messages';
35
+ }
36
+ // --- L1 (overview graph) subagent/topic-tile child selectable ids ---
37
+ // The subagent/topic tile is itself selectable, and its title label is ALSO
38
+ // individually selectable. Scoped by the owning graph node id
39
+ // (`subagent-<name>`) because the overview shows many subagent tiles at once,
40
+ // so child ids must be unique per tile. NOTE: the "N Actions" chip is
41
+ // deliberately NOT selectable on L1 — actions are editable only in the L2
42
+ // detail overlay (see agentDetailSelectableNodes). The overview chip is a pure
43
+ // count affordance; the user drills in to act on individual actions.
44
+ /** The title label inside a subagent/topic tile. */
45
+ export function subagentTitleNodeId(nodeId) {
46
+ return `${nodeId}-title`;
47
+ }
48
+ // --- L1 (overview graph) start-agent-tile child selectable ids ---
49
+ /** The title label inside the start-agent tile. */
50
+ export function startAgentTitleNodeId(nodeId) {
51
+ return `${nodeId}-title`;
52
+ }
53
+ // --- L2 (detail overlay) selectable-node ids ---
54
+ // The detail overlay shows one subagent at a time, so ids only need to be
55
+ // unique within that subagent. Each id maps 1:1 to the `data-mv-id` the
56
+ // corresponding card renders, so selection resolves by pure lookup.
57
+ /** The subagent header card (its label / description / system instructions). */
58
+ export function subagentDetailNodeId(apiName) {
59
+ return `subagent-detail-${apiName}`;
60
+ }
61
+ /** The subagent's description paragraph, on its own so it can be edited alone. */
62
+ export function subagentDescriptionNodeId() {
63
+ return 'subagent-description';
64
+ }
65
+ /** The subagent's system-instructions block, selectable on its own. */
66
+ export function subagentSystemNodeId() {
67
+ return 'subagent-system-instructions';
68
+ }
69
+ /** A reasoning block card. `which` distinguishes the three reasoning slots. */
70
+ export function reasoningNodeId(which) {
71
+ return `reasoning-${which}`;
72
+ }
73
+ /** A card / section heading rendered once per subagent (e.g. ACTIONS, REASONING). */
74
+ export function headingNodeId(key) {
75
+ return `heading-${key}`;
76
+ }
77
+ /** A heading inside a single action's L3 detail (title, name, INPUTS, OUTPUTS). */
78
+ export function actionHeadingNodeId(actionName, key) {
79
+ return `action-${actionName}-heading-${key}`;
80
+ }
81
+ /** An individual action pill. */
82
+ export function actionNodeId(actionName) {
83
+ return `action-${actionName}`;
84
+ }
85
+ /**
86
+ * A pill in the "ACTIONS AVAILABLE FOR REASONING" list. Kept DISTINCT from
87
+ * `actionNodeId` because the same action name also appears in the top-level
88
+ * ACTIONS card — a shared id would produce two DOM elements with the same
89
+ * `data-mv-id`, making selection ambiguous. Keyed by the raw ref so aliased
90
+ * refs stay unique.
91
+ */
92
+ export function reasoningActionNodeId(ref) {
93
+ return `reasoning-action-${ref}`;
94
+ }
95
+ /** The TARGET row inside an action's L3 detail. */
96
+ export function actionTargetNodeId(actionName) {
97
+ return `action-${actionName}-target`;
98
+ }
99
+ /**
100
+ * A single INPUT / OUTPUT param inside an action's L3 detail. Namespaced by
101
+ * action + direction because a param name can repeat across inputs/outputs and
102
+ * across actions.
103
+ */
104
+ export function actionParamNodeId(actionName, direction, paramName) {
105
+ return `action-${actionName}-${direction}-${paramName}`;
106
+ }
107
+ /**
108
+ * Project everything editable inside a subagent's detail overlay into selectable
109
+ * nodes: the subagent itself (its description/instructions), its reasoning
110
+ * blocks (main / before / after), and each of its actions. The user can select
111
+ * any of these to send to the agent for editing. Ids match the `data-mv-id`
112
+ * each card renders; `parentId` links children to the subagent so the spatial
113
+ * context carries the owning subagent's name.
114
+ */
115
+ export function agentDetailSelectableNodes(subagent, filePath) {
116
+ const label = subagent.label;
117
+ const subId = subagentDetailNodeId(subagent.apiName);
118
+ const nodes = [];
119
+ // A pure-label heading / title. Carries the visible text as apiName so the
120
+ // agent knows which label the user picked; parented to the subagent for
121
+ // spatial context. `parent` overrides the default (subId) when the heading
122
+ // belongs to a specific action's L3 detail.
123
+ const heading = (id, text, extra, parent = subId) => ({
124
+ id,
125
+ type: 'heading',
126
+ apiName: text,
127
+ parentId: parent,
128
+ attributes: { subagent: label, ...(extra ?? {}) },
129
+ filePath,
130
+ });
131
+ // The subagent itself — selecting it targets its description / instructions.
132
+ nodes.push({
133
+ id: subId,
134
+ type: subagent.sourceKeyword === 'topic' ? 'topic' : 'subagent',
135
+ apiName: label,
136
+ attributes: {
137
+ ...(subagent.description ? { description: subagent.description } : {}),
138
+ hasSystemInstructions: Boolean(subagent.systemInstructions),
139
+ },
140
+ filePath,
141
+ });
142
+ // Header card: title heading + role subheading are individually selectable.
143
+ nodes.push(heading(headingNodeId('subagent-role'), label, { role: 'title' }));
144
+ // The description paragraph and system-instructions block, each editable alone.
145
+ if (subagent.description) {
146
+ nodes.push({
147
+ id: subagentDescriptionNodeId(),
148
+ type: 'description',
149
+ apiName: `${label}.description`,
150
+ parentId: subId,
151
+ attributes: { subagent: label, description: subagent.description },
152
+ filePath,
153
+ });
154
+ }
155
+ if (subagent.systemInstructions) {
156
+ nodes.push({
157
+ id: subagentSystemNodeId(),
158
+ type: 'system-instructions',
159
+ apiName: `${label}.system_instructions`,
160
+ parentId: subId,
161
+ attributes: { subagent: label },
162
+ filePath,
163
+ });
164
+ }
165
+ // Section headings that exist once per subagent (only when their card renders).
166
+ if ((subagent.actions?.length ?? 0) > 0) {
167
+ nodes.push(heading(headingNodeId('actions'), 'ACTIONS'));
168
+ }
169
+ if (subagent.beforeReasoning) {
170
+ nodes.push(heading(headingNodeId('before-reasoning'), 'BEFORE REASONING'));
171
+ }
172
+ if (subagent.reasoning?.instructions) {
173
+ nodes.push(heading(headingNodeId('reasoning'), 'REASONING'));
174
+ }
175
+ if (subagent.afterReasoning) {
176
+ nodes.push(heading(headingNodeId('after-reasoning'), 'AFTER REASONING'));
177
+ }
178
+ if ((subagent.reasoning?.actionRefs?.length ?? 0) > 0) {
179
+ nodes.push(heading(headingNodeId('reasoning-actions'), 'ACTIONS AVAILABLE FOR REASONING'));
180
+ // Each "available for reasoning" pill is selectable on its own. Distinct id
181
+ // from the top-level ACTIONS card (reasoningActionNodeId) so the same action
182
+ // appearing in both places gets two unambiguous DOM targets.
183
+ for (const ref of subagent.reasoning?.actionRefs ?? []) {
184
+ nodes.push({
185
+ id: reasoningActionNodeId(ref),
186
+ type: 'reasoning-action',
187
+ apiName: ref,
188
+ parentId: subId,
189
+ attributes: { subagent: label, ref },
190
+ filePath,
191
+ });
192
+ }
193
+ }
194
+ // Reasoning blocks (only the ones that exist).
195
+ const reasoningNode = (which, apiSuffix) => ({
196
+ id: reasoningNodeId(which),
197
+ type: 'reasoning',
198
+ apiName: `${label}.${apiSuffix}`,
199
+ parentId: subId,
200
+ attributes: { subagent: label, slot: apiSuffix },
201
+ filePath,
202
+ });
203
+ if (subagent.reasoning?.instructions) {
204
+ nodes.push(reasoningNode('reasoning', 'reasoning'));
205
+ }
206
+ if (subagent.beforeReasoning) {
207
+ nodes.push(reasoningNode('before', 'before_reasoning'));
208
+ }
209
+ if (subagent.afterReasoning) {
210
+ nodes.push(reasoningNode('after', 'after_reasoning'));
211
+ }
212
+ // Each action, plus its granular parts (target + each input/output param) so
213
+ // the user can vibe-edit at any level: the whole action, or just one field.
214
+ for (const a of subagent.actions ?? []) {
215
+ const actId = actionNodeId(a.name);
216
+ nodes.push({
217
+ id: actId,
218
+ type: 'action',
219
+ apiName: a.name,
220
+ parentId: subId,
221
+ attributes: {
222
+ label: a.label ?? a.name,
223
+ subagent: label,
224
+ ...(a.target ? { target: a.target } : {}),
225
+ },
226
+ filePath,
227
+ });
228
+ // L3 detail headings — the action title, its api-name row, and the
229
+ // INPUTS / OUTPUTS section labels. These only render once the action's
230
+ // detail card is open, but the engine re-tags DOM on open via its
231
+ // MutationObserver, so listing them up-front is safe.
232
+ nodes.push(heading(actionHeadingNodeId(a.name, 'title'), a.label ?? a.name, { action: a.name }, actId));
233
+ nodes.push(heading(actionHeadingNodeId(a.name, 'name'), a.name, { action: a.name }, actId));
234
+ if ((a.inputs?.length ?? 0) > 0) {
235
+ nodes.push(heading(actionHeadingNodeId(a.name, 'inputs'), 'INPUTS', { action: a.name }, actId));
236
+ }
237
+ if ((a.outputs?.length ?? 0) > 0) {
238
+ nodes.push(heading(actionHeadingNodeId(a.name, 'outputs'), 'OUTPUTS', { action: a.name }, actId));
239
+ }
240
+ // TARGET row.
241
+ if (a.target) {
242
+ nodes.push({
243
+ id: actionTargetNodeId(a.name),
244
+ type: 'action-target',
245
+ apiName: `${a.name}.target`,
246
+ parentId: actId,
247
+ attributes: { action: a.name, subagent: label, target: a.target },
248
+ filePath,
249
+ });
250
+ }
251
+ // INPUT / OUTPUT params.
252
+ const paramNode = (p, direction) => ({
253
+ id: actionParamNodeId(a.name, direction, p.name),
254
+ type: direction === 'input' ? 'action-input' : 'action-output',
255
+ apiName: `${a.name}.${direction}.${p.name}`,
256
+ parentId: actId,
257
+ attributes: {
258
+ param: p.name,
259
+ direction,
260
+ action: a.name,
261
+ subagent: label,
262
+ ...(p.type ? { dataType: p.type } : {}),
263
+ ...(p.label ? { label: p.label } : {}),
264
+ },
265
+ filePath,
266
+ });
267
+ for (const p of a.inputs ?? []) {
268
+ nodes.push(paramNode(p, 'input'));
269
+ }
270
+ for (const p of a.outputs ?? []) {
271
+ nodes.push(paramNode(p, 'output'));
272
+ }
273
+ }
274
+ return nodes;
275
+ }
276
+ /**
277
+ * Project the overview graph's editable nodes into selectable nodes. The root
278
+ * agent (`meta`) card, the start-agent node, and every subagent/topic node are
279
+ * all selectable — each carries editable content (the agent's description /
280
+ * system instructions / messages, the start-agent's routing, and each
281
+ * subagent's body). Only `junction` layout nodes are excluded (pure chrome).
282
+ *
283
+ * The node id is reused verbatim as the `SelectableNode.id`, so it matches the
284
+ * `data-mv-id` each node component renders (C4 determinism).
285
+ */
286
+ export function agentSelectableNodes(data) {
287
+ const nodes = [];
288
+ for (const n of data.graph.nodes) {
289
+ if (n.data.nodeType === 'meta') {
290
+ const meta = n;
291
+ const hasSystemInstructions = typeof meta.data.systemInstructions === 'string' && meta.data.systemInstructions.length > 0;
292
+ const hasMessages = (typeof meta.data.welcomeMessage === 'string' && meta.data.welcomeMessage.length > 0) ||
293
+ (typeof meta.data.errorMessage === 'string' && meta.data.errorMessage.length > 0);
294
+ nodes.push({
295
+ id: n.id,
296
+ type: 'agent',
297
+ apiName: meta.data.label,
298
+ attributes: {
299
+ label: meta.data.label,
300
+ ...(meta.data.description ? { description: meta.data.description } : {}),
301
+ hasSystemInstructions,
302
+ },
303
+ filePath: data.filePath,
304
+ });
305
+ // The agent title label — selectable on its own so the user can rename the
306
+ // agent without picking up the whole tile. A pure-label heading whose
307
+ // apiName is the visible text.
308
+ nodes.push({
309
+ id: metaTitleNodeId(),
310
+ type: 'heading',
311
+ apiName: meta.data.label,
312
+ parentId: n.id,
313
+ attributes: { role: 'title', agent: meta.data.label },
314
+ filePath: data.filePath,
315
+ });
316
+ // The agent's inline description paragraph — selectable on its own so the
317
+ // user can vibe-edit just the description. Only present when the tile
318
+ // renders it.
319
+ if (meta.data.description) {
320
+ nodes.push({
321
+ id: metaDescriptionNodeId(),
322
+ type: 'description',
323
+ apiName: `${meta.data.label}.description`,
324
+ parentId: n.id,
325
+ attributes: { agent: meta.data.label, description: meta.data.description },
326
+ filePath: data.filePath,
327
+ });
328
+ }
329
+ // System Instructions row — only present when the tile renders it.
330
+ if (hasSystemInstructions) {
331
+ nodes.push({
332
+ id: metaSystemInstructionsNodeId(),
333
+ type: 'system-instructions',
334
+ apiName: `${meta.data.label}.system_instructions`,
335
+ parentId: n.id,
336
+ attributes: { agent: meta.data.label },
337
+ filePath: data.filePath,
338
+ });
339
+ }
340
+ // Messages row — welcome and/or error messages.
341
+ if (hasMessages) {
342
+ nodes.push({
343
+ id: metaMessagesNodeId(),
344
+ type: 'messages',
345
+ apiName: `${meta.data.label}.messages`,
346
+ parentId: n.id,
347
+ attributes: {
348
+ agent: meta.data.label,
349
+ ...(meta.data.welcomeMessage ? { welcomeMessage: meta.data.welcomeMessage } : {}),
350
+ ...(meta.data.errorMessage ? { errorMessage: meta.data.errorMessage } : {}),
351
+ },
352
+ filePath: data.filePath,
353
+ });
354
+ }
355
+ }
356
+ else if (n.data.nodeType === 'start-agent') {
357
+ const start = n;
358
+ nodes.push({
359
+ id: n.id,
360
+ type: 'start-agent',
361
+ apiName: start.data.subtitle ?? start.data.label,
362
+ attributes: {
363
+ label: start.data.label,
364
+ ...(start.data.description ? { description: start.data.description } : {}),
365
+ },
366
+ filePath: data.filePath,
367
+ });
368
+ // The start-agent title label — selectable on its own.
369
+ nodes.push({
370
+ id: startAgentTitleNodeId(n.id),
371
+ type: 'heading',
372
+ apiName: start.data.label,
373
+ parentId: n.id,
374
+ attributes: { role: 'title', startAgent: start.data.label },
375
+ filePath: data.filePath,
376
+ });
377
+ }
378
+ else if (n.data.nodeType === 'subagent') {
379
+ const sub = n;
380
+ const actionsCount = sub.data.actionsCount ?? 0;
381
+ nodes.push({
382
+ id: n.id,
383
+ type: sub.data.sourceKeyword,
384
+ apiName: subagentApiName(n.id),
385
+ attributes: {
386
+ label: sub.data.label,
387
+ sourceKeyword: sub.data.sourceKeyword,
388
+ actionsCount,
389
+ },
390
+ filePath: data.filePath,
391
+ });
392
+ // The subagent/topic title label — selectable on its own.
393
+ nodes.push({
394
+ id: subagentTitleNodeId(n.id),
395
+ type: 'heading',
396
+ apiName: sub.data.label,
397
+ parentId: n.id,
398
+ attributes: { role: 'title', subagent: sub.data.label },
399
+ filePath: data.filePath,
400
+ });
401
+ // NOTE: the "N Actions" chip is intentionally NOT emitted on L1 — actions
402
+ // are editable only in the L2 detail overlay (agentDetailSelectableNodes).
403
+ }
404
+ // junction nodes: pure layout, not selectable.
405
+ }
406
+ return nodes;
407
+ }
@@ -76,6 +76,8 @@ export interface ReasoningDetail {
76
76
  }
77
77
  export interface SubagentNodeData extends Record<string, unknown> {
78
78
  nodeType: 'subagent';
79
+ /** API name (key) of the subagent block in the `.agent` source. */
80
+ apiName: string;
79
81
  label: string;
80
82
  description?: string;
81
83
  /** Number of `actions` declared on this subagent block. */
@@ -1 +1 @@
1
- {"version":3,"file":"ast-to-graph.d.ts","sourceRoot":"","sources":["../../../../src/plugins/agent/extract/ast-to-graph.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;;GASG;AAEH,OAAO,KA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CAAC,EAAE,MAAM,CAAC;IAC5B,2EAA2E;IAC3E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,oEAAoE;IACpE,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,gBAAiB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/D,QAAQ,EAAE,UAAU,CAAC;IACrB,uDAAuD;IACvD,KAAK,EAAE,EAAE,CAAC;CACX;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAEpG;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AACvD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;AAC1E,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;AACnE,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;AAEnE,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAEpG,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC;AA4c7B;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,cAAc,EACnB,MAAM,CAAC,EAAE,MAAM,GACd;IACD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB,CAiHA"}
@@ -498,6 +498,7 @@ export function astToOverviewGraph(ast, source) {
498
498
  position: { x: 0, y: 0 },
499
499
  data: {
500
500
  nodeType: 'subagent',
501
+ apiName: String(name),
501
502
  label: readBlockLabel(block, String(name)),
502
503
  description: readBlockDescription(block),
503
504
  actionsCount: readActionsCount(block),