@pega/sdk 0.0.5 → 0.0.6

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 (266) hide show
  1. package/README.md +10 -3
  2. package/dist/index.js +764 -165
  3. package/package.json +1 -1
  4. package/templates/react-native-sdk-reference/.claude/settings.json +5 -0
  5. package/templates/react-native-sdk-reference/.prettierignore +17 -0
  6. package/templates/react-native-sdk-reference/.vscode/extensions.json +1 -0
  7. package/templates/react-native-sdk-reference/.vscode/settings.json +7 -0
  8. package/templates/react-native-sdk-reference/AGENTS.md +3 -0
  9. package/templates/react-native-sdk-reference/CLAUDE.md +1 -0
  10. package/templates/react-native-sdk-reference/README.md +56 -0
  11. package/templates/react-native-sdk-reference/app.json +40 -5
  12. package/templates/react-native-sdk-reference/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
  13. package/templates/react-native-sdk-reference/assets/expo.icon/Assets/grid.png +0 -0
  14. package/templates/react-native-sdk-reference/assets/expo.icon/icon.json +35 -0
  15. package/templates/react-native-sdk-reference/assets/icons/bell.png +0 -0
  16. package/templates/react-native-sdk-reference/assets/icons/clock.png +0 -0
  17. package/templates/react-native-sdk-reference/assets/icons/cross.png +0 -0
  18. package/templates/react-native-sdk-reference/assets/icons/donut.png +0 -0
  19. package/templates/react-native-sdk-reference/assets/icons/gear.png +0 -0
  20. package/templates/react-native-sdk-reference/assets/icons/globe.png +0 -0
  21. package/templates/react-native-sdk-reference/assets/icons/internet.png +0 -0
  22. package/templates/react-native-sdk-reference/assets/icons/music.png +0 -0
  23. package/templates/react-native-sdk-reference/assets/icons/right-arrow.png +0 -0
  24. package/templates/react-native-sdk-reference/assets/icons/speed.png +0 -0
  25. package/templates/react-native-sdk-reference/assets/images/MediaCo.png +0 -0
  26. package/templates/react-native-sdk-reference/assets/images/adaptive-icon.png +0 -0
  27. package/templates/react-native-sdk-reference/assets/images/android-icon-background.png +0 -0
  28. package/templates/react-native-sdk-reference/assets/images/android-icon-foreground.png +0 -0
  29. package/templates/react-native-sdk-reference/assets/images/android-icon-monochrome.png +0 -0
  30. package/templates/react-native-sdk-reference/assets/images/expo-badge-white.png +0 -0
  31. package/templates/react-native-sdk-reference/assets/images/expo-badge.png +0 -0
  32. package/templates/react-native-sdk-reference/assets/images/expo-logo.png +0 -0
  33. package/templates/react-native-sdk-reference/assets/images/favicon.png +0 -0
  34. package/templates/react-native-sdk-reference/assets/images/icon.png +0 -0
  35. package/templates/react-native-sdk-reference/assets/images/logo-glow.png +0 -0
  36. package/templates/react-native-sdk-reference/assets/images/partial-react-logo.png +0 -0
  37. package/templates/react-native-sdk-reference/assets/images/react-logo.png +0 -0
  38. package/templates/react-native-sdk-reference/assets/images/react-logo@2x.png +0 -0
  39. package/templates/react-native-sdk-reference/assets/images/react-logo@3x.png +0 -0
  40. package/templates/react-native-sdk-reference/assets/images/splash-icon.png +0 -0
  41. package/templates/react-native-sdk-reference/assets/images/tutorial-web.png +0 -0
  42. package/templates/react-native-sdk-reference/eslint.config.mjs +68 -0
  43. package/templates/react-native-sdk-reference/package.json +59 -14
  44. package/templates/react-native-sdk-reference/pega-constellationjs-0.26.3.tgz +0 -0
  45. package/templates/react-native-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  46. package/templates/react-native-sdk-reference/pega-sdk-types-0.1.0.tgz +0 -0
  47. package/templates/react-native-sdk-reference/sdk-config.json +31 -9
  48. package/templates/react-native-sdk-reference/src/app/_layout.tsx +38 -0
  49. package/templates/react-native-sdk-reference/src/app/home/_layout.tsx +39 -0
  50. package/templates/react-native-sdk-reference/src/app/home/contact.tsx +11 -0
  51. package/templates/react-native-sdk-reference/src/app/home/index.tsx +36 -0
  52. package/templates/react-native-sdk-reference/src/app/home/shop.tsx +11 -0
  53. package/templates/react-native-sdk-reference/src/app/home/your-services.tsx +11 -0
  54. package/templates/react-native-sdk-reference/src/app/index.tsx +72 -0
  55. package/templates/react-native-sdk-reference/src/app/workarea.tsx +135 -0
  56. package/templates/react-native-sdk-reference/src/bridge/Context/StoreContext.ts +4 -0
  57. package/templates/react-native-sdk-reference/src/bridge/RootComponent.tsx +12 -0
  58. package/templates/react-native-sdk-reference/src/bridge/react_pconnect.jsx +334 -0
  59. package/templates/react-native-sdk-reference/src/components/common/DisplayField.tsx +29 -0
  60. package/templates/react-native-sdk-reference/src/components/common/FormFieldWrapper.tsx +5 -0
  61. package/templates/react-native-sdk-reference/src/components/common/HelperText.tsx +11 -0
  62. package/templates/react-native-sdk-reference/src/components/common/LabelText.tsx +22 -0
  63. package/templates/react-native-sdk-reference/src/components/common/inputTheme.ts +17 -0
  64. package/templates/react-native-sdk-reference/src/components/design-system/AutoComplete.tsx +126 -0
  65. package/templates/react-native-sdk-reference/src/components/design-system/FieldGroup.tsx +72 -0
  66. package/templates/react-native-sdk-reference/src/components/design-system/Radio.tsx +61 -0
  67. package/templates/react-native-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +196 -0
  68. package/templates/react-native-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
  69. package/templates/react-native-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +89 -0
  70. package/templates/react-native-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
  71. package/templates/react-native-sdk-reference/src/components/field/Currency/Currency.tsx +84 -0
  72. package/templates/react-native-sdk-reference/src/components/field/Currency/index.tsx +1 -0
  73. package/templates/react-native-sdk-reference/src/components/field/Date/Date.tsx +94 -0
  74. package/templates/react-native-sdk-reference/src/components/field/Date/index.tsx +1 -0
  75. package/templates/react-native-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +211 -0
  76. package/templates/react-native-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
  77. package/templates/react-native-sdk-reference/src/components/field/Email/Email.tsx +81 -0
  78. package/templates/react-native-sdk-reference/src/components/field/Email/index.tsx +1 -0
  79. package/templates/react-native-sdk-reference/src/components/field/Group/Group.tsx +47 -0
  80. package/templates/react-native-sdk-reference/src/components/field/Group/index.tsx +1 -0
  81. package/templates/react-native-sdk-reference/src/components/field/Integer/Integer.tsx +84 -0
  82. package/templates/react-native-sdk-reference/src/components/field/Integer/index.tsx +1 -0
  83. package/templates/react-native-sdk-reference/src/components/field/Phone/Phone.tsx +85 -0
  84. package/templates/react-native-sdk-reference/src/components/field/Phone/index.ts +1 -0
  85. package/templates/react-native-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +118 -0
  86. package/templates/react-native-sdk-reference/src/components/field/RadioButtons/index.ts +1 -0
  87. package/templates/react-native-sdk-reference/src/components/field/TextArea/TextArea.tsx +86 -0
  88. package/templates/react-native-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
  89. package/templates/react-native-sdk-reference/src/components/field/TextInput/TextInput.tsx +84 -0
  90. package/templates/react-native-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
  91. package/templates/react-native-sdk-reference/src/components/field/URL/URL.tsx +86 -0
  92. package/templates/react-native-sdk-reference/src/components/field/URL/index.tsx +1 -0
  93. package/templates/react-native-sdk-reference/src/components/helpers/data_page.ts +20 -0
  94. package/templates/react-native-sdk-reference/src/components/helpers/event-utils.ts +20 -0
  95. package/templates/react-native-sdk-reference/src/components/helpers/instructions-utils.ts +57 -0
  96. package/templates/react-native-sdk-reference/src/components/helpers/state-utils.tsx +46 -0
  97. package/templates/react-native-sdk-reference/src/components/helpers/template-utils.ts +75 -0
  98. package/templates/react-native-sdk-reference/src/components/helpers/utils.ts +339 -0
  99. package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/ActionButtons.tsx +63 -0
  100. package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/index.tsx +1 -0
  101. package/templates/react-native-sdk-reference/src/components/infra/Assignment/Assignment.tsx +348 -0
  102. package/templates/react-native-sdk-reference/src/components/infra/Assignment/index.tsx +1 -0
  103. package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/AssignmentCard.tsx +56 -0
  104. package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/index.tsx +1 -0
  105. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/FlowContainer.tsx +57 -0
  106. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/helpers.ts +137 -0
  107. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/index.tsx +1 -0
  108. package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/RootContainer.tsx +52 -0
  109. package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/index.tsx +1 -0
  110. package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/helper.ts +128 -0
  111. package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/index.tsx +59 -0
  112. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/ViewContainer.tsx +31 -0
  113. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/helper.ts +39 -0
  114. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/index.ts +1 -0
  115. package/templates/react-native-sdk-reference/src/components/infra/Containers/helper.ts +9 -0
  116. package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/ErrorBoundary.tsx +53 -0
  117. package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/index.tsx +1 -0
  118. package/templates/react-native-sdk-reference/src/components/infra/MultiStep/MultiStep.tsx +24 -0
  119. package/templates/react-native-sdk-reference/src/components/infra/MultiStep/index.ts +1 -0
  120. package/templates/react-native-sdk-reference/src/components/infra/Reference/Reference.tsx +68 -0
  121. package/templates/react-native-sdk-reference/src/components/infra/Reference/index.tsx +1 -0
  122. package/templates/react-native-sdk-reference/src/components/infra/Reference/utils.ts +16 -0
  123. package/templates/react-native-sdk-reference/src/components/infra/Region/Region.tsx +10 -0
  124. package/templates/react-native-sdk-reference/src/components/infra/Region/index.tsx +1 -0
  125. package/templates/react-native-sdk-reference/src/components/infra/View/View.tsx +49 -0
  126. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +38 -0
  127. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
  128. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/utils/index.ts +28 -0
  129. package/templates/react-native-sdk-reference/src/components/template/Details/Details.tsx +82 -0
  130. package/templates/react-native-sdk-reference/src/components/template/Details/index.tsx +1 -0
  131. package/templates/react-native-sdk-reference/src/components/template/OneColumn/OneColumn.tsx +29 -0
  132. package/templates/react-native-sdk-reference/src/components/template/OneColumn/index.tsx +1 -0
  133. package/templates/react-native-sdk-reference/src/context/LoaderContext.tsx +42 -0
  134. package/templates/react-native-sdk-reference/src/mediaco/AdvBanner.tsx +62 -0
  135. package/templates/react-native-sdk-reference/src/mediaco/Header.tsx +60 -0
  136. package/templates/react-native-sdk-reference/src/mediaco/HomeScreen.tsx +78 -0
  137. package/templates/react-native-sdk-reference/src/mediaco/QuickActions.tsx +68 -0
  138. package/templates/react-native-sdk-reference/src/mediaco/ResolutionScreen.tsx +48 -0
  139. package/templates/react-native-sdk-reference/src/mediaco/SafeArea.tsx +11 -0
  140. package/templates/react-native-sdk-reference/src/mediaco/TabBar.tsx +102 -0
  141. package/templates/react-native-sdk-reference/src/mediaco/YourServices.tsx +90 -0
  142. package/templates/react-native-sdk-reference/src/sdk-pega-component-map.ts +64 -0
  143. package/templates/react-native-sdk-reference/src/types/PConnProps.d.ts +41 -0
  144. package/templates/react-native-sdk-reference/src/utils/auth.ts +62 -0
  145. package/templates/react-native-sdk-reference/src/utils/init-pcore.ts +37 -0
  146. package/templates/react-native-sdk-reference/src/utils/pcore-polyfills.ts +66 -0
  147. package/templates/react-native-sdk-reference/tsconfig.json +9 -8
  148. package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +171 -0
  149. package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +25 -26
  150. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +119 -0
  151. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +70 -121
  152. package/templates/react-sdk-reference/.ai-common/instructions/component-map.md +7 -19
  153. package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +10 -40
  154. package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +134 -0
  155. package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +15 -43
  156. package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +11 -63
  157. package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +12 -57
  158. package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +45 -71
  159. package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +98 -0
  160. package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +155 -0
  161. package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +67 -237
  162. package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +26 -77
  163. package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +315 -0
  164. package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +31 -80
  165. package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +43 -99
  166. package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +33 -83
  167. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AlertBanner.md +60 -74
  168. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +64 -84
  169. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +76 -109
  170. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +84 -101
  171. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +62 -87
  172. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +56 -76
  173. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +61 -85
  174. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Operator.md +84 -107
  175. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +36 -44
  176. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +125 -189
  177. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/WssQuickCreate.md +34 -50
  178. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +57 -179
  179. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +130 -0
  180. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +311 -0
  181. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +156 -0
  182. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +476 -0
  183. package/templates/react-sdk-reference/.ai-common/skills/field-components.md +120 -242
  184. package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +71 -212
  185. package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +47 -209
  186. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +90 -259
  187. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +75 -169
  188. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +65 -160
  189. package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +59 -157
  190. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +55 -134
  191. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +61 -185
  192. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +60 -138
  193. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +40 -99
  194. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +44 -111
  195. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +57 -165
  196. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Multiselect.md +41 -122
  197. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +32 -130
  198. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +48 -112
  199. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +43 -153
  200. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +76 -183
  201. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +59 -176
  202. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +30 -123
  203. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +47 -178
  204. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SemanticLink.md +31 -117
  205. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +51 -106
  206. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextContent.md +22 -75
  207. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +54 -116
  208. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +46 -100
  209. package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +44 -93
  210. package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +40 -167
  211. package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +165 -0
  212. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/ActionButtons.md +122 -0
  213. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/MultiStep.md +178 -0
  214. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/Stages.md +140 -0
  215. package/templates/react-sdk-reference/.ai-common/skills/template-components.md +74 -228
  216. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +66 -167
  217. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +57 -170
  218. package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +41 -76
  219. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +53 -109
  220. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +86 -289
  221. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +60 -185
  222. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +66 -115
  223. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DataReference.md +33 -68
  224. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +53 -133
  225. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultPage.md +39 -82
  226. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +38 -91
  227. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +47 -101
  228. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +27 -34
  229. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +25 -40
  230. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +34 -104
  231. package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +46 -147
  232. package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +139 -100
  233. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +43 -82
  234. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +47 -80
  235. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListPage.md +16 -29
  236. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +43 -228
  237. package/templates/react-sdk-reference/.ai-common/skills/template-skills/MultiReferenceReadOnly.md +20 -65
  238. package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +49 -97
  239. package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +37 -71
  240. package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +58 -148
  241. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +82 -107
  242. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +21 -60
  243. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +43 -100
  244. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +36 -76
  245. package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +41 -90
  246. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WideNarrow.md +36 -43
  247. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WssNavBar.md +25 -115
  248. package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +38 -174
  249. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +30 -57
  250. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +55 -101
  251. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +38 -121
  252. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/FileUtility.md +37 -98
  253. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Followers.md +18 -33
  254. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/QuickCreate.md +26 -91
  255. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/SummaryItem.md +28 -120
  256. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +41 -272
  257. package/templates/react-sdk-reference/package.json +1 -1
  258. package/templates/react-sdk-reference/pega-auth-0.2.44.tgz +0 -0
  259. package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  260. package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +13 -3
  261. package/templates/react-native-sdk-reference/.github/AGENTS.md +0 -23
  262. package/templates/react-native-sdk-reference/.github/copilot-instructions.md +0 -40
  263. package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +0 -48
  264. package/templates/react-native-sdk-reference/App.tsx +0 -49
  265. package/templates/react-native-sdk-reference/expo-env.d.ts +0 -3
  266. package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
@@ -0,0 +1,311 @@
1
+ # Skill: Authenticate to Pega
2
+
3
+ Establish an authenticated OAuth 2.0 session against the customer's Pega server, persist the resulting token locally, and use it to make DX API calls.
4
+
5
+ > **This skill is not part of the embedded flow.** The embedded flow resolves case types, their starting fields, and their components through the Pega MCP server, and the wired application authenticates itself in the browser at runtime — so no design-time token is needed and no workflow invokes this skill. Do not run it as a prerequisite to embedding, and do not let it write configuration that the embedded flow depends on. It remains available for making DX API calls directly.
6
+
7
+ ---
8
+
9
+ ## Purpose
10
+
11
+ The embedded flow needs to know which case type to embed, which components that case requires, and how the customer's Pega environment is configured. All of that lives on the Pega server behind an OAuth-protected DX API.
12
+
13
+ This skill collects connection details, writes them to `.pega-auth.json`, and invokes `npx pega-auth` — the headless CLI shipped inside the `@pega/auth` package — to exchange them for an access token, enrich the token with Constellation bootstrap data, and store it for reuse.
14
+
15
+ Once complete, the agent can call:
16
+
17
+ - `/api/application/v2/casetypes` — to list case types and present a pick-list
18
+ - `/api/application/v2/data_views/{D_page}` — to read any data page
19
+ - `D_pxBootstrapConfig` — to read Constellation runtime configuration
20
+
21
+ ---
22
+
23
+ ## Prerequisites
24
+
25
+ - A reachable Pega Infinity or Launchpad server
26
+ - An **OAuth 2.0 Client Registration** record on that server, configured for the grant type being used
27
+ - For the authorization-code grant: a redirect URI registered on that client record, and a browser available on the machine running the flow
28
+ - For the client-credentials grant: the client registration must be enabled for client credentials and mapped to an operator with DX API access
29
+
30
+ ---
31
+
32
+ ## Storage Contract
33
+
34
+ Two files at the project root. **Both must be gitignored.**
35
+
36
+ | File | Contents | Committed? |
37
+ | ------------------ | ------------------------------------------------------------------- | ---------- |
38
+ | `.pega-auth.json` | Collected connection details, including `clientSecret` / `password` | ❌ Never |
39
+ | `.pega-token.json` | The raw token response, plus `C11NB2S` and `appStaticContentServer` | ❌ Never |
40
+ | `sdk-config.json` | Non-secret runtime values only | ✅ Yes |
41
+
42
+ ⚠️ **`sdk-config.json` is served publicly at the application's web root.** Anything written into it is retrievable by any visitor. Client secrets and passwords must never be written there.
43
+
44
+ `.pega-auth.json` shape:
45
+
46
+ ```json
47
+ {
48
+ "serverType": "infinity",
49
+ "server": "https://example.pega.com/prweb",
50
+ "grantType": "clientCreds",
51
+ "authService": "pega",
52
+ "redirectUri": "https://localhost:4010/",
53
+ "clientId": "...",
54
+ "clientSecret": "...",
55
+ "user": "",
56
+ "password": "",
57
+ "isolationId": "",
58
+ "appAlias": "MediaCo"
59
+ }
60
+ ```
61
+
62
+ `.pega-token.json` shape (the token endpoint response, plus two enrichment fields):
63
+
64
+ ```json
65
+ {
66
+ "token_type": "Bearer",
67
+ "access_token": "...",
68
+ "refresh_token": "...",
69
+ "expires_in": 3600,
70
+ "obtained_at": 1753833600000,
71
+ "C11NB2S": "...",
72
+ "appStaticContentServer": "https://..."
73
+ }
74
+ ```
75
+
76
+ ---
77
+
78
+ ## Steps
79
+
80
+ ### Step 1 — Detect an existing session
81
+
82
+ Read `.pega-token.json` if it exists.
83
+
84
+ - If it contains an `access_token` and `obtained_at + expires_in * 1000` is still in the future, tell the user which server the session belongs to and ask whether to reuse it. On reuse, **skip to Step 6**.
85
+ - If the token is expired and a `refresh_token` is present, attempt a refresh (Step 4c) before falling back to a full re-authentication.
86
+ - If no token file exists, continue to Step 2.
87
+
88
+ Never print the token value itself — refer to it only by its presence and expiry.
89
+
90
+ ### Step 2 — Collect connection details
91
+
92
+ Ask for each value below **in this order**. Only ask a question when its condition is met.
93
+
94
+ | # | Prompt | Key | Default | Ask when |
95
+ | --- | ------------------------------------------------------------------------ | -------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------- |
96
+ | 1 | Enter Pega server type | `serverType` | `infinity` | Always |
97
+ | 2 | Enter Pega server url | `server` | `https://localhost:1080/prweb` | Always |
98
+ | 3 | Enter OAuth 2.0 grant type | `grantType` | `authCode` | Always |
99
+ | 4 | Enter authentication service alias | `authService` | `pega` | `serverType` is `infinity` **and** `grantType` is `authCode` |
100
+ | 5 | Enter valid redirect URI within the OAuth 2.0 client registration record | `redirectUri` | `https://localhost:4010/` | `serverType` is `infinity` **and** `grantType` is `authCode` |
101
+ | 6 | Enter user id | `user` | — | `serverType` is `infinity` **and** `grantType` is `passwordCreds` |
102
+ | 7 | Enter password | `password` | — | `user` was answered **and** `serverType` is `infinity` **and** `grantType` is `passwordCreds` |
103
+ | 8 | Enter clientId | `clientId` | — | Always |
104
+ | 9 | Enter clientSecret | `clientSecret` | — | (`serverType` is `infinity` **and** `grantType` is not `authCode`) **or** `serverType` is `launchpad` |
105
+
106
+ **Allowed values:**
107
+
108
+ | Key | Values |
109
+ | ------------ | ----------------------------------------------------------------------------------------------------------- |
110
+ | `serverType` | `infinity`, `launchpad` |
111
+ | `grantType` | `authCode` (Authorization code), `passwordCreds` (Password credentials), `clientCreds` (Client credentials) |
112
+
113
+ `passwordCreds` is **not supported on Launchpad** — omit it from the choices when `serverType` is `launchpad`.
114
+
115
+ **Launchpad only:** additionally ask for `isolationId` if the customer's Launchpad tenant requires one.
116
+
117
+ **Pre-filling (do not re-ask what is already known):**
118
+
119
+ Resolve each value from the first source that has a non-empty entry:
120
+
121
+ 1. `.pega-auth.json`
122
+ 2. `sdk-config.json` — `serverConfig.infinityRestServerUrl` → `server`, `serverConfig.appAlias` → `appAlias`, `authConfig.authService` → `authService`, `authConfig.mashupClientId` → `clientId`, `authConfig.mashupUserIdentifier` → `user`
123
+ 3. The defaults in the table above
124
+
125
+ Present the resolved values as a summary and ask the user to **confirm or amend** them, rather than prompting for each one individually. Only fall back to asking question-by-question for values that could not be resolved.
126
+
127
+ **Secret handling:** never ask the user to paste a `clientSecret` or `password` into chat if it can be avoided. Prefer reading them from an environment variable (`PEGA_CLIENT_SECRET`, `PEGA_PASSWORD`) or from an existing `.pega-auth.json`. If the user must supply one, tell them to place it in `.pega-auth.json` directly and confirm when done.
128
+
129
+ **Normalization:** ensure `server` and `redirectUri` end with a trailing `/` before building any URL from them, then join path segments without duplicating slashes.
130
+
131
+ ### Step 3 — Persist the collected configuration
132
+
133
+ Write the confirmed values to `.pega-auth.json`. Confirm the file is gitignored (see Step 7) **before** writing any secret into it.
134
+
135
+ ### Step 4 — Obtain an access token
136
+
137
+ Run the `@pega/auth` headless CLI from the project root:
138
+
139
+ ```
140
+ npx pega-auth
141
+ ```
142
+
143
+ The CLI reads `.pega-auth.json`, performs the OAuth token exchange, and writes `.pega-token.json`. It handles all grant types, token refresh, enrichment, and `sdk-config.json` synchronization in a single invocation.
144
+
145
+ **What the CLI does internally (for reference — the agent does not need to replicate this):**
146
+
147
+ 1. Checks `.pega-token.json` for an unexpired token — reuses if fresh
148
+ 2. Attempts `refresh_token` exchange if the token is expired but a refresh token exists
149
+ 3. Falls back to full authentication using the `grantType` in `.pega-auth.json`
150
+ 4. For `authCode`: opens the system browser for OAuth consent (requires a human to complete)
151
+ 5. For `clientCreds` / `passwordCreds`: completes headlessly with no interaction
152
+ 6. On success: writes token to `.pega-token.json`, fetches `D_pxBootstrapConfig` (Infinity only), and mirrors non-secret values into `sdk-config.json`
153
+
154
+ **Exit codes:**
155
+
156
+ | Code | Meaning |
157
+ | ---- | -------------------------------------------------------------- |
158
+ | `0` | Success — token is fresh and `.pega-token.json` is ready |
159
+ | `1` | Invalid config or missing `.pega-auth.json` |
160
+ | `2` | Authentication failed (bad credentials, disabled client, etc.) |
161
+
162
+ **CLI options (all optional):**
163
+
164
+ | Flag | Default | Purpose |
165
+ | --------------------- | ------------------ | ------------------------- |
166
+ | `--config <path>` | `.pega-auth.json` | Path to auth config file |
167
+ | `--token <path>` | `.pega-token.json` | Path to token output file |
168
+ | `--sdk-config <path>` | `sdk-config.json` | Path to SDK config file |
169
+
170
+ **Environment variable overrides:**
171
+
172
+ Secrets can be supplied via environment variables instead of writing them into `.pega-auth.json`:
173
+
174
+ | Variable | Overrides |
175
+ | -------------------- | -------------- |
176
+ | `PEGA_CLIENT_SECRET` | `clientSecret` |
177
+ | `PEGA_PASSWORD` | `password` |
178
+
179
+ **Interpreting output:**
180
+
181
+ All CLI output goes to stderr. On exit code `0`, read `.pega-token.json` to confirm `access_token` is present and proceed to Step 5.
182
+
183
+ On a non-zero exit code, read stderr for the specific error and consult the Troubleshooting section.
184
+
185
+ **Notes:**
186
+
187
+ - The CLI reads secrets from `.pega-auth.json` or env vars — they never appear on the command line or in the process list.
188
+ - Local/lab servers with self-signed certificates are handled via `"ignoreInvalidCerts": true` in `.pega-auth.json`.
189
+ - The `authCode` grant opens a browser and a local HTTPS listener on the configured `redirectUri`. A human must complete consent in the browser.
190
+ - Prefer `clientCreds` for agent-driven workflows — it requires no human interaction.
191
+
192
+ ### Step 5 — Verify enrichment
193
+
194
+ **Infinity only.** Launchpad has no equivalent step — skip it.
195
+
196
+ The CLI (Step 4) automatically fetches `D_pxBootstrapConfig` and writes the enrichment values into `.pega-token.json`. Verify they are present:
197
+
198
+ | Field in `.pega-token.json` | Source (fetched by the CLI) | Purpose |
199
+ | --------------------------- | --------------------------------------------------- | ------------------------------------- |
200
+ | `C11NB2S` | `pyConfigJSON.tokens.C11NB2S` | Constellation browser-to-server token |
201
+ | `appStaticContentServer` | `pyConfigJSON.serviceConfig.appStaticContentServer` | Static content CDN URL |
202
+
203
+ If these fields are missing (the CLI prints a warning when enrichment fails), the token is still valid for DX API calls but the runtime won't have CDN configuration. The most common cause is a `403` on `D_pxBootstrapConfig` — the operator's access group lacks the Constellation runtime privilege.
204
+
205
+ **Verification criterion:** `.pega-token.json` contains both `access_token` and `C11NB2S`.
206
+
207
+ ### Step 6 — Verify the session and make DX API calls
208
+
209
+ All DX API v2 calls use the same authorization header:
210
+
211
+ ```
212
+ Authorization: Bearer {access_token}
213
+ ```
214
+
215
+ When an `appAlias` is configured, address the application-scoped base instead of the default one:
216
+
217
+ | Scope | Base URL |
218
+ | ------------------- | -------------------------------------------- |
219
+ | Default application | `{server}/api/application/v2` |
220
+ | Aliased application | `{server}/app/{appAlias}/api/application/v2` |
221
+
222
+ Because `server` already includes the context root, the aliased base resolves to e.g. `https://example.pega.com/prweb/app/MediaCo/api/application/v2`. Do not add a second context-root segment.
223
+
224
+ These operations belong to the **Constellation DX APIs** service package. To confirm exact paths, parameters, and response schemas for a given Infinity version, open the API explorer on the target server and select that service package.
225
+
226
+ **List case types** — this is what allows the case type to be chosen from a list rather than typed:
227
+
228
+ ```
229
+ GET {base}/casetypes
230
+ ```
231
+
232
+ This operation takes **no parameters**. The response has the shape:
233
+
234
+ | Field | Meaning |
235
+ | -------------------------------------- | --------------------------------------------------------------------------------------------------- |
236
+ | `applicationIsConstellationCompatible` | Whether the application can run Constellation at all |
237
+ | `caseTypes[].ID` | The **fully qualified class name** (e.g. `DIXL-MediaCo-Work-NewService`) — this is the value needed |
238
+ | `caseTypes[].name` | Display label to show the user |
239
+ | `caseTypes[].links` | Creation affordance — `href`, `rel`, `type`, and a `request_body` describing the create payload |
240
+
241
+ ⛔ **Check `applicationIsConstellationCompatible` first.** If it is `false`, stop and tell the user that the target application is not Constellation-compatible and the embedded flow cannot work against it. Do not proceed to analysis, generation, or wiring — the failure would otherwise only surface much later as an unexplained runtime error.
242
+
243
+ Present `caseTypes` to the user as a numbered pick-list of `name — ID` pairs and have them choose one. The chosen `ID` is the fully qualified class name. The endpoint already returns only the case types the authenticated operator is permitted to create, so no additional filtering is required.
244
+
245
+ `links.request_body` describes the payload accepted when creating a case of that type — use it to determine which starting field values the mashup API call can supply (see Step 4 of the wire-integration skill).
246
+
247
+ **Read any data page:**
248
+
249
+ | Method | Usage |
250
+ | --------------------------------- | ---------------------------------------------------------------------- |
251
+ | `GET {base}/data_views/{D_page}` | Parameters passed as query-string values |
252
+ | `POST {base}/data_views/{D_page}` | Parameters passed in a `dataViewParameters` object in the request body |
253
+
254
+ Use `GET` for parameterless or simply-parameterized pages; use `POST` when the page takes structured parameters or when paging/filtering options are needed.
255
+
256
+ **Verification criterion:** the case types request returns HTTP 200 with a parsable JSON body containing at least one entry. A `401` means the token is invalid or expired; a `403` means the token is valid but the operator's access group lacks the required privilege.
257
+
258
+ ### Step 7 — Mirror non-secret values into `sdk-config.json`
259
+
260
+ The CLI (Step 4) automatically syncs non-secret values into `sdk-config.json`. After the CLI completes, the following fields are set:
261
+
262
+ | `sdk-config.json` field | Source |
263
+ | ------------------------------------ | ------------- |
264
+ | `serverConfig.infinityRestServerUrl` | `server` |
265
+ | `serverConfig.appAlias` | `appAlias` |
266
+ | `authConfig.authService` | `authService` |
267
+ | `authConfig.mashupClientId` | `clientId` |
268
+ | `authConfig.portalClientId` | `clientId` |
269
+
270
+ The **one field the CLI does not set** is `serverConfig.appMashupCaseType` — that requires the case type chosen in Step 6. After the user picks a case type, write its `ID` into this field.
271
+
272
+ ⚠️ **`portalClientId` must be non-empty.** If it is missing, the SDK's authentication initializer classifies the session as custom-auth and returns without ever resolving its readiness promise — producing a silent, permanent hang with no network activity and no error. See Step 2 of the wire-integration skill. The CLI ensures this is always populated.
273
+
274
+ The CLI leaves `authConfig.portalClientSecret`, `authConfig.portalGrantType`, and `authConfig.mashupPassword` present but empty. Secrets are never written to this file.
275
+
276
+ ---
277
+
278
+ ## Security Notes
279
+
280
+ - `.pega-auth.json` and `.pega-token.json` hold live credentials. Confirm both are gitignored before writing to them, and re-confirm with `git status --ignored` afterwards.
281
+ - Never echo an access token, refresh token, client secret, or password back to the user, into a log, or into a commit message. Refer to them by name only.
282
+ - Prefer `clientCreds` over `passwordCreds` — it avoids handling an end-user password entirely.
283
+ - Treat relaxed TLS verification as a local-development affordance only. Never suggest it for a production or shared environment.
284
+ - If a secret is ever pasted into chat or committed by accident, tell the user to rotate the OAuth client registration record — the value must be considered compromised.
285
+
286
+ ---
287
+
288
+ ## Troubleshooting
289
+
290
+ | Symptom | Cause | Resolution |
291
+ | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
292
+ | `401` with `invalid_client` from the token endpoint | `clientId` / `clientSecret` do not match an OAuth client registration record, or the record is disabled | Verify the values against the client registration record in Dev Studio. Confirm the record is enabled. |
293
+ | `401` with `invalid_grant` | The grant type requested is not enabled on the client registration record, or the user credentials are wrong | Enable the grant on the record, or correct `user` / `password`. |
294
+ | `unsupported_grant_type` on Launchpad with `passwordCreds` | Launchpad does not support the password grant | Use `authCode` or `clientCreds`. |
295
+ | TLS handshake fails / self-signed certificate error | Local or lab server presents an untrusted certificate | Add `"ignoreInvalidCerts": true` to `.pega-auth.json` and re-run `npx pega-auth`. Only use against local/lab servers. |
296
+ | `404` on the token endpoint | `server` is missing the `/prweb` context root, or path segments were joined with a doubled or missing slash | Normalize `server` to end with `/` and re-derive the endpoint (see Step 2). |
297
+ | Authorization-code flow hangs with no browser activity | `npx pega-auth` opened a browser but consent was not completed, or the redirect URI is not registered | Complete the consent in the browser. Confirm the redirect URI on the client registration record matches `redirectUri` exactly, including its trailing slash. |
298
+ | Redirect returns "redirect_uri mismatch" | `redirectUri` differs from the registered value — most often by a missing trailing slash | Make both values byte-identical. |
299
+ | `403` on `D_pxBootstrapConfig` | The authenticated operator's access group lacks the privilege to read the bootstrap data page | Authenticate as an operator with an access group that includes the Constellation runtime privileges. |
300
+ | `pyConfigJSON` is present but `tokens.C11NB2S` is missing | The response was only parsed once — `pyConfigJSON` is a JSON **string** | Parse `pyConfigJSON` a second time before reading `tokens` (see Step 5). |
301
+ | `/casetypes` returns an empty array | The operator has no creatable case types in that application, or `appAlias` targets the wrong application | Confirm `appAlias` matches the target application and that the operator can create cases in it. |
302
+ | `applicationIsConstellationCompatible` is `false` | The target application is not enabled for Constellation | Stop. Confirm `appAlias` points at the intended application; if it does, the application must be made Constellation-compatible before an embedded flow is possible. |
303
+ | Calls succeed, then start returning `401` | The access token expired | Re-run `npx pega-auth` — it will attempt a refresh automatically, or perform a fresh login. |
304
+
305
+ ---
306
+
307
+ ## Notes
308
+
309
+ - This skill is a prerequisite for case-type resolution. Do not ask the user for a fully qualified case type class before it has completed — the class name should come from `/casetypes`, not from memory.
310
+ - The token obtained here is used by the **agent**, for design-time DX API calls. It is unrelated to the token the browser obtains at runtime, which the SDK's auth client negotiates from `sdk-config.json`.
311
+ - Re-running this skill is safe. It detects an existing valid session and reuses it rather than forcing a fresh authentication.
@@ -0,0 +1,156 @@
1
+ # Skill: Run and Verify the Embedded Integration
2
+
3
+ Prove that a wired case flow actually runs in the customer's application — by building it, launching it in a browser, driving it to the case form, and repairing what breaks.
4
+
5
+ ---
6
+
7
+ ## Purpose
8
+
9
+ Wiring is not verification. A wired integration can compile cleanly and still fail at runtime: a missing registry key, an asset that does not resolve from the launching route, a rendering-boundary violation at the trigger. This skill closes that gap so the customer is not the one who discovers the failure.
10
+
11
+ Use this after `{{SKILL_DIR}}/embedded-flow/wire-integration.md` has completed. It is the terminal step of the embedded flow.
12
+
13
+ ---
14
+
15
+ ## Rules for this skill
16
+
17
+ **Resolve, never assume.** Every command comes from the project — its script manifest, its toolchain configuration, its own output. Do not assume a package manager, a framework, a build tool, a port, or a script name. If a needed capability has no script entry, derive the invocation from the tool the project already depends on rather than adding a script.
18
+
19
+ **Assert behaviour, not implementation.** The stages below describe _what must be true_. Write the checks in whatever form suits the project. Do not treat any wording here as a template to transcribe.
20
+
21
+ **Never handle credentials.** A human authenticates in a visible browser window. Credentials are never requested, captured, logged, echoed, or written to any file by the agent, in any stage, under any failure condition.
22
+
23
+ ---
24
+
25
+ ## Prerequisites
26
+
27
+ - The integration is wired and the case-launch trigger is reachable from a route in the running application
28
+ - `sdk-config.json` holds real values for the customer's Pega environment
29
+ - A human is available to authenticate when the flow reaches the Pega login form
30
+
31
+ ---
32
+
33
+ ## Stage 1 — Static gates
34
+
35
+ No browser, no credentials. Run these first; they are the cheapest and catch the largest class of failures.
36
+
37
+ 1. **Production build.** Resolve and run the project's production build. This matters more than a development build: development servers frequently tolerate rendering-boundary violations that the production build rejects, and a server-rendered route that fails only in production is invisible until deploy.
38
+ 2. **Type check.** Run the project's type-check entry point. If it has none, invoke the type checker the project already depends on in a no-emit mode using the project's own compiler configuration. Do not add a script entry for this.
39
+ 3. **Lint.** Run the project's lint entry point over the generated component folder and every seam file wiring touched.
40
+ 4. **Configuration coherence.** Read the served SDK configuration file and assert that the case type is set and that `portalClientId` is present and non-empty. An empty `portalClientId` makes the SDK classify the session as custom-auth and return without ever resolving its readiness promise — a permanent hang with no network activity, no error, and nothing in the console. It costs nothing to catch here and is close to undiagnosable three stages later.
41
+
42
+ All of these must pass before continuing. A failure here is almost always agent-owned code or configuration — fix it and re-run this stage.
43
+
44
+ ---
45
+
46
+ ## Stage 2 — Pre-authentication browser checks
47
+
48
+ ### Choosing a browser driver
49
+
50
+ Prefer a browser automation library already present in the customer's dependency manifest. Only when none exists, add one as a development dependency — this is a permitted seam. Ask before adding it if the project's dependency policy is unclear.
51
+
52
+ ### Starting the application
53
+
54
+ Start the project's development server and **discover its address from the server's own startup output**. Do not assume a port; a port that is already occupied silently shifts, and a hardcoded assumption then verifies nothing.
55
+
56
+ If the Pega server named in `sdk-config.json` is unreachable from this environment, stop here. Report that verification is limited to Stage 1, state which host could not be reached, and do not present the run as a failure of the integration.
57
+
58
+ ### Checks
59
+
60
+ Load the route hosting the case-launch trigger, then assert:
61
+
62
+ 1. The route renders — no server-render failure, no error overlay
63
+ 2. The browser console and page-error channels are clean; collect anything that appears
64
+ 3. The Pega runtime global is present on the window object before application code needs it
65
+ 4. The SDK configuration file and the core runtime script both resolve successfully **from the depth of this specific route**. A reference that works from the application root can still fail from a nested route, and this is the failure it exists to catch
66
+ 5. Activating the trigger mounts the Pega container element
67
+
68
+ Stage 2 is the last point at which failures are cheap to diagnose. Do not skip ahead when a check here fails.
69
+
70
+ ---
71
+
72
+ ## Stage 3 — Authentication handoff
73
+
74
+ The SDK performs a full-page redirect to the Pega login form. This is expected and is not automated.
75
+
76
+ 1. Run the browser in a mode the human can see and interact with
77
+ 2. On navigation to the Pega origin, print a clear, unmissable instruction: sign in in the open browser window; verification resumes on its own afterwards
78
+ 3. Wait for navigation back to the application's origin, with a timeout generous enough for a person to read a prompt, find credentials, and complete any second factor
79
+ 4. Persist the browser session state afterwards so later runs may skip this stage. Write it to a dedicated directory that holds nothing else — `.pega-verify/` at the project root — so a single ignore rule covers it
80
+
81
+ Session-state reuse is **best-effort only**. Pega may hold tokens in storage that session snapshots do not capture, in which case this stage simply recurs — that is not a failure.
82
+
83
+ ⚠️ **The saved file contains live session tokens.** Before writing it, add an ignore rule for that directory to the project's version-control ignore file, and confirm the rule is in place. Never commit the file, and never print its contents. Adding the ignore rule is a permitted seam.
84
+
85
+ ---
86
+
87
+ ## Stage 4 — Post-authentication assertions
88
+
89
+ With the case form rendered:
90
+
91
+ 1. **Case creation succeeded.** The create call returned a case, and no request failed during launch. A rejected create leaves a mounted-but-empty container, which reads as a rendering fault — check this first so it is not misdiagnosed as one. A payload rejected as a unit, with no indication of which value was at fault, points at the seeded starting fields
92
+ 2. **The bridge is rendering.** The container has rendered descendants — not an empty container, and not a spinner that never resolves
93
+ 3. **The assignment is rendering, not the case view.** The embedded flow launches an assignment. Case-level chrome means the wrong page was launched — assert there is no case stage indicator, no case-history or details tab strip, and no case summary panel. Step navigation _within_ the assignment is expected and is not case chrome
94
+ 4. **No fallback markers.** The fallback component renders the name of any component the runtime requested but could not resolve. Its presence anywhere in the rendered output is a registry gap, and the rendered text names exactly which component is missing. Assert there are none. Check assertion 3 first: components that only exist in the case view will surface here as fallback markers when the wrong page was launched, and adding registry entries for them treats the symptom
95
+ 5. **A field round-trips.** At least one generated field accepts input and retains its value after the commit event fires. This is what separates a component that renders from a component that is wired
96
+ 6. **The flow is where it was launched from.** After the redirect completes, assert the case form is visible on the surface the user triggered it from — the overlay re-opened, or the location restored. Landing on the application's root with no flow visible is the failure this catches, and it is a wiring defect, not a Pega one
97
+ 7. **The flow can be launched again.** Dismiss the flow, launch it a second time, and assert the form renders again with empty fields — then dismiss and launch a third time, to prove the second launch was not a one-off recovery. Assert that runtime bootstrap is **not** repeated: only the first launch may issue the bootstrap request, while every launch issues its own case-creation request. A second launch that hangs on a loading state with no request at all means the runtime was discarded with the target and cannot be re-established; a second launch that reveals an empty target, or one still showing the previous case's values, means case creation is bound to set-up rather than to the launch. **Do not stop at the first successful launch** — set-up and first launch coincide, so a single pass cannot see either failure
98
+ 8. **Console clean.** No errors during form render or interaction
99
+ 9. **Evidence on failure.** Capture a screenshot and the collected console output for any failed assertion
100
+
101
+ ⚠️ **At least one full pass must start from a session with no prior authentication state.** Assertions 2 and 6 only exercise the redirect path on a first authentication; once a session exists the application is never torn down and both pass regardless of whether the launch context was ever persisted. A run that reuses saved session state is valid for everything else, but it cannot be the only run.
102
+
103
+ ---
104
+
105
+ ## Stage 5 — Triage and repair
106
+
107
+ ### What may be fixed
108
+
109
+ Only code the agent generated, or a declared integration seam.
110
+
111
+ | Symptom | Cause | Fix |
112
+ | ---------------------------------------------------------- | ----------------------------------------------------------- | --------------------------------------------------------------------- |
113
+ | Case view renders instead of the assignment | The launch call omits the embedded page name | Correct the arguments to the case-creation call at the trigger seam |
114
+ | Fallback component appears in the rendered output | The named component is absent from the registry | Add the registry entry, generating the component if it does not exist |
115
+ | Type or lint failure in a generated component | Generated code does not satisfy the project's toolchain | Correct the generated file |
116
+ | Configuration file or core runtime script fails to resolve | The reference is wrong for the launching route's depth | Correct the reference at the entry-point seam |
117
+ | Pega runtime global undefined | Core runtime script missing, mis-ordered, or wrongly loaded | Correct the load order or strategy at the entry-point seam |
118
+ | Container never mounts on trigger activation | Trigger not connected, or the host element is absent | Connect the trigger or add the host element |
119
+ | Rendering-boundary error at the trigger | The trigger seam crosses a server/client boundary illegally | Restructure the trigger seam, and only the trigger seam |
120
+ | Field value lost after the commit event | The actions-API call is missing or mis-sequenced | Correct the wiring inside the generated field |
121
+
122
+ ### What must only be reported
123
+
124
+ **Never fix these. Stop and hand back.**
125
+
126
+ - Anything requiring credentials or a reachable environment — server URL, application alias, client identifier, an empty portal client identifier, a case type that does not exist, authorization refused. These belong to the customer
127
+ - **Any defect in customer code outside the declared seams.** A failing assertion is not permission to edit the customer's application until it passes. Report the file, the symptom, and the likely cause, and stop
128
+ - Anything visual. This skill verifies that the flow renders and functions, never that it looks correct
129
+
130
+ ### The loop
131
+
132
+ Fix, re-run the stage that failed, continue. Cap the number of repair cycles. On exhausting the cap, or on reaching any report-only class, hand back with the captured evidence and a specific diagnosis rather than continuing to try variations.
133
+
134
+ ---
135
+
136
+ ## Verification summary
137
+
138
+ Always finish by reporting, whatever the outcome:
139
+
140
+ - Which stages ran and which passed
141
+ - Every fix applied, with the file and the reason
142
+ - Everything that needs the customer, stated as a concrete action
143
+ - The furthest stage reached, so "done" is never ambiguous between _generated_ and _verified_
144
+
145
+ ---
146
+
147
+ ## Common failures specific to embedded flows
148
+
149
+ | Symptom | Cause |
150
+ | ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
151
+ | Route renders in development but fails the production build | A server-rendered component passes a non-serializable value into a client boundary at the trigger seam |
152
+ | Configuration or runtime script returns not-found | The reference is relative and the launching route sits deeper than the application root |
153
+ | Initialization never completes, with no error | The portal client identifier is empty, so the session is classified as custom authentication and the initializer's promise never settles |
154
+ | Case stage indicator, case-history tabs, or a case summary appear | The case-creation call omits the embedded page name, so the runtime returns the whole case view instead of the assignment |
155
+ | A component renders as its own name in plain text | The fallback component is standing in for a missing registry key |
156
+ | Case form renders but values reset | The generated field holds local state without committing through the actions API |