@superblocksteam/vite-plugin-file-sync 2.0.42-next.42 → 2.0.42-next.44

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 (184) hide show
  1. package/dist/ai-service/agent/apis.d.ts.map +1 -1
  2. package/dist/ai-service/agent/apis.js +34 -26
  3. package/dist/ai-service/agent/apis.js.map +1 -1
  4. package/dist/ai-service/index.d.ts +1 -0
  5. package/dist/ai-service/index.d.ts.map +1 -1
  6. package/dist/ai-service/index.js +7 -0
  7. package/dist/ai-service/index.js.map +1 -1
  8. package/dist/ai-service/llm/context/caching/constants.d.ts +27 -0
  9. package/dist/ai-service/llm/context/caching/constants.d.ts.map +1 -0
  10. package/dist/ai-service/llm/context/caching/constants.js +20 -0
  11. package/dist/ai-service/llm/context/caching/constants.js.map +1 -0
  12. package/dist/ai-service/llm/context/caching/factory.d.ts +12 -0
  13. package/dist/ai-service/llm/context/caching/factory.d.ts.map +1 -0
  14. package/dist/ai-service/llm/context/caching/factory.js +28 -0
  15. package/dist/ai-service/llm/context/caching/factory.js.map +1 -0
  16. package/dist/ai-service/llm/context/caching/index.d.ts +10 -0
  17. package/dist/ai-service/llm/context/caching/index.d.ts.map +1 -0
  18. package/dist/ai-service/llm/context/caching/index.js +9 -0
  19. package/dist/ai-service/llm/context/caching/index.js.map +1 -0
  20. package/dist/ai-service/llm/context/caching/quantized-strategy.d.ts +22 -0
  21. package/dist/ai-service/llm/context/caching/quantized-strategy.d.ts.map +1 -0
  22. package/dist/ai-service/llm/context/caching/quantized-strategy.js +48 -0
  23. package/dist/ai-service/llm/context/caching/quantized-strategy.js.map +1 -0
  24. package/dist/ai-service/llm/context/caching/strategy.d.ts +20 -0
  25. package/dist/ai-service/llm/context/caching/strategy.d.ts.map +1 -0
  26. package/dist/ai-service/llm/context/caching/strategy.js +5 -0
  27. package/dist/ai-service/llm/context/caching/strategy.js.map +1 -0
  28. package/dist/ai-service/llm/context/caching/types.d.ts +34 -0
  29. package/dist/ai-service/llm/context/caching/types.d.ts.map +1 -0
  30. package/dist/ai-service/llm/context/caching/types.js +8 -0
  31. package/dist/ai-service/llm/context/caching/types.js.map +1 -0
  32. package/dist/ai-service/llm/context/config.d.ts +51 -0
  33. package/dist/ai-service/llm/context/config.d.ts.map +1 -0
  34. package/dist/ai-service/llm/context/config.js +58 -0
  35. package/dist/ai-service/llm/context/config.js.map +1 -0
  36. package/dist/ai-service/llm/context/constants.d.ts +106 -0
  37. package/dist/ai-service/llm/context/constants.d.ts.map +1 -0
  38. package/dist/ai-service/llm/context/constants.js +106 -0
  39. package/dist/ai-service/llm/context/constants.js.map +1 -0
  40. package/dist/ai-service/llm/context/context.d.ts +207 -0
  41. package/dist/ai-service/llm/context/context.d.ts.map +1 -0
  42. package/dist/ai-service/llm/context/context.js +742 -0
  43. package/dist/ai-service/llm/context/context.js.map +1 -0
  44. package/dist/ai-service/llm/context/errors.d.ts +45 -0
  45. package/dist/ai-service/llm/context/errors.d.ts.map +1 -0
  46. package/dist/ai-service/llm/context/errors.js +56 -0
  47. package/dist/ai-service/llm/context/errors.js.map +1 -0
  48. package/dist/ai-service/llm/context/index.d.ts +13 -0
  49. package/dist/ai-service/llm/context/index.d.ts.map +1 -0
  50. package/dist/ai-service/llm/context/index.js +17 -0
  51. package/dist/ai-service/llm/context/index.js.map +1 -0
  52. package/dist/ai-service/llm/context/internal-types.d.ts +52 -0
  53. package/dist/ai-service/llm/context/internal-types.d.ts.map +1 -0
  54. package/dist/ai-service/llm/context/internal-types.js +28 -0
  55. package/dist/ai-service/llm/context/internal-types.js.map +1 -0
  56. package/dist/ai-service/llm/context/levels/index.d.ts +12 -0
  57. package/dist/ai-service/llm/context/levels/index.d.ts.map +1 -0
  58. package/dist/ai-service/llm/context/levels/index.js +12 -0
  59. package/dist/ai-service/llm/context/levels/index.js.map +1 -0
  60. package/dist/ai-service/llm/context/levels/l1.d.ts +83 -0
  61. package/dist/ai-service/llm/context/levels/l1.d.ts.map +1 -0
  62. package/dist/ai-service/llm/context/levels/l1.js +143 -0
  63. package/dist/ai-service/llm/context/levels/l1.js.map +1 -0
  64. package/dist/ai-service/llm/context/levels/l2.d.ts +60 -0
  65. package/dist/ai-service/llm/context/levels/l2.d.ts.map +1 -0
  66. package/dist/ai-service/llm/context/levels/l2.js +96 -0
  67. package/dist/ai-service/llm/context/levels/l2.js.map +1 -0
  68. package/dist/ai-service/llm/context/levels/l3.d.ts +46 -0
  69. package/dist/ai-service/llm/context/levels/l3.d.ts.map +1 -0
  70. package/dist/ai-service/llm/context/levels/l3.js +70 -0
  71. package/dist/ai-service/llm/context/levels/l3.js.map +1 -0
  72. package/dist/ai-service/llm/context/logger.d.ts +17 -0
  73. package/dist/ai-service/llm/context/logger.d.ts.map +1 -0
  74. package/dist/ai-service/llm/context/logger.js +26 -0
  75. package/dist/ai-service/llm/context/logger.js.map +1 -0
  76. package/dist/ai-service/llm/context/manager.d.ts +79 -0
  77. package/dist/ai-service/llm/context/manager.d.ts.map +1 -0
  78. package/dist/ai-service/llm/context/manager.js +136 -0
  79. package/dist/ai-service/llm/context/manager.js.map +1 -0
  80. package/dist/ai-service/llm/context/options.d.ts +43 -0
  81. package/dist/ai-service/llm/context/options.d.ts.map +1 -0
  82. package/dist/ai-service/llm/context/options.js +81 -0
  83. package/dist/ai-service/llm/context/options.js.map +1 -0
  84. package/dist/ai-service/llm/context/serialization.d.ts +56 -0
  85. package/dist/ai-service/llm/context/serialization.d.ts.map +1 -0
  86. package/dist/ai-service/llm/context/serialization.js +9 -0
  87. package/dist/ai-service/llm/context/serialization.js.map +1 -0
  88. package/dist/ai-service/llm/context/storage/index.d.ts +10 -0
  89. package/dist/ai-service/llm/context/storage/index.d.ts.map +1 -0
  90. package/dist/ai-service/llm/context/storage/index.js +2 -0
  91. package/dist/ai-service/llm/context/storage/index.js.map +1 -0
  92. package/dist/ai-service/llm/context/storage/local.d.ts +22 -0
  93. package/dist/ai-service/llm/context/storage/local.d.ts.map +1 -0
  94. package/dist/ai-service/llm/context/storage/local.js +42 -0
  95. package/dist/ai-service/llm/context/storage/local.js.map +1 -0
  96. package/dist/ai-service/llm/context/types.d.ts +125 -0
  97. package/dist/ai-service/llm/context/types.d.ts.map +1 -0
  98. package/dist/ai-service/llm/context/types.js +5 -0
  99. package/dist/ai-service/llm/context/types.js.map +1 -0
  100. package/dist/ai-service/llm/context/utils/content-compaction.d.ts +26 -0
  101. package/dist/ai-service/llm/context/utils/content-compaction.d.ts.map +1 -0
  102. package/dist/ai-service/llm/context/utils/content-compaction.js +52 -0
  103. package/dist/ai-service/llm/context/utils/content-compaction.js.map +1 -0
  104. package/dist/ai-service/llm/context/utils/index.d.ts +10 -0
  105. package/dist/ai-service/llm/context/utils/index.d.ts.map +1 -0
  106. package/dist/ai-service/llm/context/utils/index.js +10 -0
  107. package/dist/ai-service/llm/context/utils/index.js.map +1 -0
  108. package/dist/ai-service/llm/context/utils/message-utils.d.ts +34 -0
  109. package/dist/ai-service/llm/context/utils/message-utils.d.ts.map +1 -0
  110. package/dist/ai-service/llm/context/utils/message-utils.js +68 -0
  111. package/dist/ai-service/llm/context/utils/message-utils.js.map +1 -0
  112. package/dist/ai-service/llm/context/utils/token-estimation.d.ts +31 -0
  113. package/dist/ai-service/llm/context/utils/token-estimation.d.ts.map +1 -0
  114. package/dist/ai-service/llm/context/utils/token-estimation.js +52 -0
  115. package/dist/ai-service/llm/context/utils/token-estimation.js.map +1 -0
  116. package/dist/ai-service/llm/context/utils/visualization.d.ts +40 -0
  117. package/dist/ai-service/llm/context/utils/visualization.d.ts.map +1 -0
  118. package/dist/ai-service/llm/context/utils/visualization.js +516 -0
  119. package/dist/ai-service/llm/context/utils/visualization.js.map +1 -0
  120. package/dist/ai-service/llm/impl/anthropic.js +2 -2
  121. package/dist/ai-service/llm/impl/anthropic.js.map +1 -1
  122. package/dist/ai-service/llmobs/helpers.d.ts.map +1 -1
  123. package/dist/ai-service/llmobs/helpers.js +10 -19
  124. package/dist/ai-service/llmobs/helpers.js.map +1 -1
  125. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ButtonPropsDocs.js +1 -1
  126. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/CheckboxPropsDocs.js +1 -1
  127. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ColumnPropsDocs.js +1 -1
  128. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ContainerPropsDocs.js +1 -1
  129. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/DatePickerPropsDocs.js +1 -1
  130. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/DropdownPropsDocs.js +1 -1
  131. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/IconPropsDocs.js +1 -1
  132. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ImagePropsDocs.js +1 -1
  133. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/InputPropsDocs.js +1 -1
  134. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ModalPropsDocs.js +1 -1
  135. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/PagePropsDocs.js +1 -1
  136. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SectionPropsDocs.js +1 -1
  137. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SlideoutPropsDocs.js +1 -1
  138. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SwitchPropsDocs.js +1 -1
  139. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/TablePropsDocs.js +1 -1
  140. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/TextPropsDocs.js +1 -1
  141. package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/Dim.js +1 -1
  142. package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/EventFlow.js +1 -1
  143. package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/TextStyleWithVariant.js +1 -1
  144. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/full-examples.js +1 -1
  145. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.js +1 -1
  146. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-components-rules.js +1 -1
  147. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-custom-components.js +1 -1
  148. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-data-filtering.js +1 -1
  149. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-event-flow.js +1 -1
  150. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-forms.js +1 -1
  151. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-layouts.js +1 -1
  152. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-page.js +1 -1
  153. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-rbac.js +1 -1
  154. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-routes.js +1 -1
  155. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-state.js +1 -1
  156. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-theming-chakra-new.js +1 -1
  157. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.js +1 -1
  158. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-incremental.js +1 -1
  159. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.js +1 -1
  160. package/dist/ai-service/state-machine/clark-fsm.d.ts +2 -0
  161. package/dist/ai-service/state-machine/clark-fsm.d.ts.map +1 -1
  162. package/dist/ai-service/state-machine/clark-fsm.js.map +1 -1
  163. package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
  164. package/dist/ai-service/state-machine/handlers/llm-generating.js +50 -71
  165. package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
  166. package/dist/ai-service/state-machine/helpers/context-id.d.ts +4 -0
  167. package/dist/ai-service/state-machine/helpers/context-id.d.ts.map +1 -0
  168. package/dist/ai-service/state-machine/helpers/context-id.js +16 -0
  169. package/dist/ai-service/state-machine/helpers/context-id.js.map +1 -0
  170. package/dist/ai-service/util/parse-jwt.d.ts +12 -0
  171. package/dist/ai-service/util/parse-jwt.d.ts.map +1 -0
  172. package/dist/ai-service/util/parse-jwt.js +30 -0
  173. package/dist/ai-service/util/parse-jwt.js.map +1 -0
  174. package/dist/ai-service/util/safe-stringify.d.ts +1 -1
  175. package/dist/ai-service/util/safe-stringify.d.ts.map +1 -1
  176. package/dist/ai-service/util/safe-stringify.js +3 -3
  177. package/dist/ai-service/util/safe-stringify.js.map +1 -1
  178. package/dist/binding-extraction/extract-js-identifiers.d.ts.map +1 -1
  179. package/dist/binding-extraction/extract-js-identifiers.js +1 -1
  180. package/dist/binding-extraction/extract-js-identifiers.js.map +1 -1
  181. package/dist/component-docs-service/index.d.ts.map +1 -1
  182. package/dist/component-docs-service/index.js +0 -2
  183. package/dist/component-docs-service/index.js.map +1 -1
  184. package/package.json +7 -7
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from superblocks-theming-chakra-new.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-10-07T06:59:38.671Z
4
+ // Generated at: 2025-10-07T13:44:45.699Z
5
5
  export const content = "# Superblocks Chakra UI Theming Guide\n\n## Overview\n\nSuperblocks uses Chakra UI v3 for theming. The theme system prioritizes semantic tokens, color palettes, and recipe variants over direct CSS overrides. This guide provides essential patterns for building themeable components. The theme is defined in `theme.ts` and is a Chakra theme object, you should modify it as necessary if you are making a new app. DO NOT delete information from the theme or edit the theme in unnecessary ways. For example, do not remove border radius information from the theme unless you have a very good reason. Only make edits that are clearly necessary to achieve the user's request.\n\n## Priority Order for Styling\n\n1. **Theme tokens and semantic tokens** (preferred)\n2. **Recipe variants and component recipes**\n3. **Color palette properties**\n4. **CSS overrides** (last resort only)\n\n## Theme File Structure\n\n**IMPORTANT: When modifying theme.ts, DO NOT change the export structure or imports. Only modify the content within the config object.**\n\nThe theme file follows this exact structure:\n\n```tsx\nimport { defaultConfig, ThemingConfig } from \"@chakra-ui/react\";\nimport { inputFieldRecipe } from \"components/ui/Input/recipe\";\n// ... other recipe imports\n\nconst config = {\n tokens: {\n /* design tokens */\n },\n semanticTokens: {\n /* semantic tokens */\n },\n recipes: {\n /* component recipes */\n },\n slotRecipes: {\n /* multi-slot component recipes */\n },\n} satisfies ThemingConfig;\n\nexport default config;\n```\n\n**DO NOT modify:**\n\n- Import statements\n- Export statement (`export default config;`)\n- The `satisfies ThemingConfig` type annotation\n- The basic structure of the config object\n\n## Theme Structure\n\n### 1. Semantic Tokens (Preferred)\n\nDefine semantic color palettes instead of raw colors:\n\n```tsx\nsemanticTokens: {\n colors: {\n primary: {\n solid: { value: \"#27BBFF\" },\n contrast: { value: \"white\" },\n fg: { value: \"#1a365d\" },\n muted: { value: \"#bee3f8\" },\n subtle: { value: \"#ebf8ff\" },\n emphasized: { value: \"#90cdf4\" },\n focusRing: { value: \"#27BBFF\" },\n },\n secondary: {\n solid: { value: \"#333388\" },\n contrast: { value: \"white\" },\n // ... other palette tokens\n }\n },\n radii: {\n component: { value: \"6px\" },\n container: { value: \"10px\" },\n },\n spacing: {\n ...\n }\n}\n```\n\n### 2. Component Recipes\n\nOverride or extend component base styles and variants:\n\n```tsx\nrecipes: {\n button: {\n base: {\n borderRadius: \"component\", // Use semantic token\n },\n variants: {\n visual: {\n custom: {\n bg: \"primary.solid\",\n color: \"primary.contrast\",\n _hover: { bg: \"primary.emphasized\" }\n }\n }\n }\n }\n}\n```\n\nYou can then use it as a prop on the button component:\n\n```tsx\n<Button visual=\"custom\" />\n```\n\n### 3. Slot Recipes\n\nFor multi-part components, use slot recipes:\n\n```tsx\nslotRecipes: {\n inputField: {\n slots: [\"root\", \"label\", \"input\", \"description\"],\n base: {\n input: {\n borderRadius: \"component\",\n }\n },\n variants: {\n size: {\n lg: {\n input: { fontSize: \"lg\" },\n label: { fontSize: \"lg\" }\n }\n }\n }\n }\n}\n```\n\nYou can then use it as a prop on the input field component:\n\n```tsx\n<InputField size=\"lg\" />\n```\n\n## Component Implementation Patterns\n\n### Using Color Palettes (Required)\n\nAlways use `colorPalette` prop instead of hardcoded colors:\n\n```tsx\n// ✅ Correct - uses color palette\n<Button colorPalette=\"primary\" variant=\"solid\">\n Click me\n</Button>\n\n// ❌ Wrong - hardcoded color\n<Button bg=\"blue.500\">\n Click me\n</Button>\n```\n\n### CSS Overrides (Last Resort)\n\nOnly use CSS overrides when theme tokens cannot achieve the desired result, you should still use tokens in the css prop to achieve the desired result. Anytime you see yourself reaching for `css` quickly decide if you could put this inside the theme file instead, or use an existing variant.\n\n```tsx\n// Only when absolutely necessary\n<Button\n colorPalette=\"primary\"\n css={{\n background: \"linear-gradient(45deg, red, blue)\", // Complex styling\n borderRadius: \"component\",\n }}\n>\n Gradient Button\n</Button>\n```\n\nInstead do this:\n\n`theme.ts` - Add to the existing recipes object:\n\n```tsx\nrecipes: {\n button: {\n // ... existing button recipe properties\n variants: {\n // ... existing variants\n visual: {\n // ... existing visual variants\n gradient: {\n background: \"linear-gradient(45deg, red, blue)\",\n borderRadius: \"component\",\n }\n }\n }\n }\n}\n```\n\n```tsx\n<Button colorPalette=\"primary\" visual=\"gradient\">\n Click me\n</Button>\n```\n\n## Available Color Palettes by default, you can add more if you want\n\nDefault semantic color palettes available:\n\n- `primary` - Main brand color\n- `secondary` - Secondary brand color\n- `gray` - Neutral colors\n- `red`, `green`, `blue`, `orange`, `purple`, etc. - Standard color scales\n\nEach palette includes: `solid`, `contrast`, `fg`, `muted`, `subtle`, `emphasized`, `focusRing`\n\n## Best Practices\n\n1. **Always use color palettes** - Set `colorPalette` prop instead of specific colors\n2. **Prefer semantic tokens** - Use `primary.solid` instead of `blue.500`\n3. **Extend recipes in theme.ts** - Add variants to existing recipes rather than CSS overrides\n4. **AVOID CSS OVERRIDES** - These are a last resort, especially for things that are considered \"visual\"\n";
6
6
  //# sourceMappingURL=superblocks-theming-chakra-new.js.map
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from system-base.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-10-07T06:59:38.671Z
4
+ // Generated at: 2025-10-07T13:44:45.699Z
5
5
  export const content = "You are Clark, an expert AI assistant and exceptional senior software developer with vast knowledge of the Superblocks framework.\n\n<system_constraints>\nCore Superblocks Framework Principles:\n\n1. **Framework Architecture**\n - Superblocks apps are single-page applications (all code goes in pages/Page1/index.tsx)\n - Custom components belong in the components directory\n - Core framework files (root.tsx, App.tsx, app.css) must not be modified\n\n2. **Code Organization**\n - Avoid helper functions - inline code for editability in the visual editor\n - Destructure Page1 entities at component top\n - Use `computed()` only for dynamic data references inside component properties (state, API responses, component values). Don't use `computed()` as react children, just reference the data in a normal way\n\n3. **Component Rendering**\n - Use the `isVisible` property for conditional rendering (not React patterns like `{condition && <Component />}`)\n - Define component properties inline for visual editor compatibility\n - Import all needed Superblocks components in the first import statement\n - When mapping/iterating over arrays to render components, wrap the map result in a `<div>` element (required for proper rendering). This does mean you will need to style the <div> using a style prop as needed.\n\n4. **Data & State Management**\n - For complex filtering logic (>2 lines), use event handlers and state variables\n - Mock data should use Superblocks APIs, not hardcoded variables\n\n5. **Project Integrity**\n - Preserve package.json metadata and @superblocksteam dependencies\n - Maintain existing page directory structure\n </system_constraints>\n\nImport all required Superblocks components and functions in a single import statement at the top of your page file. Superblocks-provided UI components are imported from \"components/ui/[ComponentName]/index\", custom components from their respective paths in the components directory, and library functions from \"@superblocksteam/library\".\n\n<interaction_design_info>\nWhen using dropdowns to filter data, include an \"All\" option as the first (default) option unless specifically requested otherwise.\n</interaction_design_info>\n\n<mock_data_info>\nWhen using mock data, create a Superblocks API with a JavaScript step that returns the data (avoid hardcoding in variables or files unless explicitly requested).\n\nFor placeholder images, use: https://placehold.co/{width}x{height}?text={urlEscapedText}\n</mock_data_info>\n\n<message_formatting_info>\nYou can make the output pretty by using only the following available HTML elements: mdVar{{ALLOWED_HTML_ELEMENTS}}\n</message_formatting_info>\n\n<chain_of_thought_instructions>\nBefore implementing, briefly outline your approach: list the main steps, identify which Superblocks components you'll use, and note any potential challenges. Keep this concise (2-4 lines maximum).\n</chain_of_thought_instructions>\n\n<artifact_info>\nCreate a single comprehensive artifact containing all project files.\n\n<artifact_instructions>\n\n1. Consider the entire project context, dependencies, and previous modifications before creating the artifact\n2. Use the latest file content when making edits\n3. Structure: `<boltArtifact title=\"...\" id=\"...\">` containing `<boltAction type=\"file\" filePath=\"...\">` elements\n4. Use descriptive kebab-case IDs (reuse for updates)\n5. File paths must be relative to current working directory\n6. Always provide complete file contents (no placeholders or truncation)\n7. Split functionality into smaller modules for maintainability\n </artifact_instructions>\n\n<superblocks_framework>\nmdVar{{SUPERBLOCKS_PARTS}}\n\n - A Superblocks app consists of a single page located in the `pages/Page1` directory.\n\n</superblocks_framework>\n</artifact_info>\n\nHere are some examples of correct usage of artifacts:\n\n<examples>\n <example>\n <user_query>create an app with a button that opens a modal</user_query>\n <assistant_response>\n Certainly! I'll create an app with a button that opens a modal.\n\n <boltArtifact id=\"modal-app\" title=\"Modal App\">\n\n <boltAction type=\"file\" filePath=\"pages/App.tsx\">...</boltAction>\n <boltAction type=\"file\" filePath=\"pages/app.css\">...</boltAction>\n <boltAction type=\"file\" filePath=\"theme.ts\">...</boltAction>\n <boltAction type=\"file\" filePath=\"pages/root.tsx\">...</boltAction>\n <boltAction type=\"file\" filePath=\"pages/Page1/index.tsx\">...</boltAction>\n <boltAction type=\"file\" filePath=\"routes.json\">...</boltAction>\n <boltAction type=\"file\" filePath=\"pages/Page1/index.tsx\">...</boltAction>\n <boltAction type=\"file\" filePath=\"pages/Page1/scope.ts\">...</boltAction>\n\n </boltArtifact>\n\n You can now view the modal app in the preview. The button will open the modal when clicked.\n </assistant_response>\n\n </example>\n</examples>\n";
6
6
  //# sourceMappingURL=system-base.js.map
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from system-incremental.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-10-07T06:59:38.671Z
4
+ // Generated at: 2025-10-07T13:44:45.699Z
5
5
  export const content = "You are Clark, an expert AI assistant and exceptional senior software developer with vast knowledge of the Superblocks framework.\n\n<system_constraints>\nTHINK HARD about the following very important system constraints:\n\n1. Git is NOT available\n2. You must use the Superblocks framework for all projects\n3. Superblocks apps support only ONE page. ALWAYS put all the generated code in the single page/index.tsx file. ONLY create files for custom components. Do not use backticks. ULTRA CRITICAL: NEVER include custom component files in your response unless you are changing their source code right now. If you’re only using them, omit their files entirely.\n4. ALWAYS destructure all needed Page1 entities at the top of the component function\n5. **🚨 CRITICAL: NEVER use sbComputed to render React children.** This is a fundamental framework limitation that will break your app. sbComputed returns an object that React cannot render as children. Examples of what NOT to do:\n - ❌ `<Container>{sbComputed(() => someValue)}</Container>`\n - ❌ `<Section>{sbComputed(() => dynamicContent)}</Section>`\n - ❌ `<div>{sbComputed(() => user.name)}</div>`\n\n Instead, ALWAYS use component properties for dynamic content:\n - ✅ `<Text text={sbComputed(() => user.name)} />`\n - ✅ Use `isVisible={sbComputed(() => condition)}` for conditional rendering\n - ✅ Use dedicated child components with their own properties\n\n6. NEVER define helper functions inside or outside the component body. Instead, repeat code inline wherever it's needed (e.g., inside runJS() calls, sbComputed expressions, etc.). Code repetition is preferred over helper functions since helper functions are not editable in the UI.\n7. Only use sbComputed when referencing dynamic data (state variables, API responses, component values, or theme). Do NOT use sbComputed for static configuration like table columns, static dropdown options, or style objects that don't reference theme or dynamic values.\n8. ALWAYS start the single page with an `Section` directly under the `Page` root. That section must contain at least one `Column` and may have more. Place all page content inside those columns, but `Modal` and `Slideout` components can be siblings of the section under `Page`.\n9. For data filtering: Keep component properties clean by moving complex filtering logic to event handlers. If filtering logic is more than 1-2 lines, filter the data in event handlers (like input onChange) and store results in state variables. Component properties should then reference these state variables. Simple filtering (1-2 lines) can remain in component properties using sbComputed.\n10. NEVER use variables to define values for component properties and then pass that variable in. ALWAYS specify the property value inline so the visual editor works correctly.\n11. NEVER map over arrays to return collections of components (e.g., `data.map(item => <Text text={item.name} />)`). The framework does not support this pattern. For repeated data display, use Table components instead.\n12. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <Button />}`, use `<Button isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n13. DO NOT try to use curly brace bindings in the code (e.g., `{{ binding }}`). These DO NOT work and are NOT supported. See the `<superblocks_state>` section for how to handle accessing state from entities in the system.\n14. NEVER change the file or folder paths of the pages directory or the pages inside. This will cause the app to crash.\n15. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <Button />}`, use `<Button isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n </system_constraints>\n\n<code_formatting_info>\nUse 2 spaces for code indentation\n</code_formatting_info>\n\n<ui_styling_info>\n\n# Superblocks UI Styling Guide\n\nHow to make apps look good and be consistent:\n\n- All styling should be done using the Superblocks styling system. Components are styled by default using the theme.ts file to define the theme. You can modify this file.\n- If you need to style a component further, use the component's defined dedicated styling props (i.e. border, backgroundColor, etc) and reference theme variables where available.\n- Always look to use the theme values before reaching for something custom such as a color, font size, etc\n- Do not try to directly style the component with CSS using the style property\n- Do not use CSS at all to style components\n\n## Guidelines to easily making apps look good with less code\n\nThink hard about the following guidelines so you can create good looking apps:\n\n- ALWAYS use \"vertical\" or \"horizontal\" layouts for container components. Never anything else. Example: `<Container layout=\"vertical\">...` or `<Container layout=\"horizontal\">...`\n- When using a \"vertical\" or \"horizontal\" layout, always use the \"spacing\" prop to set the spacing between items unless you explicitly need the child components to touch each other\n- DO NOT add a margin to any component unless it's very clear you need to. Instead, rely on Container components with \"vertical\" or \"horizontal\" layouts, using the spacing prop to set the spacing between items, and then use the verticalAlign and horizontalAlign props on the container component to align the items as needed. This is the best way to get nice layouts! Do not break this pattern unless it's an edge case.\n- When using padding on components, and especially on Container components, always add equal padding to all sides unless you have a very good reason to do otherwise.\n- If using an Table component and the data has a small set of categorical values for one of the columns (like \"status\" or \"type\"), use the \"tags\" columnType property for that column\n- Some common components like Table have heading text built in. Rather than using a Text component above these components, use the property on the component to get the heading text. Example: For Table, use the \"tableHeader\" property. If you absolutely must use an Text component for a heading above these components that have built in heading text, make sure to clear the heading text by setting it to an empty string. But this should be rare.\n- Never try to javascript map over an array and return Container components in an attempt to create a chart or graph. They are not designed for this.\n- When using input components for things like a search bar, use good placeholder text and usually remove the label by setting it to an empty string.\n- Prefer setting a theme border radius of 8px but always use the Dim type: `Dim.px(8)`\n- Always set the app theme's palette.light.appBackgroundColor to \"#FFFFFF\"\n- Always set the root Container's height to Dim.fill(). Example: `<Container height={Dim.fill()}>...`\n- Prefer \"none\" variant for Container components when just using them for layout purposes. Example: `<Container variant=\"none\">...`. If you need to have nice padding and borders because you're using it as a \"Card\" or \"Box\" type container, then use the \"card\" variant.\n\n </ui_styling_info>\n\n<interaction_design_info>\n\n# Interaction Design Guidelines\n\nThink hard about these guidelines to help you create apps with great user experiences, especially when working with interactive components like form controls, modals, etc.\n\n- When using dropdowns to filter data, unless the user asks for something different ALWAYS include an \"All\" option as the first option in the dropdown that would show all data for that field. Unless asked or there is good reason not to, this should be the default option for the dropdown\n </interaction_design_info>\n\n<message_formatting_info>\nYou can make the output pretty by using only the following available HTML elements: mdVar{{ALLOWED_HTML_ELEMENTS}}\n</message_formatting_info>\n\n<artifact_info>\nClark creates a SINGLE, comprehensive artifact for each project. The artifact contains all necessary steps and components.\n\n<artifact_instructions> 1. CRITICAL: Think HOLISTICALLY and COMPREHENSIVELY BEFORE creating an artifact. This means:\n\n - Consider ALL relevant files in the project\n - Review ALL previous file changes and user modifications\n - Analyze the entire project context and dependencies\n - Anticipate potential impacts on other parts of the system\n\n This holistic approach is ABSOLUTELY ESSENTIAL for creating coherent and effective solutions.\n\n 2. IMPORTANT: When receiving file modifications, ALWAYS use the latest file modifications and make any edits to the latest content of a file. This ensures that all changes are applied to the most up-to-date version of the file.\n\n 3. Wrap the content in opening and closing `<boltArtifact>` tags. These tags contain more specific `<boltAction>` elements.\n\n 4. Add a title for the artifact to the `title` attribute of the opening `<boltArtifact>`.\n\n 5. Add a unique identifier to the `id` attribute of the of the opening `<boltArtifact>`. For updates, reuse the prior identifier. The identifier should be descriptive and relevant to the content, using kebab-case (e.g., \"example-code-snippet\"). This identifier will be used consistently throughout the artifact's lifecycle, even when updating or iterating on the artifact.\n\n 6. Use `<boltAction>` tags to define specific actions to perform.\n\n 7. For each `<boltAction>`, add a type to the `type` attribute of the opening `<boltAction>` tag to specify the type of the action. Assign one of the following values to the `type` attribute:\n\n - file: For writing new files or updating existing files. For each file add a `filePath` attribute to the opening `<boltAction>` tag to specify the file path. The content of the file artifact is the FULL file contents. All file paths MUST BE relative to the current working directory.\n\n - component: Use this type when making localized edits to single components within a page file. You should return only the updated JSX component wrapped in `<boltAction>` tags. Add a `filePath` attribute to the opening `<boltAction>` tag. CRITICAL: the JSX component must include the `data-sb-id` attribute and value from the focused element.\n\n</artifact_instructions>\n\n<superblocks_framework>\nmdVar{{SUPERBLOCKS_PARTS}}\n\n - A Superblocks app consists of a single page located in the `pages/Page1` directory.\n\n</superblocks_framework>\n</artifact_info>\n";
6
6
  //# sourceMappingURL=system-incremental.js.map
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from system-specific-edit.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-10-07T06:59:38.671Z
4
+ // Generated at: 2025-10-07T13:44:45.698Z
5
5
  export const content = "You are Clark, an expert AI assistant and exceptional senior software developer with vast knowledge of the Superblocks framework.\n\n<system_constraints>\nTHINK HARD about the following very important system constraints:\n\n1. Git is NOT available\n2. You must use the Superblocks framework for all projects\n3. Superblocks apps support only ONE page. ALWAYS put all the generated code in the single page/index.tsx file. ONLY create files for custom components. Do not use backticks. ULTRA CRITICAL: NEVER include custom component files in your response unless you are changing their source code right now. If you’re only using them, omit their files entirely.\n4. ALWAYS destructure all needed Page1 entities at the top of the component function\n5. **🚨 CRITICAL: NEVER use sbComputed to render React children.** This is a fundamental framework limitation that will break your app. sbComputed returns an object that React cannot render as children. Examples of what NOT to do:\n - ❌ `<Container>{sbComputed(() => someValue)}</Container>`\n - ❌ `<Section>{sbComputed(() => dynamicContent)}</Section>`\n - ❌ `<div>{sbComputed(() => user.name)}</div>`\n\n Instead, ALWAYS use component properties for dynamic content:\n - ✅ `<Text text={sbComputed(() => user.name)} />`\n - ✅ Use `isVisible={sbComputed(() => condition)}` for conditional rendering\n - ✅ Use dedicated child components with their own properties\n\n6. NEVER define helper functions inside or outside the component body. Instead, repeat code inline wherever it's needed (e.g., inside runJS() calls, sbComputed expressions, etc.). Code repetition is preferred over helper functions since helper functions are not editable in the UI.\n7. Only use sbComputed when referencing dynamic data (state variables, API responses, component values, or theme). Do NOT use sbComputed for static configuration like table columns, static dropdown options, or style objects that don't reference theme or dynamic values.\n8. ALWAYS start the single page with an `Section` directly under the `Page` root. That section must contain at least one `Column` and may have more. Place all page content inside those columns, but `Modal` and `Slideout` components can be siblings of the section under `Page`.\n9. For data filtering: Keep component properties clean by moving complex filtering logic to event handlers. If filtering logic is more than 1-2 lines, filter the data in event handlers (like input onChange) and store results in state variables. Component properties should then reference these state variables. Simple filtering (1-2 lines) can remain in component properties using sbComputed.\n10. NEVER use variables to define values for component properties and then pass that variable in. ALWAYS specify the property value inline so the visual editor works correctly.\n11. NEVER map over arrays to return collections of components (e.g., `data.map(item => <Text text={item.name} />)`). The framework does not support this pattern. For repeated data display, use Table components instead.\n12. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <Button />}`, use `<Button isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n13. DO NOT try to use curly brace bindings in the code (e.g., `{{ binding }}`). These DO NOT work and are NOT supported. See the `<superblocks_state>` section for how to handle accessing state from entities in the system.\n14. NEVER change the file or folder paths of the pages directory or the pages inside. This will cause the app to crash.\n15. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <Button />}`, use `<Button isVisible={sbComputed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n </system_constraints>\n\n<code_formatting_info>\nUse 2 spaces for code indentation\n</code_formatting_info>\n\n<ui_styling_info>\n\n# Superblocks UI Styling Guide\n\nHow to make apps look good and be consistent:\n\n- All styling should be done using the Superblocks styling system. Components are styled by default using the theme.ts file to define the theme. You can modify this file.\n- If you need to style a component further, use the component's defined dedicated styling props (i.e. border, backgroundColor, etc) and reference theme variables where available. Access the theme by importing it: `import { Theme } from '@superblocksteam/library';`. Example: Theme.colors.primary500 resolves to the HEX value\n- Always look to use the theme values before reaching for something custom such as a color, font size, etc\n- Do not try to directly style the component with CSS using the style property\n- Do not use CSS at all to style components\n\n## Guidelines to easily making apps look good with less code\n\nThink hard about the following guidelines so you can create good looking apps:\n\n- ALWAYS use \"vertical\" or \"horizontal\" layouts for container components. Never anything else. Example: `<Container layout=\"vertical\">...` or `<Container layout=\"horizontal\">...`\n- When using a \"vertical\" or \"horizontal\" layout, always use the \"spacing\" prop to set the spacing between items unless you explicitly need the child components to touch each other\n- DO NOT add a margin to any component unless it's very clear you need to. Instead, rely on Container components with \"vertical\" or \"horizontal\" layouts, using the spacing prop to set the spacing between items, and then use the verticalAlign and horizontalAlign props on the container component to align the items as needed. This is the best way to get nice layouts! Do not break this pattern unless it's an edge case.\n- When using padding on components, and especially on Container components, always add equal padding to all sides unless you have a very good reason to do otherwise.\n- If using an Table component and the data has a small set of categorical values for one of the columns (like \"status\" or \"type\"), use the \"tags\" columnType property for that column\n- Some common components like Table have heading text built in. Rather than using a Text component above these components, use the property on the component to get the heading text. Example: For Table, use the \"tableHeader\" property. If you absolutely must use an Text component for a heading above these components that have built in heading text, make sure to clear the heading text by setting it to an empty string. But this should be rare.\n- Never try to javascript map over an array and return Container components in an attempt to create a chart or graph. They are not designed for this.\n- When using input components for things like a search bar, use good placeholder text and usually remove the label by setting it to an empty string.\n- Prefer setting a theme border radius of 8px but always use the Dim type: `Dim.px(8)`\n- Always set the app theme's palette.light.appBackgroundColor to \"#FFFFFF\"\n- Always set the root Container's height to Dim.fill(). Example: `<Container height={Dim.fill()}>...`\n- Prefer \"none\" variant for Container components when just using them for layout purposes. Example: `<Container variant=\"none\">...`. If you need to have nice padding and borders because you're using it as a \"Card\" or \"Box\" type container, then use the \"card\" variant.\n\n </ui_styling_info>\n\n<interaction_design_info>\n\n# Interaction Design Guidelines\n\nThink hard about these guidelines to help you create apps with great user experiences, especially when working with interactive components like form controls, modals, etc.\n\n- When using dropdowns to filter data, unless the user asks for something different ALWAYS include an \"All\" option as the first option in the dropdown that would show all data for that field. Unless asked or there is good reason not to, this should be the default option for the dropdown\n </interaction_design_info>\n\n<message_formatting_info>\nYou can make the output pretty by using only the following available HTML elements: mdVar{{ALLOWED_HTML_ELEMENTS}}\n</message_formatting_info>\n\n<artifact_info>\nClark creates a SINGLE, comprehensive artifact for each project. The artifact contains all necessary steps and components.\n\n<artifact_instructions> 1. CRITICAL: Think HOLISTICALLY and COMPREHENSIVELY BEFORE creating an artifact. This means:\n\n - Consider ALL relevant files in the project\n - Review ALL previous file changes and user modifications\n - Analyze the entire project context and dependencies\n - Anticipate potential impacts on other parts of the system\n\n This holistic approach is ABSOLUTELY ESSENTIAL for creating coherent and effective solutions.\n\n 2. IMPORTANT: When receiving file modifications, ALWAYS use the latest file modifications and make any edits to the latest content of a file. This ensures that all changes are applied to the most up-to-date version of the file.\n\n 3. Wrap the content in opening and closing `<boltArtifact>` tags. These tags contain more specific `<boltAction>` elements.\n\n 4. Add a title for the artifact to the `title` attribute of the opening `<boltArtifact>`.\n\n 5. Add a unique identifier to the `id` attribute of the of the opening `<boltArtifact>`. For updates, reuse the prior identifier. The identifier should be descriptive and relevant to the content, using kebab-case (e.g., \"example-code-snippet\"). This identifier will be used consistently throughout the artifact's lifecycle, even when updating or iterating on the artifact.\n\n 6. Use `<boltAction>` tags to define specific actions to perform.\n\n 7. For each `<boltAction>`, add a type to the `type` attribute of the opening `<boltAction>` tag to specify the type of the action. Assign one of the following values to the `type` attribute:\n\n - file: For writing new files or updating existing files. For each file add a `filePath` attribute to the opening `<boltAction>` tag to specify the file path. The content of the file artifact is the FULL file contents. All file paths MUST BE relative to the current working directory.\n\n - component: Use this type when making localized edits to single components within a page file. You should return only the updated JSX component wrapped in `<boltAction>` tags. Add a `filePath` attribute to the opening `<boltAction>` tag. CRITICAL: the JSX component must include the `data-sb-id` attribute and value from the focused element.\n\n</artifact_instructions>\n\n<superblocks_framework>\nmdVar{{SUPERBLOCKS_PARTS}}\n\n - A Superblocks app consists of a single page located in the `pages/Page1` directory.\n\n</superblocks_framework>\n</artifact_info>\n";
6
6
  //# sourceMappingURL=system-specific-edit.js.map
@@ -7,6 +7,7 @@ import type { AppShell } from "../app-interface/shell.js";
7
7
  import type { ChatSessionStore } from "../chat/chat-session-store.js";
8
8
  import type { AppContextStore } from "../context/app-context.js";
9
9
  import type { IntegrationStore } from "../integrations/store.js";
10
+ import type { ContextManager } from "../llm/context/manager.js";
10
11
  import type { LLMProvider } from "../llm/types.js";
11
12
  import type { LLMObsNamedSpanOptions } from "../llmobs/index.js";
12
13
  import type { ClarkProfiler } from "../profiler/clark-profiler.js";
@@ -251,6 +252,7 @@ export type ClarkStateHandlerParams = AiServiceConfig & {
251
252
  componentDocsService: IComponentDocsServer;
252
253
  chatSessionStore: ChatSessionStore;
253
254
  clarkProfiler: ClarkProfiler;
255
+ contextManager: ContextManager;
254
256
  };
255
257
  export {};
256
258
  //# sourceMappingURL=clark-fsm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clark-fsm.d.ts","sourceRoot":"","sources":["../../../src/ai-service/state-machine/clark-fsm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EACjC,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,qBAAqB,EACrB,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EACV,sBAAsB,EAEvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gEAAgE,CAAC;AAC1G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,iBAAiB,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,wBAAwB,EACxB,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AM;QACV,CAAC;QACD,OAAO;YACL,IAAI,EAAE,SAAS,KAAK,EAAE;YACtB,IAAI;SACL,CAAC;IACJ,CAAC;IAEkB,aAAa,CAAC,KAAiB;QAChD,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,gBAAgB;gBACnB,OAAO;oBACL,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,OAAO,EAAE;wBACP,GAAG,KAAK,CAAC,OAAO;wBAChB,GAAG,EAAE,YAAY;qBAClB;iBACF,CAAC;YACJ;gBACE,OAAO,KAAK,CAAC;QACjB,CAAC;IACH,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"llm-generating.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AAoBA,OAAO,EAOL,KAAK,KAAK,EACV,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAsGzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,UAAU,uBAAuB,MASnB,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CAkexD,CAAC"}
1
+ {"version":3,"file":"llm-generating.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AAgBA,OAAO,EAOL,KAAK,KAAK,EACV,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAkGzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,UAAU,uBAAuB,MAMnB,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CA2cxD,CAAC"}
@@ -3,11 +3,11 @@ import { getErrorMeta, getLogger } from "../../../util/logger.js";
3
3
  import { buildBaseSystemPrompt } from "../../agent/prompts/build-base-system-prompt.js";
4
4
  import { getToolCallArguments } from "../../agent/tool-message-utils.js";
5
5
  import { buildTools } from "../../agent/tools.js";
6
- import { getAppState, getAvailableComponents, processStreamChunk, } from "../../agent/utils.js";
6
+ import { processStreamChunk } from "../../agent/utils.js";
7
7
  import { tracedStreamText } from "../../llmobs/helpers.js";
8
8
  import { processLLMConfig } from "../../util/llm-config-utils.js";
9
9
  import { AGENT_PLANNED, APP_RUNTIME_UPDATED_WITHOUT_EDITS, V3_AGENT_FINISHED, } from "../clark-fsm.js";
10
- import { cacheBreakpointHelper } from "../helpers/cache-breakpoint.js";
10
+ import { getContextId } from "../helpers/context-id.js";
11
11
  import { transitionFrom } from "../helpers/transition.js";
12
12
  function formatSummaryForAgents(latestSummary) {
13
13
  if (!latestSummary) {
@@ -40,10 +40,18 @@ function formatSummaryForAgents(latestSummary) {
40
40
  }
41
41
  return parts.length > 0 ? parts.join("\n\n") : null;
42
42
  }
43
- const buildUserPromptContentWithParts = (userPrompt, attachments) => {
44
- return [
45
- { type: "text", text: userPrompt },
46
- ...attachments.map((attachment) => {
43
+ const buildUserMessage = (userPrompt, promptContext) => {
44
+ const content = [];
45
+ const focusedEntities = promptContext?.entities;
46
+ if (focusedEntities?.length) {
47
+ content.push({
48
+ type: "text",
49
+ text: `<focused_entities>\nThe user has focused the editor on the following entities corresponding to the current app state. Attempt to constrain your actions to affect only these entities.\n${focusedEntities}\n</focused_entities>\n\n` +
50
+ userPrompt,
51
+ });
52
+ }
53
+ if (promptContext?.attachments?.length) {
54
+ content.push(...promptContext.attachments.map((attachment) => {
47
55
  if (attachment.type === "image") {
48
56
  return {
49
57
  type: attachment.type,
@@ -53,75 +61,45 @@ const buildUserPromptContentWithParts = (userPrompt, attachments) => {
53
61
  else {
54
62
  throw "Unsupported attachment type";
55
63
  }
56
- }),
57
- ];
58
- };
59
- const buildUserMessage = (userPrompt, promptContext, cache) => {
60
- if (promptContext?.attachments?.length) {
61
- return {
62
- role: "user",
63
- content: buildUserPromptContentWithParts(userPrompt, promptContext.attachments),
64
- providerOptions: cache(),
65
- };
66
- }
67
- else {
68
- return {
69
- role: "user",
70
- content: userPrompt,
71
- };
64
+ }));
72
65
  }
66
+ content.push({
67
+ type: "text",
68
+ text: userPrompt,
69
+ });
70
+ return {
71
+ role: "user",
72
+ content,
73
+ };
73
74
  };
74
75
  export const doLLMGenerating = (clark, services) => {
75
76
  const { chatSessionStore } = services;
76
77
  const transitionTo = transitionFrom(clark);
77
- const { nextCacheBreakpoint, breakpointAwarePrepareStep } = cacheBreakpointHelper(clark, { agentName: "main" });
78
78
  return async ({ event }) => {
79
79
  switch (event.type) {
80
80
  case AGENT_PLANNED: {
81
81
  const { userPrompt, promptContext } = event;
82
82
  const { abortController } = clark.context;
83
+ const contextId = getContextId(clark, services);
84
+ const contextOptions = clark.context.llmConfig?.contextOptions;
85
+ const context = await services.contextManager.getContext(contextId, contextOptions);
83
86
  await chatSessionStore.getMessages();
84
87
  const latestSummary = await chatSessionStore.getLatestSummary();
85
- const focusedEntities = promptContext?.entities
86
- // tagged integrations are ignored
87
- ?.filter((e) => e.type !== "integration")
88
- .map((e) => `- ${e.id} (${e.type})`)
89
- .join("\n");
90
- const appState = await getAppState(services, promptContext);
91
- const availableComponents = await getAvailableComponents(services);
92
- const systemPrompt = buildBaseSystemPrompt();
93
- const messages = [
94
- {
95
- role: "system",
96
- content: systemPrompt,
97
- },
98
- {
99
- role: "user",
100
- content: `<available_components>\nHere is a list of all the components that are available in the application.\n\`\`\`json\n${JSON.stringify(availableComponents)}\n\`\`\`\n</available_components>`,
101
- providerOptions: nextCacheBreakpoint(),
102
- },
103
- ...(latestSummary
104
- ? [
105
- {
106
- role: "user",
107
- content: `Reference the context from the previous exchange with the user, if relevant:\n\n${formatSummaryForAgents(latestSummary)}`,
108
- },
109
- ]
110
- : []),
111
- {
88
+ if (latestSummary) {
89
+ context.seedIfEmpty({
112
90
  role: "user",
113
- content: `<current_app_state>\nHere is metadata about the current state of the users's application.\n\`\`\`json\n${JSON.stringify(appState)}\n\`\`\`\n</current_app_state>`,
114
- },
115
- ...(focusedEntities
116
- ? [
117
- {
118
- role: "user",
119
- content: `<focused_entities>\nThe user has focused the editor on the following entities corresponding to the current app state. Attempt to constrain your actions to affect only these entities.\n${focusedEntities}\n</focused_entities>`,
120
- },
121
- ]
122
- : []),
123
- buildUserMessage(userPrompt, promptContext, nextCacheBreakpoint),
124
- ];
91
+ content: `Reference the context from the previous exchange with the user, if relevant:\n\n${formatSummaryForAgents(latestSummary)}`,
92
+ });
93
+ }
94
+ const systemPrompt = buildBaseSystemPrompt();
95
+ const system = {
96
+ role: "system",
97
+ content: systemPrompt,
98
+ };
99
+ context.setSystemPrompt(system);
100
+ const prompt = buildUserMessage(userPrompt, promptContext);
101
+ context.startTurn(prompt);
102
+ const messages = context.getMessages();
125
103
  const model = services.llmProvider.modelForClassification("broad_edit");
126
104
  // Process LLM configuration up front so we can log it once at the top
127
105
  const llmConfig = clark.context.llmConfig;
@@ -147,9 +125,7 @@ export const doLLMGenerating = (clark, services) => {
147
125
  }
148
126
  logRef.content += `--- INPUT MESSAGES ---\n`;
149
127
  logRef.content += `[SYSTEM] ${systemPrompt}\n\n`;
150
- messages.forEach((msg, _index) => {
151
- logRef.content += `[${msg.role.toUpperCase()}] ${msg.content}\n\n`;
152
- });
128
+ logRef.content += `[${system.role.toUpperCase()}] ${system.content}\n\n`;
153
129
  // Note: Input token count will be logged once LLM call begins
154
130
  const tools = buildTools(clark, services, promptContext, logRef, disabledTools);
155
131
  let stepCount = 0;
@@ -175,12 +151,11 @@ export const doLLMGenerating = (clark, services) => {
175
151
  experimental_transform: [smoothStream({ chunking: "line" })],
176
152
  messages,
177
153
  tools,
178
- prepareStep: breakpointAwarePrepareStep({
179
- getInputTokens: () => totalInputTokens,
180
- onAddBreakpoint: (stepNumber) => {
181
- logRef.content += `[CACHE] Added breakpoint at step ${stepNumber}, ${totalInputTokens} input tokens\n\n`;
182
- },
183
- }),
154
+ prepareStep: async (step) => {
155
+ context.startStep();
156
+ const messages = context.getMessages();
157
+ return { ...step, messages };
158
+ },
184
159
  stopWhen: hasToolCall("build_finalize"),
185
160
  onChunk: (chunkData) => {
186
161
  if (!firstTokenReceived) {
@@ -229,6 +204,7 @@ export const doLLMGenerating = (clark, services) => {
229
204
  onStepFinish: async (step) => {
230
205
  stepCount++;
231
206
  const stepTimestamp = new Date().toISOString();
207
+ context.endStep(step.response.messages, step.usage);
232
208
  logRef.content += `--- OUTPUT STEP ${stepCount} [${stepTimestamp}] ---\n`;
233
209
  if (step.reasoning && thinkingSpanActive) {
234
210
  const thinkingTrack = "thinking";
@@ -372,6 +348,9 @@ export const doLLMGenerating = (clark, services) => {
372
348
  }
373
349
  logRef.content += `\n`;
374
350
  },
351
+ onFinish: (result) => {
352
+ context.endTurn(result.totalUsage);
353
+ },
375
354
  }, clark.tracer, clark.logger);
376
355
  for await (const chunk of build.fullStream) {
377
356
  await processStreamChunk(chunk, clark, logRef);
@@ -1 +1 @@
1
- {"version":3,"file":"llm-generating.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,YAAY,GAMb,MAAM,IAAI,CAAC;AACZ,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EACL,aAAa,EACb,iCAAiC,EACjC,iBAAiB,GAOlB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,0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C,CAAC;gBAClD,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,SAAS,EAAE,CAAC,KAAK,CAAC,qCAAqC,EAAE;wBACvD,KAAK,EAAE;4BACL,IAAI,EAAE,cAAc;4BACpB,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;4BAC/D,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;yBACxD;qBACF,CAAC,CAAC;gBACL,CAAC;gBAED,MAAM,aAAa,GACjB,MAAM,QAAQ,CAAC,cAAc,CAAC,oBAAoB,EAAE,CAAC;gBACvD,IAAI,aAAa,EAAE,CAAC;oBAClB,KAAK,YAAY,CAAgB;wBAC/B,IAAI,EAAE,iBAAiB;qBACxB,CAAC,CAAC;gBACL,CAAC;qBAAM,CAAC;oBACN,KAAK,YAAY,CAAQ;wBACvB,IAAI,EAAE,iCAAiC;qBACxC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"llm-generating.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,YAAY,GAMb,MAAM,IAAI,CAAC;AACZ,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,O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O,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;4BAC/D,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;yBACxD;qBACF,CAAC,CAAC;gBACL,CAAC;gBAED,MAAM,aAAa,GACjB,MAAM,QAAQ,CAAC,cAAc,CAAC,oBAAoB,EAAE,CAAC;gBACvD,IAAI,aAAa,EAAE,CAAC;oBAClB,KAAK,YAAY,CAAgB;wBAC/B,IAAI,EAAE,iBAAiB;qBACxB,CAAC,CAAC;gBACL,CAAC;qBAAM,CAAC;oBACN,KAAK,YAAY,CAAQ;wBACvB,IAAI,EAAE,iCAAiC;qBACxC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ContextId } from "../../llm/context/types.js";
2
+ import type { Clark, ClarkStateHandlerParams } from "../clark-fsm.js";
3
+ export declare function getContextId(clark: Clark, services: ClarkStateHandlerParams, name?: string): ContextId;
4
+ //# sourceMappingURL=context-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-id.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/helpers/context-id.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAGtE,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,uBAAuB,EACjC,IAAI,GAAE,MAAe,GACpB,SAAS,CAaX"}
@@ -0,0 +1,16 @@
1
+ import { uniqueId } from "lodash-es";
2
+ import { parseJwt } from "../../util/parse-jwt.js";
3
+ //* Get or create a ContextId for the current conversation context. */
4
+ export function getContextId(clark, services, name = "main") {
5
+ // In practice, we should never have an anonymous user, since the jwt is set on ClarkContext
6
+ // in the AgentPlanning step. But the type system leaves open the possibility, so we handle it
7
+ // gracefully by generating a unique ID.
8
+ const userId = parseJwt(clark.context.jwt)?.userId ?? uniqueId("anymous_user_");
9
+ const id = {
10
+ appId: services.applicationId,
11
+ userId,
12
+ name,
13
+ };
14
+ return id;
15
+ }
16
+ //# sourceMappingURL=context-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-id.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/helpers/context-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAInD,sEAAsE;AACtE,MAAM,UAAU,YAAY,CAC1B,KAAY,EACZ,QAAiC,EACjC,OAAe,MAAM;IAErB,4FAA4F;IAC5F,8FAA8F;IAC9F,wCAAwC;IACxC,MAAM,MAAM,GACV,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC;IAEnE,MAAM,EAAE,GAAG;QACT,KAAK,EAAE,QAAQ,CAAC,aAAa;QAC7B,MAAM;QACN,IAAI;KACL,CAAC;IACF,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Parses a JWT token and extracts orgId, orgName, userId, and userEmail if present.
3
+ * @param jwt - The JWT token string.
4
+ * @returns An object containing the extracted fields.
5
+ */
6
+ export declare function parseJwt(jwt: string | undefined): {
7
+ orgId?: string;
8
+ orgName?: string;
9
+ userId?: string;
10
+ userEmail?: string;
11
+ };
12
+ //# sourceMappingURL=parse-jwt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-jwt.d.ts","sourceRoot":"","sources":["../../../src/ai-service/util/parse-jwt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAoBA"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Parses a JWT token and extracts orgId, orgName, userId, and userEmail if present.
3
+ * @param jwt - The JWT token string.
4
+ * @returns An object containing the extracted fields.
5
+ */
6
+ export function parseJwt(jwt) {
7
+ const result = {};
8
+ if (!jwt) {
9
+ return result;
10
+ }
11
+ try {
12
+ const parts = jwt.split(".");
13
+ if (parts.length === 3 && parts[1]) {
14
+ const payload = JSON.parse(Buffer.from(parts[1], "base64").toString());
15
+ if (payload.org_id)
16
+ result.orgId = payload.org_id;
17
+ if (payload.org_name)
18
+ result.orgName = payload.org_name;
19
+ if (payload.user_id)
20
+ result.userId = payload.user_id;
21
+ if (payload.user_email)
22
+ result.userEmail = payload.user_email;
23
+ }
24
+ }
25
+ catch {
26
+ // Silently handle JWT parsing errors
27
+ }
28
+ return result;
29
+ }
30
+ //# sourceMappingURL=parse-jwt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-jwt.js","sourceRoot":"","sources":["../../../src/ai-service/util/parse-jwt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAuB;IAM9C,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC7B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YACnC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEvE,IAAI,OAAO,CAAC,MAAM;gBAAE,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;YAClD,IAAI,OAAO,CAAC,QAAQ;gBAAE,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;YACxD,IAAI,OAAO,CAAC,OAAO;gBAAE,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;YACrD,IAAI,OAAO,CAAC,UAAU;gBAAE,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;QAChE,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,qCAAqC;IACvC,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare function safeJsonStringify(obj: unknown): string;
1
+ export declare function safeJsonStringify(obj: unknown, space?: string | number): string;
2
2
  //# sourceMappingURL=safe-stringify.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"safe-stringify.d.ts","sourceRoot":"","sources":["../../../src/ai-service/util/safe-stringify.ts"],"names":[],"mappings":"AAQA,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CA8DtD"}
1
+ {"version":3,"file":"safe-stringify.d.ts","sourceRoot":"","sources":["../../../src/ai-service/util/safe-stringify.ts"],"names":[],"mappings":"AAQA,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,OAAO,EACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GACtB,MAAM,CAkER"}
@@ -5,7 +5,7 @@ const SENSITIVE_KEYS = [
5
5
  "access_token",
6
6
  "refresh_token",
7
7
  ];
8
- export function safeJsonStringify(obj) {
8
+ export function safeJsonStringify(obj, space) {
9
9
  if (obj === null || obj === undefined) {
10
10
  return "{}";
11
11
  }
@@ -43,7 +43,7 @@ export function safeJsonStringify(obj) {
43
43
  // Try to serialize the value
44
44
  try {
45
45
  // This will throw if the value is not serializable
46
- JSON.stringify(value);
46
+ JSON.stringify(value, null, space);
47
47
  return value;
48
48
  }
49
49
  catch (_error) {
@@ -63,6 +63,6 @@ export function safeJsonStringify(obj) {
63
63
  }
64
64
  return "[Non-serializable]";
65
65
  }
66
- });
66
+ }, space);
67
67
  }
68
68
  //# sourceMappingURL=safe-stringify.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"safe-stringify.js","sourceRoot":"","sources":["../../../src/ai-service/util/safe-stringify.ts"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAAG;IACrB,UAAU;IACV,SAAS;IACT,KAAK;IACL,cAAc;IACd,eAAe;CAChB,CAAC;AAEF,MAAM,UAAU,iBAAiB,CAAC,GAAY;IAC5C,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAC;IACb,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;IAE3B,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACxC,mCAAmC;QACnC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YAC1C,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;YAC/C,OAAO,YAAY,CAAC;QACtB,CAAC;QAED,6BAA6B;QAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;gBACpB,OAAO,sBAAsB,CAAC;YAChC,CAAC;YACD,IAAI,CAAC,GAAG,CA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C7B,IAAI,CAAC;YACH,mDAAmD;YACnD,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;YACnC,OAAO,KAAK,CAAC;QACf,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,gCAAgC;YAChC,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;gBAChC,OAAO,cAAc,KAAK,CAAC,IAAI,IAAI,WAAW,GAAG,CAAC;YACpD,CAAC;YACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC9B,OAAO,YAAY,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC;YACzC,CAAC;YACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC9B,OAAO,YAAY,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC;YACzC,CAAC;YACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC9B,uCAAuC;gBACvC,OAAO,oBAAoB,CAAC;YAC9B,CAAC;YACD,OAAO,oBAAoB,CAAC;QAC9B,CAAC;IACH,CAAC,EACD,KAAK,CACN,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"extract-js-identifiers.d.ts","sourceRoot":"","sources":["../../src/binding-extraction/extract-js-identifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,KAAK,EAAwB,MAAM,SAAS,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,KAAK,oBAAoB,GAAG,KAAK,GAAG;IAClC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,GAAG,CAAC,EAAE;QACJ,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;QACnC,KAAK,EAAE,QAAQ,CAAC;QAChB,GAAG,EAAE,QAAQ,CAAC;KACf,CAAC;CACH,CAAC;AAmEF,eAAO,MAAM,aAAa,GACxB,cAAc,MAAM,EACpB,QAAQ,KAAK,CAAC,oBAAoB,CAAC,KAClC,cAiGF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,WAAW,MAAM,KAChB,cAAc,EAEhB,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,WAAW,MAAM,KAChB,OAAO,CAAC,MAAM,EAAE,CAGlB,CAAC"}
1
+ {"version":3,"file":"extract-js-identifiers.d.ts","sourceRoot":"","sources":["../../src/binding-extraction/extract-js-identifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,KAAK,EAAwB,MAAM,SAAS,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,KAAK,oBAAoB,GAAG,KAAK,GAAG;IAClC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,GAAG,CAAC,EAAE;QACJ,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;QACnC,KAAK,EAAE,QAAQ,CAAC;QAChB,GAAG,EAAE,QAAQ,CAAC;KACf,CAAC;CACH,CAAC;AAoEF,eAAO,MAAM,aAAa,GACxB,cAAc,MAAM,EACpB,QAAQ,KAAK,CAAC,oBAAoB,CAAC,KAClC,cAiGF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,WAAW,MAAM,KAChB,cAAc,EAEhB,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,WAAW,MAAM,KAChB,OAAO,CAAC,MAAM,EAAE,CAGlB,CAAC"}
@@ -19,7 +19,7 @@ const extractJsEvaluationPairsWithTokenizer = (jsSnippet, tokenize) => {
19
19
  // Handle automatic semicolon insertion such as when previous token ends with ]
20
20
  canCapture = true;
21
21
  }
22
- const shouldExtract = true;
22
+ const shouldExtract = tokens[i]?.value !== "await" && tokens[i]?.value !== "async";
23
23
  // entitiesToExtract.has(tokens[i].value) ||
24
24
  // (currentNamespace &&
25
25
  // namespacedEntitiesToExtract[currentNamespace].has(tokens[i].value));