@wildo-ai/saas-frontend-lib 1.1.3 → 1.1.4

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 (127) hide show
  1. package/dist/esm/companion-exports.d.ts +1 -1
  2. package/dist/esm/companion-exports.d.ts.map +1 -1
  3. package/dist/esm/companion-exports.js +1 -1
  4. package/dist/esm/companion-exports.js.map +1 -1
  5. package/dist/esm/components/ai-elements/decision/approval.d.ts +13 -1
  6. package/dist/esm/components/ai-elements/decision/approval.d.ts.map +1 -1
  7. package/dist/esm/components/ai-elements/decision/approval.js.map +1 -1
  8. package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
  9. package/dist/esm/components/flows-actors/approval.js +12 -7
  10. package/dist/esm/components/flows-actors/approval.js.map +1 -1
  11. package/dist/esm/components/flows-actors/approval.labels.d.ts.map +1 -1
  12. package/dist/esm/components/flows-actors/approval.labels.js +3 -0
  13. package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
  14. package/dist/esm/components/flows-actors/execution-plan.js +1 -1
  15. package/dist/esm/components/flows-actors/execution-plan.js.map +1 -1
  16. package/dist/esm/components/flows-actors/task-memory.js +1 -1
  17. package/dist/esm/components/flows-actors/task-memory.js.map +1 -1
  18. package/dist/esm/components/form/automated/generated-relationship-field.hooks.d.ts +1 -1
  19. package/dist/esm/components/form/controls/number/slider.d.ts +1 -1
  20. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.d.ts +1 -1
  21. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.d.ts.map +1 -1
  22. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js.map +1 -1
  23. package/dist/esm/components/form/fields/form-field-file.d.ts.map +1 -1
  24. package/dist/esm/components/form/fields/form-field-file.js +66 -17
  25. package/dist/esm/components/form/fields/form-field-file.js.map +1 -1
  26. package/dist/esm/components/form/fields/form-field-file.labels.js +2 -2
  27. package/dist/esm/components/form/fields/form-field-file.labels.js.map +1 -1
  28. package/dist/esm/components/form/form-field-types.d.ts +20 -0
  29. package/dist/esm/components/form/form-field-types.d.ts.map +1 -1
  30. package/dist/esm/components/form/form-field-types.js.map +1 -1
  31. package/dist/esm/components/navigation/NavigationItemBadge.d.ts +7 -1
  32. package/dist/esm/components/navigation/NavigationItemBadge.d.ts.map +1 -1
  33. package/dist/esm/components/navigation/NavigationItemBadge.js +29 -1
  34. package/dist/esm/components/navigation/NavigationItemBadge.js.map +1 -1
  35. package/dist/esm/components/navigation/menu-bar.d.ts +1 -1
  36. package/dist/esm/components/overlays/containers/OverlayContainer.d.ts.map +1 -1
  37. package/dist/esm/components/overlays/containers/OverlayContainer.js +36 -9
  38. package/dist/esm/components/overlays/containers/OverlayContainer.js.map +1 -1
  39. package/dist/esm/components/overlays/floating/context-menu.d.ts +1 -1
  40. package/dist/esm/components/overlays/floating/dropdown-menu.d.ts +1 -1
  41. package/dist/esm/components/resources/ResourceLayout_FilterChips.js +1 -1
  42. package/dist/esm/components/resources/ResourceLayout_FilterChips.js.map +1 -1
  43. package/dist/esm/components/resources/ResourceListItemRenderer.js +1 -1
  44. package/dist/esm/components/resources/ResourceListItemRenderer.js.map +1 -1
  45. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts +12 -0
  46. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts.map +1 -1
  47. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js +13 -1
  48. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js.map +1 -1
  49. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +106 -49
  50. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
  51. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +311 -109
  52. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
  53. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.d.ts.map +1 -1
  54. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.js +32 -2
  55. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.js.map +1 -1
  56. package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
  57. package/dist/esm/components/settings/SettingsHub.js +30 -6
  58. package/dist/esm/components/settings/SettingsHub.js.map +1 -1
  59. package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts.map +1 -1
  60. package/dist/esm/components/views/onboarding-view/OnboardingView.js +9 -2
  61. package/dist/esm/components/views/onboarding-view/OnboardingView.js.map +1 -1
  62. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts +16 -0
  63. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts.map +1 -1
  64. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js +17 -0
  65. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js.map +1 -1
  66. package/dist/esm/core/automated-layout/default-layout-generator.frontend.utils.d.ts.map +1 -1
  67. package/dist/esm/core/automated-layout/default-layout-generator.frontend.utils.js +3 -2
  68. package/dist/esm/core/automated-layout/default-layout-generator.frontend.utils.js.map +1 -1
  69. package/dist/esm/core/billing/billing-launcher.js +1 -1
  70. package/dist/esm/core/billing/billing-launcher.js.map +1 -1
  71. package/dist/esm/core/components-registry/provider-component-registry.frontend.service.d.ts +64 -4
  72. package/dist/esm/core/components-registry/provider-component-registry.frontend.service.d.ts.map +1 -1
  73. package/dist/esm/core/components-registry/provider-component-registry.frontend.service.js +76 -4
  74. package/dist/esm/core/components-registry/provider-component-registry.frontend.service.js.map +1 -1
  75. package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.d.ts +8 -0
  76. package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.d.ts.map +1 -1
  77. package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.js +1 -0
  78. package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.js.map +1 -1
  79. package/dist/esm/core/config/chart-view.frontend.schemas.d.ts +8 -8
  80. package/dist/esm/core/config/composite-view.schemas.d.ts +4 -4
  81. package/dist/esm/core/config/engine-settings-destinations.d.ts +0 -69
  82. package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
  83. package/dist/esm/core/config/engine-settings-destinations.js +35 -74
  84. package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
  85. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +10 -1
  86. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
  87. package/dist/esm/core/config/settings-hub.frontend.schemas.js +9 -0
  88. package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
  89. package/dist/esm/core/config/useSettingsHubConfig.d.ts.map +1 -1
  90. package/dist/esm/core/config/useSettingsHubConfig.js +8 -1
  91. package/dist/esm/core/config/useSettingsHubConfig.js.map +1 -1
  92. package/dist/esm/core/events/events.frontend.schemas.d.ts +4 -4
  93. package/dist/esm/core/external-providers/ProviderFilePickerHost.d.ts +12 -1
  94. package/dist/esm/core/external-providers/ProviderFilePickerHost.d.ts.map +1 -1
  95. package/dist/esm/core/external-providers/ProviderFilePickerHost.js +15 -2
  96. package/dist/esm/core/external-providers/ProviderFilePickerHost.js.map +1 -1
  97. package/dist/esm/core/external-providers/provider-file-selection.frontend.utils.d.ts +1 -2
  98. package/dist/esm/core/external-providers/provider-file-selection.frontend.utils.d.ts.map +1 -1
  99. package/dist/esm/core/external-providers/provider-file-selection.frontend.utils.js.map +1 -1
  100. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +6 -1
  101. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
  102. package/dist/esm/core/flows-actors/FlowsActorsContext.js +10 -2
  103. package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
  104. package/dist/esm/core/i18n/I18nContext.d.ts +23 -0
  105. package/dist/esm/core/i18n/I18nContext.d.ts.map +1 -1
  106. package/dist/esm/core/i18n/I18nContext.js +6 -1
  107. package/dist/esm/core/i18n/I18nContext.js.map +1 -1
  108. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +75 -2
  109. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
  110. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +52 -0
  111. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
  112. package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.d.ts +3 -2
  113. package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.d.ts.map +1 -1
  114. package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.js +57 -4
  115. package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.js.map +1 -1
  116. package/dist/esm/core/resources/ResourceReadCacheBridge.d.ts.map +1 -1
  117. package/dist/esm/core/resources/ResourceReadCacheBridge.js +130 -37
  118. package/dist/esm/core/resources/ResourceReadCacheBridge.js.map +1 -1
  119. package/dist/esm/core/resources/resources.frontend.schemas.d.ts +2 -2
  120. package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
  121. package/dist/esm/core/runtime/start-application.frontend.service.js +17 -9
  122. package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
  123. package/dist/esm/core/security/UserOrgsContext.d.ts.map +1 -1
  124. package/dist/esm/core/security/UserOrgsContext.js +61 -5
  125. package/dist/esm/core/security/UserOrgsContext.js.map +1 -1
  126. package/dist/tsconfig.build.tsbuildinfo +1 -1
  127. package/package.json +6 -6
@@ -36,7 +36,7 @@ export { ApplicationLevelComponentType } from './core/config/app-level-component
36
36
  * CONTAINS (its sub-tabs, for label generation) has to resolve the ref against
37
37
  * this catalog.
38
38
  */
39
- export { ENGINE_SETTINGS_DESTINATIONS, EngineSettingsDestinationRef } from './core/config/engine-settings-destinations';
39
+ export { ENGINE_SETTINGS_DESTINATIONS } from './core/config/engine-settings-destinations';
40
40
  export { SettingsSectionTargetKind } from './core/config/settings-hub.frontend.schemas';
41
41
  export type { SettingsDestination, SettingsPlacement, SettingsHubConfig, } from './core/config/settings-hub.frontend.schemas';
42
42
  export type { CommandMenuCommand, MenubarLauncherItem, SidebarItem, SidebarSection, } from './core/config/launcher-items.frontend.schemas';
@@ -1 +1 @@
1
- {"version":3,"file":"companion-exports.d.ts","sourceRoot":"","sources":["../../src/companion-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,8BAA8B,EAC9B,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,qDAAqD,CAAC;AAEpG;;;;;;;;;GASG;AACH,OAAO,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AACxH,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,6CAA6C,CAAC;AACrD,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,cAAc,GACf,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,+CAA+C,CAAC;AACvD,YAAY,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AACpF,YAAY,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACzF,YAAY,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AACvF,YAAY,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC/F,OAAO,EACL,sBAAsB,GACvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,iCAAiC,CAAC;AACzC,YAAY,EACV,gCAAgC,EAChC,kBAAkB,GACnB,MAAM,6CAA6C,CAAC;AACrD,YAAY,EAAE,oCAAoC,EAAE,MAAM,0DAA0D,CAAC;AACrH,OAAO,EACL,wCAAwC,GACzC,MAAM,mDAAmD,CAAC;AAC3D,YAAY,EACV,wBAAwB,GACzB,MAAM,yDAAyD,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAc9D,OAAO,EACL,mBAAmB,GACpB,MAAM,6CAA6C,CAAC;AACrD,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,+BAA+B,EAC/B,wBAAwB,EACxB,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,0CAA0C,EAC1C,4BAA4B,GAC7B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,oCAAoC,EACpC,kDAAkD,GACnD,MAAM,2CAA2C,CAAC"}
1
+ {"version":3,"file":"companion-exports.d.ts","sourceRoot":"","sources":["../../src/companion-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,8BAA8B,EAC9B,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,qDAAqD,CAAC;AAEpG;;;;;;;;;GASG;AACH,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EAAE,yBA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AA0C,EAC1C,4BAA4B,GAC7B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,oCAAoC,EACpC,kDAAkD,GACnD,MAAM,2CAA2C,CAAC"}
@@ -35,7 +35,7 @@ export { ApplicationLevelComponentType } from './core/config/app-level-component
35
35
  * CONTAINS (its sub-tabs, for label generation) has to resolve the ref against
36
36
  * this catalog.
37
37
  */
38
- export { ENGINE_SETTINGS_DESTINATIONS, EngineSettingsDestinationRef } from './core/config/engine-settings-destinations.js';
38
+ export { ENGINE_SETTINGS_DESTINATIONS } from './core/config/engine-settings-destinations.js';
39
39
  export { SettingsSectionTargetKind } from './core/config/settings-hub.frontend.schemas.js';
40
40
  export { ENGINE_PAGE_METADATA, EnginePageRef, LauncherItemTargetKind, SidebarHomeDisplayMode, SidebarResponsivePolicy, SidebarSectionBehavior, SidebarSectionContentKind, SidebarSectionInlineCreate, HostedTriggerAppearance, } from './core/config/launcher-items.frontend.schemas.js';
41
41
  export { FrontendView_ScopeMode, } from './core/config/views-frontend.schemas.js';
@@ -1 +1 @@
1
- {"version":3,"file":"companion-exports.js","sourceRoot":"","sources":["../../src/companion-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAQH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,8BAA8B,EAC9B,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,qDAAqD,CAAC;AAEpG;;;;;;;;;GASG;AACH,OAAO,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AACxH,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAYxF,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,+CAA+C,CAAC;AAKvD,OAAO,EACL,sBAAsB,GACvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EACL,wCAAwC,GACzC,MAAM,mDAAmD,CAAC;AAK3D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,OAAO,EACL,mBAAmB,GACpB,MAAM,6CAA6C,CAAC;AAUrD,OAAO,EACL,0CAA0C,EAC1C,4BAA4B,GAC7B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,oCAAoC,EACpC,kDAAkD,GACnD,MAAM,2CAA2C,CAAC","sourcesContent":["/**\n * Public companion surface for authored frontend configuration and module\n * definitions.\n *\n * Narrow entry point for config files, module definitions, and companion\n * tooling — keeps authored app code off the broad runtime/UI barrel.\n *\n * # Authoring / typing only — no runtime services\n *\n * Symbols in this barrel are companion-safe by construction: zero\n * React, zero `axios`, zero runtime services. Concretely, this means\n * Zod schemas, type aliases, enums, factory builders, and the small\n * handful of pure utilities the spec package + module-definition\n * files need at authoring time.\n *\n * Runtime services a companion subprocess needs to materialise the\n * authored configuration at runtime (HTTP client, repositories,\n * event bus, logger) live in the dedicated `/companion-runtime`\n * subpath (`companion-runtime-exports.ts`) — see that file's\n * top-level JSDoc for the rationale. Mixing the two surfaces would\n * collapse two semantically distinct concepts (authoring vs.\n * subprocess bootstrap) into one, and silently invite future\n * runtime helpers to land here too — exactly the framework-mindset\n * failure mode `design-philosophy.mdc` warns against.\n */\n\nexport type {\n AppConfiguration_Frontend,\n ErrorPageConfig,\n QuickSwitcherScopeField,\n ShellModuleContributions,\n} from './core/config/app-configuration-frontend.schemas';\nexport {\n CommandBarPolicy,\n ErrorPageActionType,\n QuickSwitcherFieldPresentation,\n UserDropdownAvatarDisplay,\n UserDropdownSection,\n} from './core/config/app-configuration-frontend.schemas';\nexport { ApplicationLevelComponentType } from './core/config/app-level-components.frontend.schemas';\n\n/**\n * The settings destination catalog, for companion tooling that has to reason\n * about what an application PLACED.\n *\n * Companion-safe by construction: a pure const array, an enum and interfaces —\n * no React, no axios, no runtime services. Needed here because a placement names\n * only a `destinationRef`; anything that must walk what that destination\n * CONTAINS (its sub-tabs, for label generation) has to resolve the ref against\n * this catalog.\n */\nexport { ENGINE_SETTINGS_DESTINATIONS, EngineSettingsDestinationRef } from './core/config/engine-settings-destinations';\nexport { SettingsSectionTargetKind } from './core/config/settings-hub.frontend.schemas';\nexport type {\n SettingsDestination,\n SettingsPlacement,\n SettingsHubConfig,\n} from './core/config/settings-hub.frontend.schemas';\nexport type {\n CommandMenuCommand,\n MenubarLauncherItem,\n SidebarItem,\n SidebarSection,\n} from './core/config/launcher-items.frontend.schemas';\nexport {\n ENGINE_PAGE_METADATA,\n EnginePageRef,\n LauncherItemTargetKind,\n SidebarHomeDisplayMode,\n SidebarResponsivePolicy,\n SidebarSectionBehavior,\n SidebarSectionContentKind,\n SidebarSectionInlineCreate,\n HostedTriggerAppearance,\n} from './core/config/launcher-items.frontend.schemas';\nexport type { AppCompositeViewsConfig } from './core/config/composite-view.schemas';\nexport type { FlowsActorsViewDefinition } from './core/config/flows-actors-view.schemas';\nexport type { FullCustomViewDefinition } from './core/config/full-custom-view.schemas';\nexport type { OnboardingViewDefinition } from './core/config/onboarding-view.frontend.schemas';\nexport {\n FrontendView_ScopeMode,\n} from './core/config/views-frontend.schemas';\nexport {\n BILLING_COMMAND_MENU_ITEM,\n BILLING_SETTINGS_SECTION_REF,\n} from './core/billing/billing-launcher';\nexport type {\n AnyFrontendResourceConfiguration,\n ResourceUIBehavior,\n} from './core/resources/resources.frontend.schemas';\nexport type { FrontendConfigFactory_HomeDefinition } from './core/runtime/app-config-overrides.frontend.definitions';\nexport {\n buildFrontendCompanionResourceUIBehavior,\n} from './core/runtime/frontend-companion-resource-inputs';\nexport type {\n FrontendCompanionExports,\n} from './core/companion/companion-exports.frontend.definitions';\nexport type { FrontendModule } from './core/runtime/domain-module.frontend.definitions';\nexport { defaultTheme } from './core/ui/themes/default.theme';\n\n/*\n * ── Schema-authoring surface consumed by `@wildo-ai/saas-specifications` ────\n *\n * Companion-safe symbols (Zod schemas + framework type aliases, no React /\n * runtime UI deps) re-exported so the spec package can narrow its import\n * surface from the broad `@wildo-ai/saas-frontend-lib` root barrel to this\n * dedicated `/companion` subpath. Adding a symbol to the root barrel that\n * transitively pulls React / runtime UI deps would otherwise silently\n * widen the spec package's dependency footprint (the failure mode the SSO\n * repair documented as residual risk). See\n * `.cursor/plans/non-view-specification-coverage-step9-spec-infrastructure-hardening.md`.\n */\nexport {\n FRONTEND_SCHEMA_KEY,\n} from './core/resources/resources.frontend.schemas';\nexport type {\n LayoutRefManifest,\n ObjectShape,\n ResourceConfigLike,\n ResourceOperationFrontendConfig,\n ResourceUIBehaviorConfig,\n ResourceUIBehavior_EmptyState,\n ResourceUIBehavior_GuidanceFlow,\n} from './core/resources/resources.frontend.schemas';\nexport {\n collectExecutionViewSurfaceRefsByOperation,\n collectOperationLikeViewRefs,\n} from './core/config/execution-view.schemas';\nexport {\n collectFrontendChartRegistrationRefs,\n collectFrontendChartRegistrationRefsFromUIBehavior,\n} from './core/config/chart-view.frontend.schemas';\n"]}
1
+ {"version":3,"file":"companion-exports.js","sourceRoot":"","sources":["../../src/companion-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAQH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,8BAA8B,EAC9B,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,qDAAqD,CAAC;AAEpG;;;;;;;;;GASG;AACH,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAYxF,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,+CAA+C,CAAC;AAKvD,OAAO,EACL,sBAAsB,GACvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EACL,wCAAwC,GACzC,MAAM,mDAAmD,CAAC;AAK3D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,OAAO,EACL,mBAAmB,GACpB,MAAM,6CAA6C,CAAC;AAUrD,OAAO,EACL,0CAA0C,EAC1C,4BAA4B,GAC7B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,oCAAoC,EACpC,kDAAkD,GACnD,MAAM,2CAA2C,CAAC","sourcesContent":["/**\n * Public companion surface for authored frontend configuration and module\n * definitions.\n *\n * Narrow entry point for config files, module definitions, and companion\n * tooling — keeps authored app code off the broad runtime/UI barrel.\n *\n * # Authoring / typing only — no runtime services\n *\n * Symbols in this barrel are companion-safe by construction: zero\n * React, zero `axios`, zero runtime services. Concretely, this means\n * Zod schemas, type aliases, enums, factory builders, and the small\n * handful of pure utilities the spec package + module-definition\n * files need at authoring time.\n *\n * Runtime services a companion subprocess needs to materialise the\n * authored configuration at runtime (HTTP client, repositories,\n * event bus, logger) live in the dedicated `/companion-runtime`\n * subpath (`companion-runtime-exports.ts`) — see that file's\n * top-level JSDoc for the rationale. Mixing the two surfaces would\n * collapse two semantically distinct concepts (authoring vs.\n * subprocess bootstrap) into one, and silently invite future\n * runtime helpers to land here too — exactly the framework-mindset\n * failure mode `design-philosophy.mdc` warns against.\n */\n\nexport type {\n AppConfiguration_Frontend,\n ErrorPageConfig,\n QuickSwitcherScopeField,\n ShellModuleContributions,\n} from './core/config/app-configuration-frontend.schemas';\nexport {\n CommandBarPolicy,\n ErrorPageActionType,\n QuickSwitcherFieldPresentation,\n UserDropdownAvatarDisplay,\n UserDropdownSection,\n} from './core/config/app-configuration-frontend.schemas';\nexport { ApplicationLevelComponentType } from './core/config/app-level-components.frontend.schemas';\n\n/**\n * The settings destination catalog, for companion tooling that has to reason\n * about what an application PLACED.\n *\n * Companion-safe by construction: a pure const array, an enum and interfaces —\n * no React, no axios, no runtime services. Needed here because a placement names\n * only a `destinationRef`; anything that must walk what that destination\n * CONTAINS (its sub-tabs, for label generation) has to resolve the ref against\n * this catalog.\n */\nexport { ENGINE_SETTINGS_DESTINATIONS } from './core/config/engine-settings-destinations';\nexport { SettingsSectionTargetKind } from './core/config/settings-hub.frontend.schemas';\nexport type {\n SettingsDestination,\n SettingsPlacement,\n SettingsHubConfig,\n} from './core/config/settings-hub.frontend.schemas';\nexport type {\n CommandMenuCommand,\n MenubarLauncherItem,\n SidebarItem,\n SidebarSection,\n} from './core/config/launcher-items.frontend.schemas';\nexport {\n ENGINE_PAGE_METADATA,\n EnginePageRef,\n LauncherItemTargetKind,\n SidebarHomeDisplayMode,\n SidebarResponsivePolicy,\n SidebarSectionBehavior,\n SidebarSectionContentKind,\n SidebarSectionInlineCreate,\n HostedTriggerAppearance,\n} from './core/config/launcher-items.frontend.schemas';\nexport type { AppCompositeViewsConfig } from './core/config/composite-view.schemas';\nexport type { FlowsActorsViewDefinition } from './core/config/flows-actors-view.schemas';\nexport type { FullCustomViewDefinition } from './core/config/full-custom-view.schemas';\nexport type { OnboardingViewDefinition } from './core/config/onboarding-view.frontend.schemas';\nexport {\n FrontendView_ScopeMode,\n} from './core/config/views-frontend.schemas';\nexport {\n BILLING_COMMAND_MENU_ITEM,\n BILLING_SETTINGS_SECTION_REF,\n} from './core/billing/billing-launcher';\nexport type {\n AnyFrontendResourceConfiguration,\n ResourceUIBehavior,\n} from './core/resources/resources.frontend.schemas';\nexport type { FrontendConfigFactory_HomeDefinition } from './core/runtime/app-config-overrides.frontend.definitions';\nexport {\n buildFrontendCompanionResourceUIBehavior,\n} from './core/runtime/frontend-companion-resource-inputs';\nexport type {\n FrontendCompanionExports,\n} from './core/companion/companion-exports.frontend.definitions';\nexport type { FrontendModule } from './core/runtime/domain-module.frontend.definitions';\nexport { defaultTheme } from './core/ui/themes/default.theme';\n\n/*\n * ── Schema-authoring surface consumed by `@wildo-ai/saas-specifications` ────\n *\n * Companion-safe symbols (Zod schemas + framework type aliases, no React /\n * runtime UI deps) re-exported so the spec package can narrow its import\n * surface from the broad `@wildo-ai/saas-frontend-lib` root barrel to this\n * dedicated `/companion` subpath. Adding a symbol to the root barrel that\n * transitively pulls React / runtime UI deps would otherwise silently\n * widen the spec package's dependency footprint (the failure mode the SSO\n * repair documented as residual risk). See\n * `.cursor/plans/non-view-specification-coverage-step9-spec-infrastructure-hardening.md`.\n */\nexport {\n FRONTEND_SCHEMA_KEY,\n} from './core/resources/resources.frontend.schemas';\nexport type {\n LayoutRefManifest,\n ObjectShape,\n ResourceConfigLike,\n ResourceOperationFrontendConfig,\n ResourceUIBehaviorConfig,\n ResourceUIBehavior_EmptyState,\n ResourceUIBehavior_GuidanceFlow,\n} from './core/resources/resources.frontend.schemas';\nexport {\n collectExecutionViewSurfaceRefsByOperation,\n collectOperationLikeViewRefs,\n} from './core/config/execution-view.schemas';\nexport {\n collectFrontendChartRegistrationRefs,\n collectFrontendChartRegistrationRefsFromUIBehavior,\n} from './core/config/chart-view.frontend.schemas';\n"]}
@@ -22,7 +22,19 @@ export type AI_ApprovalRequestProps = ComponentProps<"div"> & {
22
22
  */
23
23
  toolName?: string;
24
24
  executionContext?: Record<string, unknown>;
25
- onApprove?: (approvalId: string, comment?: string) => void;
25
+ /**
26
+ * Offer the approver an EDITOR over the proposed arguments (#566) — see the preset implementation
27
+ * for why this is opt-in per surface: turning it on changes what an approval MEANS, from assenting
28
+ * to the agent's call to authoring one.
29
+ *
30
+ * Declared HERE as well as on the preset because this module is the CONTRACT every consumer
31
+ * imports; the preset behind it is reached through the registry. A prop added only to the preset
32
+ * is invisible to callers and rejected by this type — which is exactly what happened while adding
33
+ * it, and is the resolver hop `positive-evidence-must-name-its-target.md` records.
34
+ */
35
+ allowArgumentModification?: boolean;
36
+ /** `modifiedToolArgs` is present only when the approver EDITED the arguments (#566). */
37
+ onApprove?: (approvalId: string, comment?: string, modifiedToolArgs?: Record<string, unknown>) => void;
26
38
  onDeny?: (approvalId: string, comment?: string) => void;
27
39
  onEscalate?: (approvalId: string, comment?: string) => void;
28
40
  isProcessing?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../../../../src/components/ai-elements/decision/approval.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AACvH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAI3C,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC5D,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,MAAM,CAAA;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAA;IAClD,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC1C,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1D,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACvD,UAAU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,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAkD;IAC/H,MAAM,SAAS,GAAG,uBAAuB,CAA0B,qBAAqB,CAAC,6BAA6B,EAAE,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA;IACrJ,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAoD;IACnI,MAAM,SAAS,GAAG,uBAAuB,CAA4B,qBAAqB,CAAC,gCAAgC,EAAE,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;IAC5J,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACjC,CAAC","sourcesContent":["import React from 'react'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport type { ComponentProps } from 'react'\n\n// --- Contracts ---\n\nexport type AI_ApprovalRequestProps = ComponentProps<\"div\"> & {\n approvalId: string\n actionDescription: string\n /**\n * OPTIONAL, because nothing populates it — see the preset implementation's note. Absent means no\n * risk badge; a default would assert a severity nobody declared (#528).\n */\n riskLevel?: \"low\" | \"medium\" | \"high\" | \"critical\"\n executionId: string\n systemRef?: string\n expiresAt?: Date\n requiredRoles?: string[]\n /**\n * The gated tool call, and the arguments proposed for it.\n *\n * `toolName` is an IDENTIFIER, rendered as authored — it is the thing the agent asked to run,\n * and humanizing it here would invent display text no i18n tree owns.\n * `executionContext` carries the arguments (#455).\n */\n toolName?: string\n executionContext?: Record<string, unknown>\n onApprove?: (approvalId: string, comment?: string) => void\n onDeny?: (approvalId: string, comment?: string) => void\n onEscalate?: (approvalId: string, comment?: string) => void\n isProcessing?: boolean\n createdAt?: Date\n}\n\nexport type AI_ApprovalQueueItem = {\n approvalId: string\n executionId: string\n systemRef: string\n actionDescription: string\n /** OPTIONAL for the same reason as on a single request — nothing populates it (#528). */\n riskLevel?: \"low\" | \"medium\" | \"high\" | \"critical\"\n expiresAt?: Date\n requiredRoles?: string[]\n executionContext?: Record<string, unknown>\n createdAt?: Date\n}\n\nexport type AI_ApprovalQueueProps = ComponentProps<\"div\"> & {\n items: AI_ApprovalQueueItem[]\n onApprove?: (approvalId: string, comment?: string) => void\n onDeny?: (approvalId: string, comment?: string) => void\n onEscalate?: (approvalId: string, comment?: string) => void\n processingIds?: Set<string>\n filter?: string\n onFilterChange?: (filter: string) => void\n}\n\nexport type AI_DecisionOption = {\n id: string\n label: string\n description?: string\n variant?: \"default\" | \"destructive\" | \"outline\"\n}\n\nexport type AI_DecisionRequestProps = Omit<ComponentProps<\"div\">, \"onSelect\"> & {\n decisionId: string\n title: string\n description: string\n options: AI_DecisionOption[]\n riskLevel?: string\n deadline?: string\n undoGracePeriodMs?: number\n onSelect?: (decisionId: string, optionId: string) => void\n}\n\nexport type AI_HumanInputRequestProps = Omit<ComponentProps<\"div\">, \"onSubmit\"> & {\n requestId: string\n prompt: string\n inputType?: \"text\" | \"textarea\"\n placeholder?: string\n maxLength?: number\n deadline?: string\n onSubmit?: (requestId: string, value: string) => void\n}\n\n// --- Wrappers ---\n\nexport function AI_ApprovalRequest({ preset = CorePresetNames.DEFAULT, ...props }: AI_ApprovalRequestProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<AI_ApprovalRequestProps>(FrontendComponentType.LOW_LEVEL_AI_APPROVAL_REQUEST, 'AI_ApprovalRequest')(preset)\n return <Component {...props} />\n}\n\nexport function AI_ApprovalQueue({ preset = CorePresetNames.DEFAULT, ...props }: AI_ApprovalQueueProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<AI_ApprovalQueueProps>(FrontendComponentType.LOW_LEVEL_AI_APPROVAL_QUEUE, 'AI_ApprovalQueue')(preset)\n return <Component {...props} />\n}\n\nexport function AI_DecisionRequest({ preset = CorePresetNames.DEFAULT, ...props }: AI_DecisionRequestProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<AI_DecisionRequestProps>(FrontendComponentType.LOW_LEVEL_AI_DECISION_REQUEST, 'AI_DecisionRequest')(preset)\n return <Component {...props} />\n}\n\nexport function AI_HumanInputRequest({ preset = CorePresetNames.DEFAULT, ...props }: AI_HumanInputRequestProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<AI_HumanInputRequestProps>(FrontendComponentType.LOW_LEVEL_AI_HUMAN_INPUT_REQUEST, 'AI_HumanInputRequest')(preset)\n return <Component {...props} />\n}\n"]}
1
+ {"version":3,"file":"approval.js","sourceRoot":"","sources":["../../../../../src/components/ai-elements/decision/approval.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAA;AAiGzH,mBAAmB;AAEnB,MAAM,UAAU,kBAAkB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAkD;IAC/H,MAAM,SAAS,GAAG,uBAAuB,CAA0B,qBAAqB,CAAC,6BAA6B,EAAE,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA;IACrJ,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAgD;IAC3H,MAAM,SAAS,GAAG,uBAAuB,CAAwB,qBAAqB,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA;IAC/I,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAkD;IAC/H,MAAM,SAAS,GAAG,uBAAuB,CAA0B,qBAAqB,CAAC,6BAA6B,EAAE,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA;IACrJ,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAoD;IACnI,MAAM,SAAS,GAAG,uBAAuB,CAA4B,qBAAqB,CAAC,gCAAgC,EAAE,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;IAC5J,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACjC,CAAC","sourcesContent":["import React from 'react'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport type { ComponentProps } from 'react'\n\n// --- Contracts ---\n\nexport type AI_ApprovalRequestProps = ComponentProps<\"div\"> & {\n approvalId: string\n actionDescription: string\n /**\n * OPTIONAL, because nothing populates it — see the preset implementation's note. Absent means no\n * risk badge; a default would assert a severity nobody declared (#528).\n */\n riskLevel?: \"low\" | \"medium\" | \"high\" | \"critical\"\n executionId: string\n systemRef?: string\n expiresAt?: Date\n requiredRoles?: string[]\n /**\n * The gated tool call, and the arguments proposed for it.\n *\n * `toolName` is an IDENTIFIER, rendered as authored — it is the thing the agent asked to run,\n * and humanizing it here would invent display text no i18n tree owns.\n * `executionContext` carries the arguments (#455).\n */\n toolName?: string\n executionContext?: Record<string, unknown>\n /**\n * Offer the approver an EDITOR over the proposed arguments (#566) — see the preset implementation\n * for why this is opt-in per surface: turning it on changes what an approval MEANS, from assenting\n * to the agent's call to authoring one.\n *\n * Declared HERE as well as on the preset because this module is the CONTRACT every consumer\n * imports; the preset behind it is reached through the registry. A prop added only to the preset\n * is invisible to callers and rejected by this type — which is exactly what happened while adding\n * it, and is the resolver hop `positive-evidence-must-name-its-target.md` records.\n */\n allowArgumentModification?: boolean\n /** `modifiedToolArgs` is present only when the approver EDITED the arguments (#566). */\n onApprove?: (approvalId: string, comment?: string, modifiedToolArgs?: Record<string, unknown>) => void\n onDeny?: (approvalId: string, comment?: string) => void\n onEscalate?: (approvalId: string, comment?: string) => void\n isProcessing?: boolean\n createdAt?: Date\n}\n\nexport type AI_ApprovalQueueItem = {\n approvalId: string\n executionId: string\n systemRef: string\n actionDescription: string\n /** OPTIONAL for the same reason as on a single request — nothing populates it (#528). */\n riskLevel?: \"low\" | \"medium\" | \"high\" | \"critical\"\n expiresAt?: Date\n requiredRoles?: string[]\n executionContext?: Record<string, unknown>\n createdAt?: Date\n}\n\nexport type AI_ApprovalQueueProps = ComponentProps<\"div\"> & {\n items: AI_ApprovalQueueItem[]\n onApprove?: (approvalId: string, comment?: string) => void\n onDeny?: (approvalId: string, comment?: string) => void\n onEscalate?: (approvalId: string, comment?: string) => void\n processingIds?: Set<string>\n filter?: string\n onFilterChange?: (filter: string) => void\n}\n\nexport type AI_DecisionOption = {\n id: string\n label: string\n description?: string\n variant?: \"default\" | \"destructive\" | \"outline\"\n}\n\nexport type AI_DecisionRequestProps = Omit<ComponentProps<\"div\">, \"onSelect\"> & {\n decisionId: string\n title: string\n description: string\n options: AI_DecisionOption[]\n riskLevel?: string\n deadline?: string\n undoGracePeriodMs?: number\n onSelect?: (decisionId: string, optionId: string) => void\n}\n\nexport type AI_HumanInputRequestProps = Omit<ComponentProps<\"div\">, \"onSubmit\"> & {\n requestId: string\n prompt: string\n inputType?: \"text\" | \"textarea\"\n placeholder?: string\n maxLength?: number\n deadline?: string\n onSubmit?: (requestId: string, value: string) => void\n}\n\n// --- Wrappers ---\n\nexport function AI_ApprovalRequest({ preset = CorePresetNames.DEFAULT, ...props }: AI_ApprovalRequestProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<AI_ApprovalRequestProps>(FrontendComponentType.LOW_LEVEL_AI_APPROVAL_REQUEST, 'AI_ApprovalRequest')(preset)\n return <Component {...props} />\n}\n\nexport function AI_ApprovalQueue({ preset = CorePresetNames.DEFAULT, ...props }: AI_ApprovalQueueProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<AI_ApprovalQueueProps>(FrontendComponentType.LOW_LEVEL_AI_APPROVAL_QUEUE, 'AI_ApprovalQueue')(preset)\n return <Component {...props} />\n}\n\nexport function AI_DecisionRequest({ preset = CorePresetNames.DEFAULT, ...props }: AI_DecisionRequestProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<AI_DecisionRequestProps>(FrontendComponentType.LOW_LEVEL_AI_DECISION_REQUEST, 'AI_DecisionRequest')(preset)\n return <Component {...props} />\n}\n\nexport function AI_HumanInputRequest({ preset = CorePresetNames.DEFAULT, ...props }: AI_HumanInputRequestProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<AI_HumanInputRequestProps>(FrontendComponentType.LOW_LEVEL_AI_HUMAN_INPUT_REQUEST, 'AI_HumanInputRequest')(preset)\n return <Component {...props} />\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../../../src/components/flows-actors/approval.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAML,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC/B,MAAM,8DAA8D,CAAC;AAuBtE,MAAM,MAAM,gCAAgC,GAAG,IAAI,CACjD,uBAAuB,EACvB,YAAY,GAAG,mBAAmB,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,YAAY,CACzF,GAAG;IACF,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,EAC1C,WAAW,EACX,GAAG,KAAK,EACT,EAAE,gCAAgC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAqD7D;AASD,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,qBAAqB,EACrB,OAAO,GAAG,WAAW,GAAG,QAAQ,GAAG,YAAY,GAAG,eAAe,CAClE,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAuDlG;AASD,MAAM,MAAM,gCAAgC,GAAG,IAAI,CACjD,uBAAuB,EACvB,UAAU,CACX,GAAG;IACF,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,EAC1C,WAAW,EACX,GAAG,KAAK,EACT,EAAE,gCAAgC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAatD;AASD,MAAM,MAAM,kCAAkC,GAAG,IAAI,CACnD,yBAAyB,EACzB,UAAU,CACX,GAAG;IACF,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAgB,6BAA6B,CAAC,EAC5C,WAAW,EACX,GAAG,KAAK,EACT,EAAE,kCAAkC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAaxD"}
1
+ {"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../../../src/components/flows-actors/approval.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAML,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC/B,MAAM,8DAA8D,CAAC;AAuBtE,MAAM,MAAM,gCAAgC,GAAG,IAAI,CACjD,uBAAuB,EACvB,YAAY,GAAG,mBAAmB,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,YAAY,CACzF,GAAG;IACF,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,EAC1C,WAAW,EACX,GAAG,KAAK,EACT,EAAE,gCAAgC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA2D7D;AASD,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,qBAAqB,EACrB,OAAO,GAAG,WAAW,GAAG,QAAQ,GAAG,YAAY,GAAG,eAAe,CAClE,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAuDlG;AASD,MAAM,MAAM,gCAAgC,GAAG,IAAI,CACjD,uBAAuB,EACvB,UAAU,CACX,GAAG;IACF,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,EAC1C,WAAW,EACX,GAAG,KAAK,EACT,EAAE,gCAAgC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAatD;AASD,MAAM,MAAM,kCAAkC,GAAG,IAAI,CACnD,yBAAyB,EACzB,UAAU,CACX,GAAG;IACF,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAgB,6BAA6B,CAAC,EAC5C,WAAW,EACX,GAAG,KAAK,EACT,EAAE,kCAAkC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAaxD"}
@@ -11,9 +11,9 @@ export function FlowsActors_ApprovalRequest({ executionId, ...props }) {
11
11
  if (!execution?.pendingApproval)
12
12
  return null;
13
13
  const { approvalId, actionDescription, riskLevel, expiresAt, requiredRoles, toolName, toolArgs } = execution.pendingApproval;
14
- const handleApprove = React.useCallback((id, comment) => {
14
+ const handleApprove = React.useCallback((id, comment, modifiedToolArgs) => {
15
15
  setProcessingId(id);
16
- respondToApproval(executionId, id, true, comment);
16
+ respondToApproval(executionId, id, true, comment, modifiedToolArgs);
17
17
  }, [executionId, respondToApproval]);
18
18
  const handleDeny = React.useCallback((id, comment) => {
19
19
  setProcessingId(id);
@@ -30,12 +30,17 @@ export function FlowsActors_ApprovalRequest({ executionId, ...props }) {
30
30
  * a specific new title, and an approval surface that hides them is asking for a signature on an
31
31
  * unread document.
32
32
  *
33
- * They are DISPLAYED, never edited. The response payload carries `approved` plus a free-text
34
- * comment and has no field for modified arguments, so an editable form would collect changes
35
- * the protocol then drops — the worst of the three options, because it looks like it worked.
36
- * Approving-with-modifications is a protocol change and belongs to its own decision.
33
+ * They were DISPLAYED and never edited, because the response payload had no field to carry a
34
+ * modification and an editable form would have collected changes the protocol then dropped.
35
+ * #566 built the carrier: the payload takes `modifiedToolArgs`, the server re-validates them
36
+ * against the tool's own `inputSchema`, re-signs the approval over them and records on the
37
+ * audit trail that what executed was not what was proposed. So the editor is offered here.
38
+ *
39
+ * `allowArgumentModification` is not defaulted by the preset and IS defaulted on by this
40
+ * wrapper: the preset cannot know whether its decision path carries the result, whereas this
41
+ * one is the path, and it does. A caller who wants a read-only surface passes `false`.
37
42
  */
38
- toolName: toolName, executionContext: toolArgs, onApprove: handleApprove, onDeny: handleDeny, onEscalate: handleEscalate, isProcessing: processingId === approvalId, ...props }));
43
+ allowArgumentModification: true, toolName: toolName, executionContext: toolArgs, onApprove: handleApprove, onDeny: handleDeny, onEscalate: handleEscalate, isProcessing: processingId === approvalId, ...props }));
39
44
  }
40
45
  export function FlowsActors_ApprovalQueue(props) {
41
46
  const { executions, respondToApproval } = useFlowsActors();
@@ -1 +1 @@
1
- {"version":3,"file":"approval.js","sourceRoot":"","sources":["../../../../src/components/flows-actors/approval.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GAMrB,MAAM,8DAA8D,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAA6B,MAAM,0DAA0D,CAAC;AA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,GACtB,CACH,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n AI_ApprovalRequest,\n AI_ApprovalQueue,\n AI_DecisionRequest,\n AI_HumanInputRequest,\n type AI_ApprovalQueueItem,\n type AI_ApprovalRequestProps,\n type AI_ApprovalQueueProps,\n type AI_DecisionRequestProps,\n type AI_HumanInputRequestProps,\n} from \"~wildo-frontend-lib/components/ai-elements/decision/approval\";\nimport { useFlowsActors } from \"~wildo-frontend-lib/core/flows-actors/useFlowsActors\";\nimport { FlowsActorsExecutionStatus, type FlowsActorsExecution } from \"~wildo-frontend-lib/core/flows-actors/FlowsActorsContext\";\nimport type { ComponentProps } from \"react\";\nimport { FrontendComponentType } from \"@wildo-ai/presets-components-models\"\n\n//===============================================================\n// Flows-Actors Approval Wrappers\n//\n// Thin context-wired wrappers that:\n// 1. Import generic preset components (AI_ApprovalRequest, etc.)\n// 2. Inject useFlowsActors() to get executions + respondToApproval()\n// 3. Aggregate pending approvals across all executions into the queue\n// 4. Wire onApprove/onDeny/onEscalate callbacks to respondToApproval()\n//===============================================================\n\n//===============================================================\n// FlowsActors_ApprovalRequest\n//\n// Wraps AI_ApprovalRequest with context-wired callbacks.\n// Accepts executionId — pulls pendingApproval from context.\n//===============================================================\n\nexport type FlowsActors_ApprovalRequestProps = Omit<\n AI_ApprovalRequestProps,\n \"approvalId\" | \"actionDescription\" | \"riskLevel\" | \"onApprove\" | \"onDeny\" | \"onEscalate\"\n> & {\n executionId: string;\n};\n\nexport function FlowsActors_ApprovalRequest({\n executionId,\n ...props\n}: FlowsActors_ApprovalRequestProps): React.JSX.Element | null {\n const { executions, respondToApproval } = useFlowsActors();\n const [processingId, setProcessingId] = React.useState<string | null>(null);\n const execution = executions.get(executionId);\n\n if (!execution?.pendingApproval) return null;\n\n const { approvalId, actionDescription, riskLevel, expiresAt, requiredRoles, toolName, toolArgs } = execution.pendingApproval;\n\n const handleApprove = React.useCallback((id: string, comment?: string) => {\n setProcessingId(id);\n respondToApproval(executionId, id, true, comment);\n }, [executionId, respondToApproval]);\n\n const handleDeny = React.useCallback((id: string, comment?: string) => {\n setProcessingId(id);\n respondToApproval(executionId, id, false, comment);\n }, [executionId, respondToApproval]);\n\n const handleEscalate = React.useCallback((id: string, comment?: string) => {\n setProcessingId(id);\n respondToApproval(executionId, id, false, `[ESCALATED] ${comment ?? \"\"}`);\n }, [executionId, respondToApproval]);\n\n return (\n <AI_ApprovalRequest\n approvalId={approvalId}\n actionDescription={actionDescription}\n riskLevel={riskLevel}\n executionId={executionId}\n systemRef={execution.systemRef}\n expiresAt={expiresAt}\n requiredRoles={requiredRoles}\n /*\n * The tool call is WHAT is being approved, and until #528 it did not reach the browser at all.\n * `toolArgs` are the proposed arguments — a person approving \"rename this record\" is approving\n * a specific new title, and an approval surface that hides them is asking for a signature on an\n * unread document.\n *\n * They are DISPLAYED, never edited. The response payload carries `approved` plus a free-text\n * comment and has no field for modified arguments, so an editable form would collect changes\n * the protocol then drops — the worst of the three options, because it looks like it worked.\n * Approving-with-modifications is a protocol change and belongs to its own decision.\n */\n toolName={toolName}\n executionContext={toolArgs}\n onApprove={handleApprove}\n onDeny={handleDeny}\n onEscalate={handleEscalate}\n isProcessing={processingId === approvalId}\n {...props}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_ApprovalQueue\n//\n// Aggregates all pending approvals from all active executions\n// into a single queue. Auto-refreshes via WebSocket events.\n//===============================================================\n\nexport type FlowsActors_ApprovalQueueProps = Omit<\n AI_ApprovalQueueProps,\n \"items\" | \"onApprove\" | \"onDeny\" | \"onEscalate\" | \"processingIds\"\n>;\n\nexport function FlowsActors_ApprovalQueue(props: FlowsActors_ApprovalQueueProps): React.JSX.Element {\n const { executions, respondToApproval } = useFlowsActors();\n const [processingIds, setProcessingIds] = React.useState<Set<string>>(new Set());\n\n const items: AI_ApprovalQueueItem[] = React.useMemo(() => {\n const result: AI_ApprovalQueueItem[] = [];\n executions.forEach((execution) => {\n if (\n execution.status === FlowsActorsExecutionStatus.AWAITING_APPROVAL &&\n execution.pendingApproval\n ) {\n result.push({\n approvalId: execution.pendingApproval.approvalId,\n executionId: execution.executionId,\n systemRef: execution.systemRef,\n actionDescription: execution.pendingApproval.actionDescription,\n riskLevel: execution.pendingApproval.riskLevel,\n expiresAt: execution.pendingApproval.expiresAt,\n requiredRoles: execution.pendingApproval.requiredRoles,\n });\n }\n });\n return result;\n }, [executions]);\n\n const respond = React.useCallback((approvalId: string, approved: boolean, comment?: string) => {\n const item = items.find((i) => i.approvalId === approvalId);\n if (!item) return;\n\n setProcessingIds((prev) => new Set(prev).add(approvalId));\n respondToApproval(item.executionId, approvalId, approved, comment);\n }, [items, respondToApproval]);\n\n const handleApprove = React.useCallback((approvalId: string, comment?: string) => {\n respond(approvalId, true, comment);\n }, [respond]);\n\n const handleDeny = React.useCallback((approvalId: string, comment?: string) => {\n respond(approvalId, false, comment);\n }, [respond]);\n\n const handleEscalate = React.useCallback((approvalId: string, comment?: string) => {\n respond(approvalId, false, `[ESCALATED] ${comment ?? \"\"}`);\n }, [respond]);\n\n return (\n <AI_ApprovalQueue\n items={items}\n onApprove={handleApprove}\n onDeny={handleDeny}\n onEscalate={handleEscalate}\n processingIds={processingIds}\n {...props}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_DecisionRequest\n//\n// Wraps AI_DecisionRequest — selection is forwarded to\n// respondToApproval() using the optionId as the comment.\n//===============================================================\n\nexport type FlowsActors_DecisionRequestProps = Omit<\n AI_DecisionRequestProps,\n \"onSelect\"\n> & {\n executionId: string;\n};\n\nexport function FlowsActors_DecisionRequest({\n executionId,\n ...props\n}: FlowsActors_DecisionRequestProps): React.JSX.Element {\n const { respondToApproval } = useFlowsActors();\n\n const handleSelect = React.useCallback((decisionId: string, optionId: string) => {\n respondToApproval(executionId, decisionId, true, `[DECISION] ${optionId}`);\n }, [executionId, respondToApproval]);\n\n return (\n <AI_DecisionRequest\n {...props}\n onSelect={handleSelect}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_HumanInputRequest\n//\n// Wraps AI_HumanInputRequest — submitted value is forwarded to\n// respondToApproval() as the comment.\n//===============================================================\n\nexport type FlowsActors_HumanInputRequestProps = Omit<\n AI_HumanInputRequestProps,\n \"onSubmit\"\n> & {\n executionId: string;\n};\n\nexport function FlowsActors_HumanInputRequest({\n executionId,\n ...props\n}: FlowsActors_HumanInputRequestProps): React.JSX.Element {\n const { respondToApproval } = useFlowsActors();\n\n const handleSubmit = React.useCallback((requestId: string, value: string) => {\n respondToApproval(executionId, requestId, true, `[INPUT] ${value}`);\n }, [executionId, respondToApproval]);\n\n return (\n <AI_HumanInputRequest\n {...props}\n onSubmit={handleSubmit}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"approval.js","sourceRoot":"","sources":["../../../../src/components/flows-actors/approval.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GAMrB,MAAM,8DAA8D,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAA6B,MAAM,0DAA0D,CAAC;AA4BjI,MAAM,UAAU,2BAA2B,CAAC,EAC1C,WAAW,EACX,GAAG,KAAK,EACyB;IACjC,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,cAAc,EAAE,CAAC;IAC3D,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAC5E,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAE9C,IAAI,CAAC,SAAS,EAAE,eAAe;QAAE,OAAO,IAAI,CAAC;IAE7C,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,QAA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G,KAAK,EACyB;IACjC,MAAM,EAAE,iBAAiB,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/C,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,UAAkB,EAAE,QAAgB,EAAE,EAAE;QAC9E,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,cAAc,QAAQ,EAAE,CAAC,CAAC;IAC7E,CAAC,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAErC,OAAO,CACL,KAAC,kBAAkB,OACb,KAAK,EACT,QAAQ,EAAE,YAAY,GACtB,CACH,CAAC;AACJ,CAAC;AAgBD,MAAM,UAAU,6BAA6B,CAAC,EAC5C,WAAW,EACX,GAAG,KAAK,EAC2B;IACnC,MAAM,EAAE,iBAAiB,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/C,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,SAAiB,EAAE,KAAa,EAAE,EAAE;QAC1E,iBAAiB,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,KAAK,EAAE,CAAC,CAAC;IACtE,CAAC,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAErC,OAAO,CACL,KAAC,oBAAoB,OACf,KAAK,EACT,QAAQ,EAAE,YAAY,GACtB,CACH,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n AI_ApprovalRequest,\n AI_ApprovalQueue,\n AI_DecisionRequest,\n AI_HumanInputRequest,\n type AI_ApprovalQueueItem,\n type AI_ApprovalRequestProps,\n type AI_ApprovalQueueProps,\n type AI_DecisionRequestProps,\n type AI_HumanInputRequestProps,\n} from \"~wildo-frontend-lib/components/ai-elements/decision/approval\";\nimport { useFlowsActors } from \"~wildo-frontend-lib/core/flows-actors/useFlowsActors\";\nimport { FlowsActorsExecutionStatus, type FlowsActorsExecution } from \"~wildo-frontend-lib/core/flows-actors/FlowsActorsContext\";\nimport type { ComponentProps } from \"react\";\nimport { FrontendComponentType } from \"@wildo-ai/presets-components-models\"\n\n//===============================================================\n// Flows-Actors Approval Wrappers\n//\n// Thin context-wired wrappers that:\n// 1. Import generic preset components (AI_ApprovalRequest, etc.)\n// 2. Inject useFlowsActors() to get executions + respondToApproval()\n// 3. Aggregate pending approvals across all executions into the queue\n// 4. Wire onApprove/onDeny/onEscalate callbacks to respondToApproval()\n//===============================================================\n\n//===============================================================\n// FlowsActors_ApprovalRequest\n//\n// Wraps AI_ApprovalRequest with context-wired callbacks.\n// Accepts executionId — pulls pendingApproval from context.\n//===============================================================\n\nexport type FlowsActors_ApprovalRequestProps = Omit<\n AI_ApprovalRequestProps,\n \"approvalId\" | \"actionDescription\" | \"riskLevel\" | \"onApprove\" | \"onDeny\" | \"onEscalate\"\n> & {\n executionId: string;\n};\n\nexport function FlowsActors_ApprovalRequest({\n executionId,\n ...props\n}: FlowsActors_ApprovalRequestProps): React.JSX.Element | null {\n const { executions, respondToApproval } = useFlowsActors();\n const [processingId, setProcessingId] = React.useState<string | null>(null);\n const execution = executions.get(executionId);\n\n if (!execution?.pendingApproval) return null;\n\n const { approvalId, actionDescription, riskLevel, expiresAt, requiredRoles, toolName, toolArgs } = execution.pendingApproval;\n\n const handleApprove = React.useCallback((id: string, comment?: string, modifiedToolArgs?: Record<string, unknown>) => {\n setProcessingId(id);\n respondToApproval(executionId, id, true, comment, modifiedToolArgs);\n }, [executionId, respondToApproval]);\n\n const handleDeny = React.useCallback((id: string, comment?: string) => {\n setProcessingId(id);\n respondToApproval(executionId, id, false, comment);\n }, [executionId, respondToApproval]);\n\n const handleEscalate = React.useCallback((id: string, comment?: string) => {\n setProcessingId(id);\n respondToApproval(executionId, id, false, `[ESCALATED] ${comment ?? \"\"}`);\n }, [executionId, respondToApproval]);\n\n return (\n <AI_ApprovalRequest\n approvalId={approvalId}\n actionDescription={actionDescription}\n riskLevel={riskLevel}\n executionId={executionId}\n systemRef={execution.systemRef}\n expiresAt={expiresAt}\n requiredRoles={requiredRoles}\n /*\n * The tool call is WHAT is being approved, and until #528 it did not reach the browser at all.\n * `toolArgs` are the proposed arguments — a person approving \"rename this record\" is approving\n * a specific new title, and an approval surface that hides them is asking for a signature on an\n * unread document.\n *\n * They were DISPLAYED and never edited, because the response payload had no field to carry a\n * modification and an editable form would have collected changes the protocol then dropped.\n * #566 built the carrier: the payload takes `modifiedToolArgs`, the server re-validates them\n * against the tool's own `inputSchema`, re-signs the approval over them and records on the\n * audit trail that what executed was not what was proposed. So the editor is offered here.\n *\n * `allowArgumentModification` is not defaulted by the preset and IS defaulted on by this\n * wrapper: the preset cannot know whether its decision path carries the result, whereas this\n * one is the path, and it does. A caller who wants a read-only surface passes `false`.\n */\n allowArgumentModification\n toolName={toolName}\n executionContext={toolArgs}\n onApprove={handleApprove}\n onDeny={handleDeny}\n onEscalate={handleEscalate}\n isProcessing={processingId === approvalId}\n {...props}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_ApprovalQueue\n//\n// Aggregates all pending approvals from all active executions\n// into a single queue. Auto-refreshes via WebSocket events.\n//===============================================================\n\nexport type FlowsActors_ApprovalQueueProps = Omit<\n AI_ApprovalQueueProps,\n \"items\" | \"onApprove\" | \"onDeny\" | \"onEscalate\" | \"processingIds\"\n>;\n\nexport function FlowsActors_ApprovalQueue(props: FlowsActors_ApprovalQueueProps): React.JSX.Element {\n const { executions, respondToApproval } = useFlowsActors();\n const [processingIds, setProcessingIds] = React.useState<Set<string>>(new Set());\n\n const items: AI_ApprovalQueueItem[] = React.useMemo(() => {\n const result: AI_ApprovalQueueItem[] = [];\n executions.forEach((execution) => {\n if (\n execution.status === FlowsActorsExecutionStatus.AWAITING_APPROVAL &&\n execution.pendingApproval\n ) {\n result.push({\n approvalId: execution.pendingApproval.approvalId,\n executionId: execution.executionId,\n systemRef: execution.systemRef,\n actionDescription: execution.pendingApproval.actionDescription,\n riskLevel: execution.pendingApproval.riskLevel,\n expiresAt: execution.pendingApproval.expiresAt,\n requiredRoles: execution.pendingApproval.requiredRoles,\n });\n }\n });\n return result;\n }, [executions]);\n\n const respond = React.useCallback((approvalId: string, approved: boolean, comment?: string) => {\n const item = items.find((i) => i.approvalId === approvalId);\n if (!item) return;\n\n setProcessingIds((prev) => new Set(prev).add(approvalId));\n respondToApproval(item.executionId, approvalId, approved, comment);\n }, [items, respondToApproval]);\n\n const handleApprove = React.useCallback((approvalId: string, comment?: string) => {\n respond(approvalId, true, comment);\n }, [respond]);\n\n const handleDeny = React.useCallback((approvalId: string, comment?: string) => {\n respond(approvalId, false, comment);\n }, [respond]);\n\n const handleEscalate = React.useCallback((approvalId: string, comment?: string) => {\n respond(approvalId, false, `[ESCALATED] ${comment ?? \"\"}`);\n }, [respond]);\n\n return (\n <AI_ApprovalQueue\n items={items}\n onApprove={handleApprove}\n onDeny={handleDeny}\n onEscalate={handleEscalate}\n processingIds={processingIds}\n {...props}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_DecisionRequest\n//\n// Wraps AI_DecisionRequest — selection is forwarded to\n// respondToApproval() using the optionId as the comment.\n//===============================================================\n\nexport type FlowsActors_DecisionRequestProps = Omit<\n AI_DecisionRequestProps,\n \"onSelect\"\n> & {\n executionId: string;\n};\n\nexport function FlowsActors_DecisionRequest({\n executionId,\n ...props\n}: FlowsActors_DecisionRequestProps): React.JSX.Element {\n const { respondToApproval } = useFlowsActors();\n\n const handleSelect = React.useCallback((decisionId: string, optionId: string) => {\n respondToApproval(executionId, decisionId, true, `[DECISION] ${optionId}`);\n }, [executionId, respondToApproval]);\n\n return (\n <AI_DecisionRequest\n {...props}\n onSelect={handleSelect}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_HumanInputRequest\n//\n// Wraps AI_HumanInputRequest — submitted value is forwarded to\n// respondToApproval() as the comment.\n//===============================================================\n\nexport type FlowsActors_HumanInputRequestProps = Omit<\n AI_HumanInputRequestProps,\n \"onSubmit\"\n> & {\n executionId: string;\n};\n\nexport function FlowsActors_HumanInputRequest({\n executionId,\n ...props\n}: FlowsActors_HumanInputRequestProps): React.JSX.Element {\n const { respondToApproval } = useFlowsActors();\n\n const handleSubmit = React.useCallback((requestId: string, value: string) => {\n respondToApproval(executionId, requestId, true, `[INPUT] ${value}`);\n }, [executionId, respondToApproval]);\n\n return (\n <AI_HumanInputRequest\n {...props}\n onSubmit={handleSubmit}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"approval.labels.d.ts","sourceRoot":"","sources":["../../../../src/components/flows-actors/approval.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,mBAAmB,EAA2B,MAAM,qCAAqC,CAAC;AAM1I,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,EA+CzD,CAAC"}
1
+ {"version":3,"file":"approval.labels.d.ts","sourceRoot":"","sources":["../../../../src/components/flows-actors/approval.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,mBAAmB,EAA2B,MAAM,qCAAqC,CAAC;AAM1I,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,EAkDzD,CAAC"}
@@ -18,6 +18,9 @@ export const LowLevelAiApprovalLabels = [
18
18
  { ref: 'context', kind: LabelKind.LABEL, purpose: 'Label for the contextual details of the request' },
19
19
  { ref: 'toolCall', kind: LabelKind.LABEL, purpose: 'Label preceding the name of the tool call awaiting approval' },
20
20
  { ref: 'toolArguments', kind: LabelKind.LABEL, purpose: 'Label for the arguments proposed for the tool call awaiting approval' },
21
+ { ref: 'editArguments', kind: LabelKind.BUTTON, purpose: 'Button opening an editor over the proposed tool arguments so the approver can change them before approving' },
22
+ { ref: 'discardArgumentEdits', kind: LabelKind.BUTTON, purpose: 'Button closing the argument editor and returning to the arguments the agent proposed' },
23
+ { ref: 'argumentsNotValidJson', kind: LabelKind.MESSAGE, purpose: 'Shown when the edited tool arguments are not a valid JSON object, so the approval cannot be submitted' },
21
24
  { ref: 'confirmTitle', kind: LabelKind.HEADING, purpose: 'Heading of the approval confirmation dialog' },
22
25
  { ref: 'confirmDescription', kind: LabelKind.DESCRIPTION, purpose: 'Body text of the approval confirmation dialog' },
23
26
  { ref: 'confirmCancel', kind: LabelKind.BUTTON, purpose: 'Button to dismiss the confirmation dialog without acting' },
@@ -1 +1 @@
1
- {"version":3,"file":"approval.labels.js","sourceRoot":"","sources":["../../../../src/components/flows-actors/approval.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAA4B,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE1I,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAE/E,MAAM,CAAC,MAAM,wBAAwB,GAA0B;IAC7D,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,uCAAuC,EAAE;IAC5F,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,oCAAoC,EAAE;IACtF,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,qDAAqD,EAAE;IAC3G,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,gCAAgC,EAAE;IACzF,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,4CAA4C,EAAE;IAClG,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,+CAA+C,EAAE;IACxG,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,6CAA6C,EAAE;IACpG,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,iDAAiD,EAAE;IAC5G,EAAE,GAAG,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AC,WAAW,EAAE,OAAO,EAAE,wDAAwD,EAAE;IACrH,EAAE,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,8CAA8C,EAAE;IACxG;QACE,GAAG,EAAE,kBAAkB;QACvB,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,4DAA4D;QACrE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,uCAAuC,EAAE,CAAC;KAC5E;IACD;QACE,GAAG,EAAE,gBAAgB;QACrB,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,6CAA6C;QACtD,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;KACjE;IACD;QACE,GAAG,EAAE,gBAAgB;QACrB,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,6CAA6C;QACtD,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;KACjE;IACD;QACE,GAAG,EAAE,cAAc;QACnB,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,2CAA2C;QACpD,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC;KAC/D;CACF,CAAC;AACF,uBAAuB,CAAC,qBAAqB,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { FrontendComponentType, LabelKind, type LabellingUnitaryDef, registerComponentLabels } from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for this component: keys + params + (where\n// authored) per-key purpose / kind / variable meaning. Statically scanned by\n// the dev companion; NOT imported at runtime, so it never ships in the bundle.\n\nexport const LowLevelAiApprovalLabels: LabellingUnitaryDef[] = [\n { ref: 'approve', kind: LabelKind.BUTTON, purpose: 'Button to approve the pending request' },\n { ref: 'deny', kind: LabelKind.BUTTON, purpose: 'Button to deny the pending request' },\n { ref: 'escalate', kind: LabelKind.BUTTON, purpose: 'Button to escalate the request to a higher approver' },\n { ref: 'queueTitle', kind: LabelKind.HEADING, purpose: 'Heading for the approval queue' },\n { ref: 'riskLow', kind: LabelKind.MESSAGE, purpose: 'Risk badge for a low-risk approval request' },\n { ref: 'riskMedium', kind: LabelKind.MESSAGE, purpose: 'Risk badge for a medium-risk approval request' },\n { ref: 'riskHigh', kind: LabelKind.MESSAGE, purpose: 'Risk badge for a high-risk approval request' },\n { ref: 'riskCritical', kind: LabelKind.MESSAGE, purpose: 'Risk badge for a critical-risk approval request' },\n { ref: 'commentPlaceholder', kind: LabelKind.PLACEHOLDER, purpose: 'Placeholder for the optional approver comment field' },\n { ref: 'expiresIn', kind: LabelKind.LABEL, purpose: 'Label preceding the time remaining before the request expires' },\n { ref: 'expired', kind: LabelKind.MESSAGE, purpose: 'Marker that the approval request has expired' },\n { ref: 'requiredRoles', kind: LabelKind.LABEL, purpose: 'Label for the roles authorized to act on this request' },\n { ref: 'context', kind: LabelKind.LABEL, purpose: 'Label for the contextual details of the request' },\n { ref: 'toolCall', kind: LabelKind.LABEL, purpose: 'Label preceding the name of the tool call awaiting approval' },\n { ref: 'toolArguments', kind: LabelKind.LABEL, purpose: 'Label for the arguments proposed for the tool call awaiting approval' },\n { ref: 'confirmTitle', kind: LabelKind.HEADING, purpose: 'Heading of the approval confirmation dialog' },\n { ref: 'confirmDescription', kind: LabelKind.DESCRIPTION, purpose: 'Body text of the approval confirmation dialog' },\n { ref: 'confirmCancel', kind: LabelKind.BUTTON, purpose: 'Button to dismiss the confirmation dialog without acting' },\n { ref: 'confirmProceed', kind: LabelKind.BUTTON, purpose: 'Button to confirm and proceed with the approval action' },\n { ref: 'processing', kind: LabelKind.MESSAGE, purpose: 'Shown while the approval decision is being submitted' },\n { ref: 'queueEmpty', kind: LabelKind.EMPTY_STATE, purpose: 'Shown when there are no pending approvals in the queue' },\n { ref: 'queueSortRisk', kind: LabelKind.LABEL, purpose: 'Sort option ordering the queue by risk level' },\n {\n ref: 'expiresCountdown',\n kind: LabelKind.MESSAGE,\n purpose: 'Live countdown of the time left before the request expires',\n params: [{ key: 'time', meaning: 'formatted time remaining until expiry' }],\n },\n {\n ref: 'timeAgoSeconds',\n kind: LabelKind.MESSAGE,\n purpose: 'Relative timestamp expressed in seconds ago',\n params: [{ key: 'count', meaning: 'number of seconds elapsed' }],\n },\n {\n ref: 'timeAgoMinutes',\n kind: LabelKind.MESSAGE,\n purpose: 'Relative timestamp expressed in minutes ago',\n params: [{ key: 'count', meaning: 'number of minutes elapsed' }],\n },\n {\n ref: 'timeAgoHours',\n kind: LabelKind.MESSAGE,\n purpose: 'Relative timestamp expressed in hours ago',\n params: [{ key: 'count', meaning: 'number of hours elapsed' }],\n },\n];\nregisterComponentLabels(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, LowLevelAiApprovalLabels);\n"]}
1
+ {"version":3,"file":"approval.labels.js","sourceRoot":"","sources":["../../../../src/components/flows-actors/approval.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAA4B,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE1I,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAE/E,MAAM,CAAC,MAAM,wBAAwB,GAA0B;IAC7D,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,uCAAuC,EAAE;IAC5F,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,oCAAoC,EAAE;IACtF,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,qDAAqD,EAAE;IAC3G,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE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2BAA2B,EAAE,CAAC;KACjE;IACD;QACE,GAAG,EAAE,gBAAgB;QACrB,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,6CAA6C;QACtD,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;KACjE;IACD;QACE,GAAG,EAAE,cAAc;QACnB,IAAI,EAAE,SAAS,CAAC,OAAO;QACvB,OAAO,EAAE,2CAA2C;QACpD,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC;KAC/D;CACF,CAAC;AACF,uBAAuB,CAAC,qBAAqB,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { FrontendComponentType, LabelKind, type LabellingUnitaryDef, registerComponentLabels } from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for this component: keys + params + (where\n// authored) per-key purpose / kind / variable meaning. Statically scanned by\n// the dev companion; NOT imported at runtime, so it never ships in the bundle.\n\nexport const LowLevelAiApprovalLabels: LabellingUnitaryDef[] = [\n { ref: 'approve', kind: LabelKind.BUTTON, purpose: 'Button to approve the pending request' },\n { ref: 'deny', kind: LabelKind.BUTTON, purpose: 'Button to deny the pending request' },\n { ref: 'escalate', kind: LabelKind.BUTTON, purpose: 'Button to escalate the request to a higher approver' },\n { ref: 'queueTitle', kind: LabelKind.HEADING, purpose: 'Heading for the approval queue' },\n { ref: 'riskLow', kind: LabelKind.MESSAGE, purpose: 'Risk badge for a low-risk approval request' },\n { ref: 'riskMedium', kind: LabelKind.MESSAGE, purpose: 'Risk badge for a medium-risk approval request' },\n { ref: 'riskHigh', kind: LabelKind.MESSAGE, purpose: 'Risk badge for a high-risk approval request' },\n { ref: 'riskCritical', kind: LabelKind.MESSAGE, purpose: 'Risk badge for a critical-risk approval request' },\n { ref: 'commentPlaceholder', kind: LabelKind.PLACEHOLDER, purpose: 'Placeholder for the optional approver comment field' },\n { ref: 'expiresIn', kind: LabelKind.LABEL, purpose: 'Label preceding the time remaining before the request expires' },\n { ref: 'expired', kind: LabelKind.MESSAGE, purpose: 'Marker that the approval request has expired' },\n { ref: 'requiredRoles', kind: LabelKind.LABEL, purpose: 'Label for the roles authorized to act on this request' },\n { ref: 'context', kind: LabelKind.LABEL, purpose: 'Label for the contextual details of the request' },\n { ref: 'toolCall', kind: LabelKind.LABEL, purpose: 'Label preceding the name of the tool call awaiting approval' },\n { ref: 'toolArguments', kind: LabelKind.LABEL, purpose: 'Label for the arguments proposed for the tool call awaiting approval' },\n { ref: 'editArguments', kind: LabelKind.BUTTON, purpose: 'Button opening an editor over the proposed tool arguments so the approver can change them before approving' },\n { ref: 'discardArgumentEdits', kind: LabelKind.BUTTON, purpose: 'Button closing the argument editor and returning to the arguments the agent proposed' },\n { ref: 'argumentsNotValidJson', kind: LabelKind.MESSAGE, purpose: 'Shown when the edited tool arguments are not a valid JSON object, so the approval cannot be submitted' },\n { ref: 'confirmTitle', kind: LabelKind.HEADING, purpose: 'Heading of the approval confirmation dialog' },\n { ref: 'confirmDescription', kind: LabelKind.DESCRIPTION, purpose: 'Body text of the approval confirmation dialog' },\n { ref: 'confirmCancel', kind: LabelKind.BUTTON, purpose: 'Button to dismiss the confirmation dialog without acting' },\n { ref: 'confirmProceed', kind: LabelKind.BUTTON, purpose: 'Button to confirm and proceed with the approval action' },\n { ref: 'processing', kind: LabelKind.MESSAGE, purpose: 'Shown while the approval decision is being submitted' },\n { ref: 'queueEmpty', kind: LabelKind.EMPTY_STATE, purpose: 'Shown when there are no pending approvals in the queue' },\n { ref: 'queueSortRisk', kind: LabelKind.LABEL, purpose: 'Sort option ordering the queue by risk level' },\n {\n ref: 'expiresCountdown',\n kind: LabelKind.MESSAGE,\n purpose: 'Live countdown of the time left before the request expires',\n params: [{ key: 'time', meaning: 'formatted time remaining until expiry' }],\n },\n {\n ref: 'timeAgoSeconds',\n kind: LabelKind.MESSAGE,\n purpose: 'Relative timestamp expressed in seconds ago',\n params: [{ key: 'count', meaning: 'number of seconds elapsed' }],\n },\n {\n ref: 'timeAgoMinutes',\n kind: LabelKind.MESSAGE,\n purpose: 'Relative timestamp expressed in minutes ago',\n params: [{ key: 'count', meaning: 'number of minutes elapsed' }],\n },\n {\n ref: 'timeAgoHours',\n kind: LabelKind.MESSAGE,\n purpose: 'Relative timestamp expressed in hours ago',\n params: [{ key: 'count', meaning: 'number of hours elapsed' }],\n },\n];\nregisterComponentLabels(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, LowLevelAiApprovalLabels);\n"]}
@@ -61,7 +61,7 @@ export const AI_ExecutionPlanStep = ({ step, index, resolvedStatus, statusChange
61
61
  const hasDetails = dependencies.length > 0 || (statusChanges && statusChanges.length > 0);
62
62
  if (!isReady)
63
63
  return null;
64
- return (_jsxs("li", { className: cn("flex items-start gap-element", className), ...props, children: [_jsxs("div", { className: "flex flex-col items-center gap-0.5 pt-0.5", children: [_jsx("span", { className: "text-2xs font-mono text-muted-foreground", children: index + 1 }), _jsx("div", { className: cn("size-2.5 shrink-0 rounded-full", FlowsActorsUIUtils.STATUS_COLOR[resolvedStatus] ?? "bg-muted-foreground") })] }), _jsxs("div", { className: "flex flex-1 flex-col gap-0.5", children: [_jsxs("div", { className: "flex items-center gap-element", children: [_jsx("span", { className: "text-sm font-medium", children: step.name ?? step._id }), _jsx(Badge, { variant: "outline", className: "text-2xs", children: step.topic }), _jsx(AI_FlowNodeStatusBadge, { status: resolvedStatus })] }), step.description && (_jsx("p", { className: "text-xs text-muted-foreground", children: step.description })), hasDetails && (_jsxs(Collapsible, { open: expanded, onOpenChange: setExpanded, children: [_jsx(CollapsibleTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: ButtonVariants_Variant.LINK, size: ButtonSize.SM, className: "h-auto p-0 text-2xs", children: [expanded ? "▾" : "▸", " ", tComponent(CT, "stepDetails")] }) }), _jsxs(CollapsibleContent, { className: "mt-1 flex flex-col gap-1", children: [dependencies.length > 0 && (_jsxs("p", { className: "text-2xs text-muted-foreground", children: [tComponent(CT, "stepDependencies"), ":", " ", dependencies.join(", ")] })), statusChanges && statusChanges.length > 0 && (_jsx("div", { className: "flex flex-col gap-0.5", children: statusChanges.map((sc, i) => (_jsxs("div", { className: "flex items-center gap-element text-2xs", children: [_jsx("div", { className: cn("size-1.5 rounded-full", FlowsActorsUIUtils.STATUS_COLOR[sc.status] ?? "bg-muted-foreground") }), _jsx("span", { className: "text-muted-foreground", children: sc.status }), _jsx("time", { className: "text-muted-foreground/70", children: FlowsActorsUIUtils.formatTimestamp(sc.timestamp) })] }, `${sc.status}-${sc.timestamp}-${i}`))) })), _jsx("div", { className: "flex gap-card text-2xs text-muted-foreground", children: _jsxs("span", { children: [tComponent(CT, "timestamps"), ": ", FlowsActorsUIUtils.formatTimestamp(step.createdAt)] }) })] })] }))] })] }));
64
+ return (_jsxs("li", { className: cn("flex items-start gap-element", className), ...props, children: [_jsxs("div", { className: "flex flex-col items-center gap-0.5 pt-0.5", children: [_jsx("span", { className: "text-2xs font-mono text-muted-foreground", children: index + 1 }), _jsx("div", { className: cn("size-2.5 shrink-0 rounded-full", FlowsActorsUIUtils.STATUS_COLOR[resolvedStatus] ?? "bg-muted-foreground") })] }), _jsxs("div", { className: "flex flex-1 flex-col gap-0.5", children: [_jsxs("div", { className: "flex items-center gap-element", children: [_jsx("span", { className: "text-sm font-medium", children: step.name ?? step._id }), _jsx(Badge, { variant: "outline", className: "text-2xs", children: step.topic }), _jsx(AI_FlowNodeStatusBadge, { status: resolvedStatus })] }), step.description && (_jsx("p", { className: "text-xs text-muted-foreground", children: step.description })), hasDetails && (_jsxs(Collapsible, { open: expanded, onOpenChange: setExpanded, children: [_jsx(CollapsibleTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: ButtonVariants_Variant.LINK, size: ButtonSize.SM, className: "h-auto p-0 text-2xs", children: [expanded ? "▾" : "▸", " ", tComponent(CT, "stepDetails")] }) }), _jsxs(CollapsibleContent, { className: "mt-1 flex flex-col gap-1", children: [dependencies.length > 0 && (_jsxs("p", { className: "text-2xs text-muted-foreground", children: [tComponent(CT, "stepDependencies"), ":", " ", dependencies.join(", ")] })), statusChanges && statusChanges.length > 0 && (_jsx("div", { className: "flex flex-col gap-0.5", children: statusChanges.map((sc, i) => (_jsxs("div", { className: "flex items-center gap-element text-2xs", children: [_jsx("div", { className: cn("size-1.5 rounded-full", FlowsActorsUIUtils.STATUS_COLOR[sc.status] ?? "bg-muted-foreground") }), _jsx("span", { className: "text-muted-foreground", children: sc.status }), _jsx("time", { className: "text-muted-foreground", children: FlowsActorsUIUtils.formatTimestamp(sc.timestamp) })] }, `${sc.status}-${sc.timestamp}-${i}`))) })), _jsx("div", { className: "flex gap-card text-2xs text-muted-foreground", children: _jsxs("span", { children: [tComponent(CT, "timestamps"), ": ", FlowsActorsUIUtils.formatTimestamp(step.createdAt)] }) })] })] }))] })] }));
65
65
  };
66
66
  export const AI_ExecutionPlanProgress = ({ total, completed, failed, processing = 0, pending = 0, className, ...props }) => {
67
67
  const { tComponent, isReady } = useI18n({ component: CT });
@@ -1 +1 @@
1
- {"version":3,"file":"execution-plan.js","sourceRoot":"","sources":["../../../../src/components/flows-actors/execution-plan.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,mDAAmD,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AAC1H,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,EAAE,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cACE,SAAS,EAAC,sCAAsC,EAChD,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,SAAS,GAAG,EAAE,GACjC,CACH,IACG,EACL,CAAC,UAAU,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,IAAI,CACjC,eAAK,SAAS,EAAC,8CAA8C,aAC1D,UAAU,GAAG,CAAC,IAAI,CACjB,gBAAM,SAAS,EAAC,2BAA2B,aACzC,eAAM,SAAS,EAAC,+CAA+C,GAAG,EACjE,UAAU,CAAC,EAAE,EAAE,mBAA0B,CAAC,QAAI,UAAU,SACpD,CACR,EACA,MAAM,GAAG,CAAC,IAAI,CACb,gBAAM,SAAS,EAAC,2BAA2B,aACzC,eAAM,SAAS,EAAC,mDAAmD,GAAG,EACrE,UAAU,CAAC,EAAE,EAAE,eAAsB,CAAC,QAAI,MAAM,SAC5C,CACR,IACG,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Badge } from \"~wildo-frontend-lib/components/data-display/badge\";\nimport { ScrollArea } from \"~wildo-frontend-lib/components/layout/scroll-area\";\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from \"~wildo-frontend-lib/components/sections/collapsible\";\nimport { Button, ButtonVariants_Variant } from \"~wildo-frontend-lib/components/actions/button\";\nimport { ButtonSize, FrontendComponentType } from \"@wildo-ai/presets-components-models\";\nimport { useI18n } from \"~wildo-frontend-lib/core/i18n/useI18n\";\nimport { cn } from \"~wildo-frontend-lib/core/ui/cn\";\nimport { AI_FlowNodeStatusBadge } from \"./flow-node-badges\";\nimport { FlowsActorsUIUtils } from \"./flows-actors-ui.utils\";\nimport type { ComponentProps } from \"react\";\nimport type {\n ActorsSystem_ExecutionPlan,\n ActorsSystem_ExecutionPlan_Step,\n FlowsActors_Relationship,\n} from \"@wildo-ai/saas-models\";\n\n//===============================================================\n// Constants\n//===============================================================\n\nconst CT = FrontendComponentType.LOW_LEVEL_AI_EXECUTION_PLAN;\n\n//===============================================================\n// Helpers\n//===============================================================\n\nfunction extractDependencies(relationships: FlowsActors_Relationship[]): string[] {\n return relationships\n .filter((r) => r.relation === \"depends_on\" || r.relation === \"blocked_by\")\n .map((r) => {\n if (r.kind === \"actor.plan.step\") return r.planStepId;\n if (r.kind === \"actor.task\") return r.taskId;\n return r.kind;\n });\n}\n\n//===============================================================\n// AI_ExecutionPlan\n//===============================================================\n\nexport type AI_ExecutionPlanProps = ComponentProps<\"div\"> & {\n plan: ActorsSystem_ExecutionPlan;\n};\n\nexport const AI_ExecutionPlan = ({\n plan,\n className,\n ...props\n}: AI_ExecutionPlanProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n\n const stepStateMap = React.useMemo(\n () => new Map(plan.stepStates.map((s) => [s.planStepId, s])),\n [plan.stepStates],\n );\n\n const counts = React.useMemo(() => {\n const c = { total: plan.planSteps.length, completed: 0, failed: 0, processing: 0, pending: 0 };\n for (const step of plan.planSteps) {\n const state = stepStateMap.get(step._id);\n const status = state?.status ?? step.status;\n if (status === \"completed\") c.completed++;\n else if (status === \"failed\") c.failed++;\n else if (status === \"processing\") c.processing++;\n else c.pending++;\n }\n return c;\n }, [plan.planSteps, stepStateMap]);\n\n if (!isReady) return null;\n\n return (\n <div\n className={cn(\"flex flex-col gap-card rounded-lg border bg-card p-card\", className)}\n {...props}\n >\n <div className=\"flex items-start justify-between gap-card\">\n <div className=\"flex flex-col gap-1\">\n <h3 className=\"text-sm font-semibold\">\n {tComponent(CT, \"title\")}\n </h3>\n <p className=\"text-xs text-muted-foreground\">{plan.goalDescription}</p>\n </div>\n <AI_FlowNodeStatusBadge status={plan.status} />\n </div>\n\n <AI_ExecutionPlanProgress\n total={counts.total}\n completed={counts.completed}\n failed={counts.failed}\n processing={counts.processing}\n pending={counts.pending}\n />\n\n <ScrollArea className=\"max-h-80\">\n <ol className=\"flex flex-col gap-2\">\n {plan.planSteps.map((step, index) => {\n const state = stepStateMap.get(step._id);\n return (\n <AI_ExecutionPlanStep\n key={step._id}\n step={step}\n index={index}\n resolvedStatus={state?.status ?? step.status}\n statusChanges={state?.statusChanges}\n />\n );\n })}\n </ol>\n </ScrollArea>\n </div>\n );\n};\n\n//===============================================================\n// AI_ExecutionPlanStep\n//===============================================================\n\ntype StepStatusChange = {\n status: string;\n timestamp: string;\n};\n\nexport type AI_ExecutionPlanStepProps = ComponentProps<\"li\"> & {\n step: ActorsSystem_ExecutionPlan_Step;\n index: number;\n resolvedStatus: string;\n statusChanges?: StepStatusChange[];\n};\n\nexport const AI_ExecutionPlanStep = ({\n step,\n index,\n resolvedStatus,\n statusChanges,\n className,\n ...props\n}: AI_ExecutionPlanStepProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const dependencies = React.useMemo(() => extractDependencies(step.relationships), [step.relationships]);\n const [expanded, setExpanded] = React.useState(false);\n\n const hasDetails = dependencies.length > 0 || (statusChanges && statusChanges.length > 0);\n\n if (!isReady) return null;\n\n return (\n <li className={cn(\"flex items-start gap-element\", className)} {...props}>\n <div className=\"flex flex-col items-center gap-0.5 pt-0.5\">\n <span className=\"text-2xs font-mono text-muted-foreground\">{index + 1}</span>\n <div className={cn(\"size-2.5 shrink-0 rounded-full\", FlowsActorsUIUtils.STATUS_COLOR[resolvedStatus] ?? \"bg-muted-foreground\")} />\n </div>\n <div className=\"flex flex-1 flex-col gap-0.5\">\n <div className=\"flex items-center gap-element\">\n <span className=\"text-sm font-medium\">{step.name ?? step._id}</span>\n <Badge variant=\"outline\" className=\"text-2xs\">{step.topic}</Badge>\n <AI_FlowNodeStatusBadge status={resolvedStatus} />\n </div>\n\n {step.description && (\n <p className=\"text-xs text-muted-foreground\">{step.description}</p>\n )}\n\n {hasDetails && (\n <Collapsible open={expanded} onOpenChange={setExpanded}>\n <CollapsibleTrigger asChild>\n <Button type=\"button\" variant={ButtonVariants_Variant.LINK} size={ButtonSize.SM} className=\"h-auto p-0 text-2xs\">\n {expanded ? \"▾\" : \"▸\"} {tComponent(CT, \"stepDetails\" as any)}\n </Button>\n </CollapsibleTrigger>\n <CollapsibleContent className=\"mt-1 flex flex-col gap-1\">\n {dependencies.length > 0 && (\n <p className=\"text-2xs text-muted-foreground\">\n {tComponent(CT, \"stepDependencies\" as any)}:{\" \"}\n {dependencies.join(\", \")}\n </p>\n )}\n\n {statusChanges && statusChanges.length > 0 && (\n <div className=\"flex flex-col gap-0.5\">\n {statusChanges.map((sc, i) => (\n <div key={`${sc.status}-${sc.timestamp}-${i}`} className=\"flex items-center gap-element text-2xs\">\n <div className={cn(\"size-1.5 rounded-full\", FlowsActorsUIUtils.STATUS_COLOR[sc.status] ?? \"bg-muted-foreground\")} />\n <span className=\"text-muted-foreground\">{sc.status}</span>\n <time className=\"text-muted-foreground/70\">{FlowsActorsUIUtils.formatTimestamp(sc.timestamp)}</time>\n </div>\n ))}\n </div>\n )}\n\n <div className=\"flex gap-card text-2xs text-muted-foreground\">\n <span>{tComponent(CT, \"timestamps\" as any)}: {FlowsActorsUIUtils.formatTimestamp(step.createdAt)}</span>\n </div>\n </CollapsibleContent>\n </Collapsible>\n )}\n </div>\n </li>\n );\n};\n\n//===============================================================\n// AI_ExecutionPlanProgress\n//===============================================================\n\nexport type AI_ExecutionPlanProgressProps = ComponentProps<\"div\"> & {\n total: number;\n completed: number;\n failed: number;\n processing?: number;\n pending?: number;\n};\n\nexport const AI_ExecutionPlanProgress = ({\n total,\n completed,\n failed,\n processing = 0,\n pending = 0,\n className,\n ...props\n}: AI_ExecutionPlanProgressProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const percentage = total > 0 ? Math.round((completed / total) * 100) : 0;\n\n const completedPct = total > 0 ? (completed / total) * 100 : 0;\n const processingPct = total > 0 ? (processing / total) * 100 : 0;\n const failedPct = total > 0 ? (failed / total) * 100 : 0;\n\n if (!isReady) return null;\n\n return (\n <div className={cn(\"flex flex-col gap-1\", className)} {...props}>\n <div className=\"flex items-center justify-between text-xs\">\n <span>\n {tComponent(CT, \"progress\", {\n completed,\n total,\n })}\n </span>\n <span className=\"text-muted-foreground\">{percentage}%</span>\n </div>\n <div className=\"flex h-1.5 w-full overflow-hidden rounded-full bg-secondary\">\n {completedPct > 0 && (\n <div\n className=\"h-full bg-success transition-all\"\n style={{ width: `${completedPct}%` }}\n />\n )}\n {processingPct > 0 && (\n <div\n className=\"h-full animate-pulse bg-primary transition-all\"\n style={{ width: `${processingPct}%` }}\n />\n )}\n {failedPct > 0 && (\n <div\n className=\"h-full bg-destructive transition-all\"\n style={{ width: `${failedPct}%` }}\n />\n )}\n </div>\n {(processing > 0 || failed > 0) && (\n <div className=\"flex gap-card text-2xs text-muted-foreground\">\n {processing > 0 && (\n <span className=\"flex items-center gap-0.5\">\n <span className=\"inline-block size-1.5 rounded-full bg-primary\" />\n {tComponent(CT, \"segmentProcessing\" as any)} ({processing})\n </span>\n )}\n {failed > 0 && (\n <span className=\"flex items-center gap-0.5\">\n <span className=\"inline-block size-1.5 rounded-full bg-destructive\" />\n {tComponent(CT, \"segmentFailed\" as any)} ({failed})\n </span>\n )}\n </div>\n )}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"execution-plan.js","sourceRoot":"","sources":["../../../../src/components/flows-actors/execution-plan.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,mDAAmD,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AAC1H,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,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CAAC,IAAI,CAChB,cACE,SAAS,EAAC,sCAAsC,EAChD,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,SAAS,GAAG,EAAE,GACjC,CACH,IACG,EACL,CAAC,UAAU,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,IAAI,CACjC,eAAK,SAAS,EAAC,8CAA8C,aAC1D,UAAU,GAAG,CAAC,IAAI,CACjB,gBAAM,SAAS,EAAC,2BAA2B,aACzC,eAAM,SAAS,EAAC,+CAA+C,GAAG,EACjE,UAAU,CAAC,EAAE,EAAE,mBAA0B,CAAC,QAAI,UAAU,SACpD,CACR,EACA,MAAM,GAAG,CAAC,IAAI,CACb,gBAAM,SAAS,EAAC,2BAA2B,aACzC,eAAM,SAAS,EAAC,mDAAmD,GAAG,EACrE,UAAU,CAAC,EAAE,EAAE,eAAsB,CAAC,QAAI,MAAM,SAC5C,CACR,IACG,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Badge } from \"~wildo-frontend-lib/components/data-display/badge\";\nimport { ScrollArea } from \"~wildo-frontend-lib/components/layout/scroll-area\";\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from \"~wildo-frontend-lib/components/sections/collapsible\";\nimport { Button, ButtonVariants_Variant } from \"~wildo-frontend-lib/components/actions/button\";\nimport { ButtonSize, FrontendComponentType } from \"@wildo-ai/presets-components-models\";\nimport { useI18n } from \"~wildo-frontend-lib/core/i18n/useI18n\";\nimport { cn } from \"~wildo-frontend-lib/core/ui/cn\";\nimport { AI_FlowNodeStatusBadge } from \"./flow-node-badges\";\nimport { FlowsActorsUIUtils } from \"./flows-actors-ui.utils\";\nimport type { ComponentProps } from \"react\";\nimport type {\n ActorsSystem_ExecutionPlan,\n ActorsSystem_ExecutionPlan_Step,\n FlowsActors_Relationship,\n} from \"@wildo-ai/saas-models\";\n\n//===============================================================\n// Constants\n//===============================================================\n\nconst CT = FrontendComponentType.LOW_LEVEL_AI_EXECUTION_PLAN;\n\n//===============================================================\n// Helpers\n//===============================================================\n\nfunction extractDependencies(relationships: FlowsActors_Relationship[]): string[] {\n return relationships\n .filter((r) => r.relation === \"depends_on\" || r.relation === \"blocked_by\")\n .map((r) => {\n if (r.kind === \"actor.plan.step\") return r.planStepId;\n if (r.kind === \"actor.task\") return r.taskId;\n return r.kind;\n });\n}\n\n//===============================================================\n// AI_ExecutionPlan\n//===============================================================\n\nexport type AI_ExecutionPlanProps = ComponentProps<\"div\"> & {\n plan: ActorsSystem_ExecutionPlan;\n};\n\nexport const AI_ExecutionPlan = ({\n plan,\n className,\n ...props\n}: AI_ExecutionPlanProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n\n const stepStateMap = React.useMemo(\n () => new Map(plan.stepStates.map((s) => [s.planStepId, s])),\n [plan.stepStates],\n );\n\n const counts = React.useMemo(() => {\n const c = { total: plan.planSteps.length, completed: 0, failed: 0, processing: 0, pending: 0 };\n for (const step of plan.planSteps) {\n const state = stepStateMap.get(step._id);\n const status = state?.status ?? step.status;\n if (status === \"completed\") c.completed++;\n else if (status === \"failed\") c.failed++;\n else if (status === \"processing\") c.processing++;\n else c.pending++;\n }\n return c;\n }, [plan.planSteps, stepStateMap]);\n\n if (!isReady) return null;\n\n return (\n <div\n className={cn(\"flex flex-col gap-card rounded-lg border bg-card p-card\", className)}\n {...props}\n >\n <div className=\"flex items-start justify-between gap-card\">\n <div className=\"flex flex-col gap-1\">\n <h3 className=\"text-sm font-semibold\">\n {tComponent(CT, \"title\")}\n </h3>\n <p className=\"text-xs text-muted-foreground\">{plan.goalDescription}</p>\n </div>\n <AI_FlowNodeStatusBadge status={plan.status} />\n </div>\n\n <AI_ExecutionPlanProgress\n total={counts.total}\n completed={counts.completed}\n failed={counts.failed}\n processing={counts.processing}\n pending={counts.pending}\n />\n\n <ScrollArea className=\"max-h-80\">\n <ol className=\"flex flex-col gap-2\">\n {plan.planSteps.map((step, index) => {\n const state = stepStateMap.get(step._id);\n return (\n <AI_ExecutionPlanStep\n key={step._id}\n step={step}\n index={index}\n resolvedStatus={state?.status ?? step.status}\n statusChanges={state?.statusChanges}\n />\n );\n })}\n </ol>\n </ScrollArea>\n </div>\n );\n};\n\n//===============================================================\n// AI_ExecutionPlanStep\n//===============================================================\n\ntype StepStatusChange = {\n status: string;\n timestamp: string;\n};\n\nexport type AI_ExecutionPlanStepProps = ComponentProps<\"li\"> & {\n step: ActorsSystem_ExecutionPlan_Step;\n index: number;\n resolvedStatus: string;\n statusChanges?: StepStatusChange[];\n};\n\nexport const AI_ExecutionPlanStep = ({\n step,\n index,\n resolvedStatus,\n statusChanges,\n className,\n ...props\n}: AI_ExecutionPlanStepProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const dependencies = React.useMemo(() => extractDependencies(step.relationships), [step.relationships]);\n const [expanded, setExpanded] = React.useState(false);\n\n const hasDetails = dependencies.length > 0 || (statusChanges && statusChanges.length > 0);\n\n if (!isReady) return null;\n\n return (\n <li className={cn(\"flex items-start gap-element\", className)} {...props}>\n <div className=\"flex flex-col items-center gap-0.5 pt-0.5\">\n <span className=\"text-2xs font-mono text-muted-foreground\">{index + 1}</span>\n <div className={cn(\"size-2.5 shrink-0 rounded-full\", FlowsActorsUIUtils.STATUS_COLOR[resolvedStatus] ?? \"bg-muted-foreground\")} />\n </div>\n <div className=\"flex flex-1 flex-col gap-0.5\">\n <div className=\"flex items-center gap-element\">\n <span className=\"text-sm font-medium\">{step.name ?? step._id}</span>\n <Badge variant=\"outline\" className=\"text-2xs\">{step.topic}</Badge>\n <AI_FlowNodeStatusBadge status={resolvedStatus} />\n </div>\n\n {step.description && (\n <p className=\"text-xs text-muted-foreground\">{step.description}</p>\n )}\n\n {hasDetails && (\n <Collapsible open={expanded} onOpenChange={setExpanded}>\n <CollapsibleTrigger asChild>\n <Button type=\"button\" variant={ButtonVariants_Variant.LINK} size={ButtonSize.SM} className=\"h-auto p-0 text-2xs\">\n {expanded ? \"▾\" : \"▸\"} {tComponent(CT, \"stepDetails\" as any)}\n </Button>\n </CollapsibleTrigger>\n <CollapsibleContent className=\"mt-1 flex flex-col gap-1\">\n {dependencies.length > 0 && (\n <p className=\"text-2xs text-muted-foreground\">\n {tComponent(CT, \"stepDependencies\" as any)}:{\" \"}\n {dependencies.join(\", \")}\n </p>\n )}\n\n {statusChanges && statusChanges.length > 0 && (\n <div className=\"flex flex-col gap-0.5\">\n {statusChanges.map((sc, i) => (\n <div key={`${sc.status}-${sc.timestamp}-${i}`} className=\"flex items-center gap-element text-2xs\">\n <div className={cn(\"size-1.5 rounded-full\", FlowsActorsUIUtils.STATUS_COLOR[sc.status] ?? \"bg-muted-foreground\")} />\n <span className=\"text-muted-foreground\">{sc.status}</span>\n <time className=\"text-muted-foreground\">{FlowsActorsUIUtils.formatTimestamp(sc.timestamp)}</time>\n </div>\n ))}\n </div>\n )}\n\n <div className=\"flex gap-card text-2xs text-muted-foreground\">\n <span>{tComponent(CT, \"timestamps\" as any)}: {FlowsActorsUIUtils.formatTimestamp(step.createdAt)}</span>\n </div>\n </CollapsibleContent>\n </Collapsible>\n )}\n </div>\n </li>\n );\n};\n\n//===============================================================\n// AI_ExecutionPlanProgress\n//===============================================================\n\nexport type AI_ExecutionPlanProgressProps = ComponentProps<\"div\"> & {\n total: number;\n completed: number;\n failed: number;\n processing?: number;\n pending?: number;\n};\n\nexport const AI_ExecutionPlanProgress = ({\n total,\n completed,\n failed,\n processing = 0,\n pending = 0,\n className,\n ...props\n}: AI_ExecutionPlanProgressProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const percentage = total > 0 ? Math.round((completed / total) * 100) : 0;\n\n const completedPct = total > 0 ? (completed / total) * 100 : 0;\n const processingPct = total > 0 ? (processing / total) * 100 : 0;\n const failedPct = total > 0 ? (failed / total) * 100 : 0;\n\n if (!isReady) return null;\n\n return (\n <div className={cn(\"flex flex-col gap-1\", className)} {...props}>\n <div className=\"flex items-center justify-between text-xs\">\n <span>\n {tComponent(CT, \"progress\", {\n completed,\n total,\n })}\n </span>\n <span className=\"text-muted-foreground\">{percentage}%</span>\n </div>\n <div className=\"flex h-1.5 w-full overflow-hidden rounded-full bg-secondary\">\n {completedPct > 0 && (\n <div\n className=\"h-full bg-success transition-all\"\n style={{ width: `${completedPct}%` }}\n />\n )}\n {processingPct > 0 && (\n <div\n className=\"h-full animate-pulse bg-primary transition-all\"\n style={{ width: `${processingPct}%` }}\n />\n )}\n {failedPct > 0 && (\n <div\n className=\"h-full bg-destructive transition-all\"\n style={{ width: `${failedPct}%` }}\n />\n )}\n </div>\n {(processing > 0 || failed > 0) && (\n <div className=\"flex gap-card text-2xs text-muted-foreground\">\n {processing > 0 && (\n <span className=\"flex items-center gap-0.5\">\n <span className=\"inline-block size-1.5 rounded-full bg-primary\" />\n {tComponent(CT, \"segmentProcessing\" as any)} ({processing})\n </span>\n )}\n {failed > 0 && (\n <span className=\"flex items-center gap-0.5\">\n <span className=\"inline-block size-1.5 rounded-full bg-destructive\" />\n {tComponent(CT, \"segmentFailed\" as any)} ({failed})\n </span>\n )}\n </div>\n )}\n </div>\n );\n};\n"]}
@@ -37,6 +37,6 @@ export const AI_TaskMemoryEntryItem = ({ entry, className, ...props }) => {
37
37
  const isExpired = entry.expiresAt ? new Date(entry.expiresAt).getTime() < Date.now() : false;
38
38
  if (!isReady)
39
39
  return null;
40
- return (_jsxs("div", { className: cn("flex flex-col gap-0.5 rounded-sm bg-muted p-1.5", isExpired && "opacity-[var(--opacity-muted)]", className), ...props, children: [_jsxs("div", { className: "flex items-center gap-element", children: [_jsx("span", { className: "text-2xs font-medium", children: entry.key }), _jsx(Badge, { variant: "outline", className: "text-2xs", children: entry.type }), isExpired && (_jsx(Badge, { variant: "destructive", className: "text-2xs", children: tComponent(CT, "expired") })), entry.expiresAt && !isExpired && (_jsxs("span", { className: "text-2xs text-muted-foreground", children: [tComponent(CT, "expires"), ": ", new Date(entry.expiresAt).toLocaleTimeString()] }))] }), _jsx("pre", { className: "max-h-16 overflow-auto text-2xs text-muted-foreground", children: typeof entry.value === "string" ? entry.value : JSON.stringify(entry.value, null, 2) }), entry.metadata && Object.keys(entry.metadata).length > 0 && (_jsxs("div", { className: "mt-0.5 flex flex-wrap gap-1", children: [_jsxs("span", { className: "text-2xs text-muted-foreground/70", children: [tComponent(CT, "metadata"), ":"] }), Object.entries(entry.metadata).map(([k, v]) => (_jsxs(Badge, { variant: "outline", className: "text-2xs", children: [k, ": ", String(v)] }, k)))] })), _jsx("time", { className: "text-2xs text-muted-foreground/60", children: new Date(entry.timestamp).toLocaleTimeString() })] }));
40
+ return (_jsxs("div", { className: cn("flex flex-col gap-0.5 rounded-sm bg-muted p-1.5", isExpired && "opacity-[var(--opacity-muted)]", className), ...props, children: [_jsxs("div", { className: "flex items-center gap-element", children: [_jsx("span", { className: "text-2xs font-medium", children: entry.key }), _jsx(Badge, { variant: "outline", className: "text-2xs", children: entry.type }), isExpired && (_jsx(Badge, { variant: "destructive", className: "text-2xs", children: tComponent(CT, "expired") })), entry.expiresAt && !isExpired && (_jsxs("span", { className: "text-2xs text-muted-foreground", children: [tComponent(CT, "expires"), ": ", new Date(entry.expiresAt).toLocaleTimeString()] }))] }), _jsx("pre", { className: "max-h-16 overflow-auto text-2xs text-muted-foreground", children: typeof entry.value === "string" ? entry.value : JSON.stringify(entry.value, null, 2) }), entry.metadata && Object.keys(entry.metadata).length > 0 && (_jsxs("div", { className: "mt-0.5 flex flex-wrap gap-1", children: [_jsxs("span", { className: "text-2xs text-muted-foreground", children: [tComponent(CT, "metadata"), ":"] }), Object.entries(entry.metadata).map(([k, v]) => (_jsxs(Badge, { variant: "outline", className: "text-2xs", children: [k, ": ", String(v)] }, k)))] })), _jsx("time", { className: "text-2xs text-muted-foreground/60", children: new Date(entry.timestamp).toLocaleTimeString() })] }));
41
41
  };
42
42
  //# sourceMappingURL=task-memory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"task-memory.js","sourceR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E,EAAE,CAAC,CAC9C,MAAC,KAAK,IAAS,OAAO,EAAC,SAAS,EAAC,SAAS,EAAC,UAAU,aAClD,CAAC,QAAI,MAAM,CAAC,CAAC,CAAC,KADL,CAAC,CAEL,CACT,CAAC,IACE,CACP,EAED,eAAM,SAAS,EAAC,mCAAmC,YAChD,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,kBAAkB,EAAE,GAC1C,IACH,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Badge } from \"~wildo-frontend-lib/components/data-display/badge\";\nimport { ScrollArea } from \"~wildo-frontend-lib/components/layout/scroll-area\";\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from \"~wildo-frontend-lib/components/sections/collapsible\";\nimport { Button, ButtonVariants_Variant } from \"~wildo-frontend-lib/components/actions/button\";\nimport { useI18n } from \"~wildo-frontend-lib/core/i18n/useI18n\";\nimport { cn } from \"~wildo-frontend-lib/core/ui/cn\";\nimport { FrontendComponentType } from \"@wildo-ai/presets-components-models\";\nimport type { ComponentProps } from \"react\";\nimport type {\n Actors_Memory_Context,\n Actors_Memory_Store,\n Actors_Memory_Entry,\n} from \"@wildo-ai/saas-models\";\n\n//===============================================================\n// Constants\n//===============================================================\n\nconst CT = FrontendComponentType.LOW_LEVEL_AI_TASK_MEMORY;\n\nconst SCOPE_ICONS: Record<string, string> = {\n short_term: \"⚡\",\n long_term: \"📦\",\n working: \"🔧\",\n};\n\n//===============================================================\n// AI_TaskMemory\n//===============================================================\n\nexport type AI_TaskMemoryProps = ComponentProps<\"div\"> & {\n memory: Actors_Memory_Context;\n};\n\nexport const AI_TaskMemory = ({\n memory,\n className,\n ...props\n}: AI_TaskMemoryProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n\n const totalEntries =\n memory.shortTerm.entries.length +\n memory.longTerm.entries.length +\n memory.working.entries.length;\n\n if (!isReady) return null;\n\n return (\n <div className={cn(\"flex flex-col gap-card\", className)} {...props}>\n <div className=\"flex items-center gap-element\">\n <h4 className=\"text-sm font-semibold\">\n {tComponent(CT, \"title\")}\n </h4>\n <Badge variant=\"secondary\" className=\"text-2xs\">{totalEntries}</Badge>\n </div>\n <AI_TaskMemoryScope\n scope=\"short_term\"\n label={tComponent(CT, \"shortTerm\")}\n store={memory.shortTerm}\n defaultOpen\n />\n <AI_TaskMemoryScope\n scope=\"long_term\"\n label={tComponent(CT, \"longTerm\")}\n store={memory.longTerm}\n />\n <AI_TaskMemoryScope\n scope=\"working\"\n label={tComponent(CT, \"working\")}\n store={memory.working}\n />\n </div>\n );\n};\n\n//===============================================================\n// AI_TaskMemoryScope\n//===============================================================\n\nexport type AI_TaskMemoryScopeProps = ComponentProps<typeof Collapsible> & {\n scope: string;\n label: string;\n store: Actors_Memory_Store;\n defaultOpen?: boolean;\n};\n\nexport const AI_TaskMemoryScope = ({\n scope,\n label,\n store,\n defaultOpen = false,\n className,\n ...props\n}: AI_TaskMemoryScopeProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const icon = SCOPE_ICONS[scope] ?? \"📋\";\n\n if (!isReady) return null;\n\n return (\n <Collapsible defaultOpen={defaultOpen} className={cn(\"rounded-md border\", className)} {...props}>\n <CollapsibleTrigger asChild>\n <Button type=\"button\" variant={ButtonVariants_Variant.GHOST} className=\"w-full justify-between p-card-sm\">\n <span className=\"flex items-center gap-element text-xs font-medium\">\n <span>{icon}</span>\n {label}\n {store.maxSize != null && (\n <span className=\"text-2xs text-muted-foreground\">\n ({store.entries.length}/{store.maxSize})\n </span>\n )}\n </span>\n <Badge variant=\"secondary\" className=\"text-2xs\">{store.entries.length}</Badge>\n </Button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <ScrollArea className=\"max-h-48\">\n <div className=\"flex flex-col gap-1 p-card-sm pt-0\">\n {store.entries.map((entry) => (\n <AI_TaskMemoryEntryItem key={entry.key} entry={entry} />\n ))}\n {store.entries.length === 0 && (\n <span className=\"text-2xs text-muted-foreground italic\">\n {tComponent(CT, \"scopeEmpty\" as any)}\n </span>\n )}\n </div>\n </ScrollArea>\n </CollapsibleContent>\n </Collapsible>\n );\n};\n\n//===============================================================\n// AI_TaskMemoryEntryItem\n//===============================================================\n\nexport type AI_TaskMemoryEntryItemProps = ComponentProps<\"div\"> & {\n entry: Actors_Memory_Entry;\n};\n\nexport const AI_TaskMemoryEntryItem = ({\n entry,\n className,\n ...props\n}: AI_TaskMemoryEntryItemProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const isExpired = entry.expiresAt ? new Date(entry.expiresAt).getTime() < Date.now() : false;\n\n if (!isReady) return null;\n\n return (\n <div\n className={cn(\n \"flex flex-col gap-0.5 rounded-sm bg-muted p-1.5\",\n isExpired && \"opacity-[var(--opacity-muted)]\",\n className,\n )}\n {...props}\n >\n <div className=\"flex items-center gap-element\">\n <span className=\"text-2xs font-medium\">{entry.key}</span>\n <Badge variant=\"outline\" className=\"text-2xs\">{entry.type}</Badge>\n {isExpired && (\n <Badge variant=\"destructive\" className=\"text-2xs\">{tComponent(CT, \"expired\" as any)}</Badge>\n )}\n {entry.expiresAt && !isExpired && (\n <span className=\"text-2xs text-muted-foreground\">\n {tComponent(CT, \"expires\" as any)}: {new Date(entry.expiresAt).toLocaleTimeString()}\n </span>\n )}\n </div>\n\n <pre className=\"max-h-16 overflow-auto text-2xs text-muted-foreground\">\n {typeof entry.value === \"string\" ? entry.value : JSON.stringify(entry.value, null, 2)}\n </pre>\n\n {entry.metadata && Object.keys(entry.metadata).length > 0 && (\n <div className=\"mt-0.5 flex flex-wrap gap-1\">\n <span className=\"text-2xs text-muted-foreground/70\">{tComponent(CT, \"metadata\" as any)}:</span>\n {Object.entries(entry.metadata).map(([k, v]) => (\n <Badge key={k} variant=\"outline\" className=\"text-2xs\">\n {k}: {String(v)}\n </Badge>\n ))}\n </div>\n )}\n\n <time className=\"text-2xs text-muted-foreground/60\">\n {new Date(entry.timestamp).toLocaleTimeString()}\n </time>\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"task-memory.js","sourceRoot":"","sources":["../../../../src/components/flows-actors/task-memory.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,mDAAmD,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AAC1H,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAQ5E,iEAAiE;AACjE,aAAa;AACb,iEAAiE;AAEjE,MAAM,EAAE,GAAG,qBAAqB,CAAC,wBAAwB,CAAC;AAE1D,MAAM,WAAW,GAA2B;IAC1C,UAAU,EAAE,GAAG;IACf,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;CACd,CAAC;AAUF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACW,EAA4B,EAAE;IACjD,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;IAE3D,MAAM,YAAY,GAChB,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM;QAC/B,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM;QAC9B,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;IAEhC,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAA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K,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAC9C,MAAC,KAAK,IAAS,OAAO,EAAC,SAAS,EAAC,SAAS,EAAC,UAAU,aAClD,CAAC,QAAI,MAAM,CAAC,CAAC,CAAC,KADL,CAAC,CAEL,CACT,CAAC,IACE,CACP,EAED,eAAM,SAAS,EAAC,mCAAmC,YAChD,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,kBAAkB,EAAE,GAC1C,IACH,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Badge } from \"~wildo-frontend-lib/components/data-display/badge\";\nimport { ScrollArea } from \"~wildo-frontend-lib/components/layout/scroll-area\";\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from \"~wildo-frontend-lib/components/sections/collapsible\";\nimport { Button, ButtonVariants_Variant } from \"~wildo-frontend-lib/components/actions/button\";\nimport { useI18n } from \"~wildo-frontend-lib/core/i18n/useI18n\";\nimport { cn } from \"~wildo-frontend-lib/core/ui/cn\";\nimport { FrontendComponentType } from \"@wildo-ai/presets-components-models\";\nimport type { ComponentProps } from \"react\";\nimport type {\n Actors_Memory_Context,\n Actors_Memory_Store,\n Actors_Memory_Entry,\n} from \"@wildo-ai/saas-models\";\n\n//===============================================================\n// Constants\n//===============================================================\n\nconst CT = FrontendComponentType.LOW_LEVEL_AI_TASK_MEMORY;\n\nconst SCOPE_ICONS: Record<string, string> = {\n short_term: \"⚡\",\n long_term: \"📦\",\n working: \"🔧\",\n};\n\n//===============================================================\n// AI_TaskMemory\n//===============================================================\n\nexport type AI_TaskMemoryProps = ComponentProps<\"div\"> & {\n memory: Actors_Memory_Context;\n};\n\nexport const AI_TaskMemory = ({\n memory,\n className,\n ...props\n}: AI_TaskMemoryProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n\n const totalEntries =\n memory.shortTerm.entries.length +\n memory.longTerm.entries.length +\n memory.working.entries.length;\n\n if (!isReady) return null;\n\n return (\n <div className={cn(\"flex flex-col gap-card\", className)} {...props}>\n <div className=\"flex items-center gap-element\">\n <h4 className=\"text-sm font-semibold\">\n {tComponent(CT, \"title\")}\n </h4>\n <Badge variant=\"secondary\" className=\"text-2xs\">{totalEntries}</Badge>\n </div>\n <AI_TaskMemoryScope\n scope=\"short_term\"\n label={tComponent(CT, \"shortTerm\")}\n store={memory.shortTerm}\n defaultOpen\n />\n <AI_TaskMemoryScope\n scope=\"long_term\"\n label={tComponent(CT, \"longTerm\")}\n store={memory.longTerm}\n />\n <AI_TaskMemoryScope\n scope=\"working\"\n label={tComponent(CT, \"working\")}\n store={memory.working}\n />\n </div>\n );\n};\n\n//===============================================================\n// AI_TaskMemoryScope\n//===============================================================\n\nexport type AI_TaskMemoryScopeProps = ComponentProps<typeof Collapsible> & {\n scope: string;\n label: string;\n store: Actors_Memory_Store;\n defaultOpen?: boolean;\n};\n\nexport const AI_TaskMemoryScope = ({\n scope,\n label,\n store,\n defaultOpen = false,\n className,\n ...props\n}: AI_TaskMemoryScopeProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const icon = SCOPE_ICONS[scope] ?? \"📋\";\n\n if (!isReady) return null;\n\n return (\n <Collapsible defaultOpen={defaultOpen} className={cn(\"rounded-md border\", className)} {...props}>\n <CollapsibleTrigger asChild>\n <Button type=\"button\" variant={ButtonVariants_Variant.GHOST} className=\"w-full justify-between p-card-sm\">\n <span className=\"flex items-center gap-element text-xs font-medium\">\n <span>{icon}</span>\n {label}\n {store.maxSize != null && (\n <span className=\"text-2xs text-muted-foreground\">\n ({store.entries.length}/{store.maxSize})\n </span>\n )}\n </span>\n <Badge variant=\"secondary\" className=\"text-2xs\">{store.entries.length}</Badge>\n </Button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <ScrollArea className=\"max-h-48\">\n <div className=\"flex flex-col gap-1 p-card-sm pt-0\">\n {store.entries.map((entry) => (\n <AI_TaskMemoryEntryItem key={entry.key} entry={entry} />\n ))}\n {store.entries.length === 0 && (\n <span className=\"text-2xs text-muted-foreground italic\">\n {tComponent(CT, \"scopeEmpty\" as any)}\n </span>\n )}\n </div>\n </ScrollArea>\n </CollapsibleContent>\n </Collapsible>\n );\n};\n\n//===============================================================\n// AI_TaskMemoryEntryItem\n//===============================================================\n\nexport type AI_TaskMemoryEntryItemProps = ComponentProps<\"div\"> & {\n entry: Actors_Memory_Entry;\n};\n\nexport const AI_TaskMemoryEntryItem = ({\n entry,\n className,\n ...props\n}: AI_TaskMemoryEntryItemProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const isExpired = entry.expiresAt ? new Date(entry.expiresAt).getTime() < Date.now() : false;\n\n if (!isReady) return null;\n\n return (\n <div\n className={cn(\n \"flex flex-col gap-0.5 rounded-sm bg-muted p-1.5\",\n isExpired && \"opacity-[var(--opacity-muted)]\",\n className,\n )}\n {...props}\n >\n <div className=\"flex items-center gap-element\">\n <span className=\"text-2xs font-medium\">{entry.key}</span>\n <Badge variant=\"outline\" className=\"text-2xs\">{entry.type}</Badge>\n {isExpired && (\n <Badge variant=\"destructive\" className=\"text-2xs\">{tComponent(CT, \"expired\" as any)}</Badge>\n )}\n {entry.expiresAt && !isExpired && (\n <span className=\"text-2xs text-muted-foreground\">\n {tComponent(CT, \"expires\" as any)}: {new Date(entry.expiresAt).toLocaleTimeString()}\n </span>\n )}\n </div>\n\n <pre className=\"max-h-16 overflow-auto text-2xs text-muted-foreground\">\n {typeof entry.value === \"string\" ? entry.value : JSON.stringify(entry.value, null, 2)}\n </pre>\n\n {entry.metadata && Object.keys(entry.metadata).length > 0 && (\n <div className=\"mt-0.5 flex flex-wrap gap-1\">\n <span className=\"text-2xs text-muted-foreground\">{tComponent(CT, \"metadata\" as any)}:</span>\n {Object.entries(entry.metadata).map(([k, v]) => (\n <Badge key={k} variant=\"outline\" className=\"text-2xs\">\n {k}: {String(v)}\n </Badge>\n ))}\n </div>\n )}\n\n <time className=\"text-2xs text-muted-foreground/60\">\n {new Date(entry.timestamp).toLocaleTimeString()}\n </time>\n </div>\n );\n};\n"]}
@@ -9,7 +9,7 @@ export declare function useGeneratedRelationshipFieldCommon(params: {
9
9
  registry: import("../../..").FrontendResourcesRegistry;
10
10
  doOperation: <TResponse = any>(operationPath: import("../../..").OperationPathIdentifier, parameters: import("../../..").ResourceOperationCallParameters | import("../../..").ResourceSearchCallParameters, options?: import("../../..").RequestOptions) => Promise<TResponse>;
11
11
  fieldSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
12
- resolvedChromeMode: "hidden" | "inline" | "stacked" | "settings_row" | "compact" | "relaxed" | Partial<Record<import("@wildo-ai/zod-decorators").ViewportBreakpoint, import("@wildo-ai/zod-decorators").EditChromeMode>>;
12
+ resolvedChromeMode: "hidden" | "compact" | "inline" | "stacked" | "settings_row" | "relaxed" | Partial<Record<import("@wildo-ai/zod-decorators").ViewportBreakpoint, import("@wildo-ai/zod-decorators").EditChromeMode>>;
13
13
  resolvedLabelPlacement: import("@wildo-ai/presets-components-models").AutoLabelPlacement;
14
14
  resolvedControlSize: import("@wildo-ai/presets-components-models").ControlSize;
15
15
  hideInlineErrorForPolicy: boolean;
@@ -54,7 +54,7 @@ export interface SliderCompound extends React.ForwardRefExoticComponent<SliderPr
54
54
  Root: React.ForwardRefExoticComponent<SliderRootProps & React.RefAttributes<SliderRootRef>>;
55
55
  }
56
56
  export declare const Slider: React.ForwardRefExoticComponent<SliderProps & ComponentPresetProps & React.RefAttributes<HTMLDivElement>>;
57
- export declare const SliderRoot: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "value" | "defaultValue" | "dir"> & {
57
+ export declare const SliderRoot: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "value" | "dir" | "defaultValue"> & {
58
58
  value?: number[];
59
59
  defaultValue?: number[];
60
60
  onValueChange?: (value: number[]) => void;
@@ -1,5 +1,5 @@
1
1
  import type { z } from 'zod';
2
- import type { ProviderFilePickerConstraints } from '@wildo-ai/external-connectors-public/app';
2
+ import type { ProviderFilePickerConstraints } from '@wildo-ai/saas-models/public-runtime';
3
3
  interface FrontendFilePickerProviderModuleLike {
4
4
  protocols: ReadonlyArray<string>;
5
5
  publicConfig?: Readonly<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"form-field-file-provider-constraints.frontend.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/form-field-file-provider-constraints.frontend.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAU7B,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAE9F,UAAU,oCAAoC;IAC5C,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAClD;AAED,UAAU,4BAA4B;IACpC,mCAAmC,CAAC,EAAE,CACpC,kBAAkB,EAAE,MAAM,EAC1B,gBAAgB,EAAE,MAAM,KACrB,oCAAoC,GAAG,SAAS,CAAC;IACtD,wBAAwB,CAAC,EAAE,CACzB,kBAAkB,EAAE,MAAM,KACvB,aAAa,CAAC,oCAAoC,CAAC,CAAC;CAC1D;AAED,8HAA8H;AAC9H;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,wCAAwC,GAAG,6BAA6B,CAAC;AAErF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uCAAuC,CAAC,KAAK,EAAE;IAC7D,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;IACrB,wBAAwB,CAAC,EAAE,4BAA4B,CAAC;CACzD,GAAG,wCAAwC,CAgD3C;;AACD,iFAAiF"}
1
+ {"version":3,"file":"form-field-file-provider-constraints.frontend.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/form-field-file-provider-constraints.frontend.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAU7B,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AAE1F,UAAU,oCAAoC;IAC5C,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAClD;AAED,UAAU,4BAA4B;IACpC,mCAAmC,CAAC,EAAE,CACpC,kBAAkB,EAAE,MAAM,EAC1B,gBAAgB,EAAE,MAAM,KACrB,oCAAoC,GAAG,SAAS,CAAC;IACtD,wBAAwB,CAAC,EAAE,CACzB,kBAAkB,EAAE,MAAM,KACvB,aAAa,CAAC,oCAAoC,CAAC,CAAC;CAC1D;AAED,8HAA8H;AAC9H;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,wCAAwC,GAAG,6BAA6B,CAAC;AAErF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uCAAuC,CAAC,KAAK,EAAE;IAC7D,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;IACrB,wBAAwB,CAAC,EAAE,4BAA4B,CAAC;CACzD,GAAG,wCAAwC,CAgD3C;;AACD,iFAAiF"}