@shepai/cli 1.176.0-pr539.02342cf → 1.177.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/apis/json-schema/PhaseTiming.yaml +0 -30
  2. package/apis/json-schema/WorkflowConfig.yaml +0 -3
  3. package/dist/eslint.config.mjs +2 -0
  4. package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts +1 -8
  5. package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts.map +1 -1
  6. package/dist/packages/core/src/application/ports/output/index.d.ts +1 -1
  7. package/dist/packages/core/src/application/ports/output/index.d.ts.map +1 -1
  8. package/dist/packages/core/src/application/ports/output/services/i-browser-opener.d.ts +28 -0
  9. package/dist/packages/core/src/application/ports/output/services/i-browser-opener.d.ts.map +1 -0
  10. package/dist/packages/core/src/application/ports/output/services/i-browser-opener.js +13 -0
  11. package/dist/packages/core/src/application/ports/output/services/i-desktop-notifier.d.ts +29 -0
  12. package/dist/packages/core/src/application/ports/output/services/i-desktop-notifier.d.ts.map +1 -0
  13. package/dist/packages/core/src/application/ports/output/services/i-desktop-notifier.js +13 -0
  14. package/dist/packages/core/src/application/ports/output/services/index.d.ts +2 -7
  15. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  16. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  17. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +0 -9
  18. package/dist/packages/core/src/domain/generated/output.d.ts +0 -65
  19. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  20. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  21. package/dist/packages/core/src/infrastructure/di/container.js +5 -27
  22. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +0 -6
  23. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  24. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +0 -41
  25. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts +1 -2
  26. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts.map +1 -1
  27. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.js +0 -72
  28. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
  29. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +3 -19
  30. package/dist/packages/core/src/infrastructure/services/agents/analyze-repo/analyze-repository-graph.d.ts +1 -1
  31. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts +1 -6
  32. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts.map +1 -1
  33. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +1 -18
  34. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
  35. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.js +20 -6
  36. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  37. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +27 -10
  38. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  39. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +1 -17
  40. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts +0 -1
  41. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -1
  42. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.js +0 -5
  43. package/dist/packages/core/src/infrastructure/services/browser-opener.service.d.ts +2 -1
  44. package/dist/packages/core/src/infrastructure/services/browser-opener.service.d.ts.map +1 -1
  45. package/dist/packages/core/src/infrastructure/services/notifications/desktop-notifier.d.ts +2 -1
  46. package/dist/packages/core/src/infrastructure/services/notifications/desktop-notifier.d.ts.map +1 -1
  47. package/dist/src/presentation/cli/commands/daemon/start-daemon.d.ts +1 -1
  48. package/dist/src/presentation/cli/commands/daemon/start-daemon.js +2 -3
  49. package/dist/src/presentation/cli/commands/ui.command.js +1 -2
  50. package/dist/tsconfig.build.tsbuildinfo +1 -1
  51. package/package.json +10 -2
  52. package/web/.next/BUILD_ID +1 -1
  53. package/web/.next/build-manifest.json +2 -2
  54. package/web/.next/fallback-build-manifest.json +2 -2
  55. package/web/.next/prerender-manifest.json +3 -3
  56. package/web/.next/required-server-files.js +2 -2
  57. package/web/.next/required-server-files.json +2 -2
  58. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  59. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  60. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  62. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
  65. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  66. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +38 -38
  68. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  69. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  70. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +38 -38
  71. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  72. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  73. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  74. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  75. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  77. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  78. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  79. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  80. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  81. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  82. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
  83. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  84. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  85. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +38 -38
  86. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  87. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  88. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +38 -38
  89. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  90. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  91. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  92. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  93. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  94. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  95. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  96. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  97. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  98. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  99. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  100. package/web/.next/server/app/_global-error.html +2 -2
  101. package/web/.next/server/app/_global-error.rsc +1 -1
  102. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  103. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  104. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  105. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  106. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  107. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  108. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  109. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  110. package/web/.next/server/app/features/page/server-reference-manifest.json +6 -6
  111. package/web/.next/server/app/features/page.js.nft.json +1 -1
  112. package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
  113. package/web/.next/server/app/settings/page/server-reference-manifest.json +9 -9
  114. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  115. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  116. package/web/.next/server/app/skills/page/server-reference-manifest.json +13 -13
  117. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  118. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  119. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  120. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  121. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  122. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  123. package/web/.next/server/app/version/page.js.nft.json +1 -1
  124. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  125. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  126. package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js.map +1 -1
  127. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  128. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js +1 -1
  129. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js.map +1 -1
  130. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js +1 -1
  131. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js.map +1 -1
  132. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js +1 -1
  133. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js.map +1 -1
  134. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  135. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  136. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  137. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  138. package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js +1 -1
  139. package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js.map +1 -1
  140. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +1 -1
  141. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -1
  142. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  143. package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js +1 -1
  144. package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js.map +1 -1
  145. package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js +2 -2
  146. package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js +1 -1
  147. package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js.map +1 -1
  148. package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js +1 -1
  149. package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js.map +1 -1
  150. package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js +1 -1
  151. package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js.map +1 -1
  152. package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js +1 -1
  153. package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js.map +1 -1
  154. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +1 -1
  155. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -1
  156. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  157. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  158. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  159. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  160. package/web/.next/server/chunks/ssr/{_66291662._.js → _19a779c6._.js} +2 -2
  161. package/web/.next/server/chunks/ssr/{_66291662._.js.map → _19a779c6._.js.map} +1 -1
  162. package/web/.next/server/chunks/ssr/_295fffde._.js.map +1 -1
  163. package/web/.next/server/chunks/ssr/{_39053f87._.js → _3fc2374c._.js} +2 -2
  164. package/web/.next/server/chunks/ssr/{_39053f87._.js.map → _3fc2374c._.js.map} +1 -1
  165. package/web/.next/server/chunks/ssr/_45496654._.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/_4cbb7f95._.js +1 -1
  167. package/web/.next/server/chunks/ssr/_4cbb7f95._.js.map +1 -1
  168. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  169. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  170. package/web/.next/server/chunks/ssr/_57b1af27._.js +3 -0
  171. package/web/.next/server/chunks/ssr/{_34b0a7ad._.js.map → _57b1af27._.js.map} +1 -1
  172. package/web/.next/server/chunks/ssr/_6abfa39e._.js +1 -1
  173. package/web/.next/server/chunks/ssr/_f8c55130._.js +1 -1
  174. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  175. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  176. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  177. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -1
  178. package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js +1 -1
  179. package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js.map +1 -1
  180. package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js +2 -2
  181. package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js.map +1 -1
  182. package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js +2 -2
  183. package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js.map +1 -1
  184. package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js +1 -1
  185. package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js.map +1 -1
  186. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js +1 -1
  187. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js.map +1 -1
  188. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js +1 -1
  189. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js.map +1 -1
  190. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js +1 -1
  191. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js.map +1 -1
  192. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  193. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
  194. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
  195. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  196. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  197. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
  198. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
  199. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js +1 -1
  200. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js.map +1 -1
  201. package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js +1 -1
  202. package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js.map +1 -1
  203. package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js +1 -1
  204. package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js.map +1 -1
  205. package/web/.next/server/pages/500.html +2 -2
  206. package/web/.next/server/server-reference-manifest.js +1 -1
  207. package/web/.next/server/server-reference-manifest.json +50 -50
  208. package/web/.next/static/chunks/{1fd5980d468143b3.js → 0a706f8508eae0a8.js} +2 -2
  209. package/web/.next/static/chunks/{85ea0b80c5996155.js → 0d0e2661bd167e0f.js} +1 -1
  210. package/web/.next/static/chunks/{6a3d4b6774ebcbff.js → 18f429029d702545.js} +1 -1
  211. package/web/.next/static/chunks/{420c3bd9d5a22881.js → 3fc5b2287f192799.js} +1 -1
  212. package/web/.next/static/chunks/{4df18296f976f225.js → 4c20d4cd4786a0c8.js} +1 -1
  213. package/web/.next/static/chunks/{5cddc4bace2ce528.js → 77d6506c7d1f711f.js} +1 -1
  214. package/web/.next/static/chunks/{6d33333b9382783a.js → 829d2f8ef2715f2f.js} +2 -2
  215. package/web/.next/static/chunks/{1bbf1ec4b25d4de8.js → b5a916fec4cdc897.js} +1 -1
  216. package/web/.next/static/chunks/{287fea380d8cc373.js → b5d355eb59916926.js} +2 -2
  217. package/web/.next/static/chunks/{fb6b8fc0dac0dea9.js → c0e4cd44851a9293.js} +1 -1
  218. package/web/.next/static/chunks/{2403588dafacbd4e.js → ddd34e939acc204f.js} +1 -1
  219. package/web/.next/static/chunks/{e5d2d6d17ea0472e.js → eaa1b979d63d322b.js} +1 -1
  220. package/web/.next/static/chunks/{73e0fa361f218bb0.js → ef897f150084ef85.js} +1 -1
  221. package/web/.next/static/chunks/{97b1402b60fab8a2.js → efd57b6ffc7cbd54.js} +1 -1
  222. package/apis/json-schema/TokenOptimizationConfig.yaml +0 -36
  223. package/dist/packages/core/src/application/ports/output/services/alias-compression.interface.d.ts +0 -45
  224. package/dist/packages/core/src/application/ports/output/services/alias-compression.interface.d.ts.map +0 -1
  225. package/dist/packages/core/src/application/ports/output/services/alias-compression.interface.js +0 -13
  226. package/dist/packages/core/src/application/ports/output/services/command-output-filter.interface.d.ts +0 -50
  227. package/dist/packages/core/src/application/ports/output/services/command-output-filter.interface.d.ts.map +0 -1
  228. package/dist/packages/core/src/application/ports/output/services/command-output-filter.interface.js +0 -13
  229. package/dist/packages/core/src/application/ports/output/services/delta-context.interface.d.ts +0 -57
  230. package/dist/packages/core/src/application/ports/output/services/delta-context.interface.d.ts.map +0 -1
  231. package/dist/packages/core/src/application/ports/output/services/delta-context.interface.js +0 -13
  232. package/dist/packages/core/src/application/ports/output/services/optimization-metrics.interface.d.ts +0 -45
  233. package/dist/packages/core/src/application/ports/output/services/optimization-metrics.interface.d.ts.map +0 -1
  234. package/dist/packages/core/src/application/ports/output/services/optimization-metrics.interface.js +0 -13
  235. package/dist/packages/core/src/application/ports/output/services/prompt-optimizer.interface.d.ts +0 -86
  236. package/dist/packages/core/src/application/ports/output/services/prompt-optimizer.interface.d.ts.map +0 -1
  237. package/dist/packages/core/src/application/ports/output/services/prompt-optimizer.interface.js +0 -13
  238. package/dist/packages/core/src/application/ports/output/services/semantic-compressor.interface.d.ts +0 -43
  239. package/dist/packages/core/src/application/ports/output/services/semantic-compressor.interface.d.ts.map +0 -1
  240. package/dist/packages/core/src/application/ports/output/services/semantic-compressor.interface.js +0 -13
  241. package/dist/packages/core/src/application/ports/output/services/skill-routing.interface.d.ts +0 -41
  242. package/dist/packages/core/src/application/ports/output/services/skill-routing.interface.d.ts.map +0 -1
  243. package/dist/packages/core/src/application/ports/output/services/skill-routing.interface.js +0 -12
  244. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-token-optimization-config.d.ts +0 -29
  245. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-token-optimization-config.d.ts.map +0 -1
  246. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-token-optimization-config.js +0 -77
  247. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/prompt-optimization-context.d.ts +0 -42
  248. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/prompt-optimization-context.d.ts.map +0 -1
  249. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/prompt-optimization-context.js +0 -92
  250. package/dist/packages/core/src/infrastructure/services/token-optimization/alias-compression.service.d.ts +0 -41
  251. package/dist/packages/core/src/infrastructure/services/token-optimization/alias-compression.service.d.ts.map +0 -1
  252. package/dist/packages/core/src/infrastructure/services/token-optimization/alias-compression.service.js +0 -111
  253. package/dist/packages/core/src/infrastructure/services/token-optimization/command-output-filter.service.d.ts +0 -22
  254. package/dist/packages/core/src/infrastructure/services/token-optimization/command-output-filter.service.d.ts.map +0 -1
  255. package/dist/packages/core/src/infrastructure/services/token-optimization/command-output-filter.service.js +0 -245
  256. package/dist/packages/core/src/infrastructure/services/token-optimization/delta-context.service.d.ts +0 -22
  257. package/dist/packages/core/src/infrastructure/services/token-optimization/delta-context.service.d.ts.map +0 -1
  258. package/dist/packages/core/src/infrastructure/services/token-optimization/delta-context.service.js +0 -50
  259. package/dist/packages/core/src/infrastructure/services/token-optimization/optimization-metrics.service.d.ts +0 -36
  260. package/dist/packages/core/src/infrastructure/services/token-optimization/optimization-metrics.service.d.ts.map +0 -1
  261. package/dist/packages/core/src/infrastructure/services/token-optimization/optimization-metrics.service.js +0 -123
  262. package/dist/packages/core/src/infrastructure/services/token-optimization/prompt-optimizer.service.d.ts +0 -57
  263. package/dist/packages/core/src/infrastructure/services/token-optimization/prompt-optimizer.service.d.ts.map +0 -1
  264. package/dist/packages/core/src/infrastructure/services/token-optimization/prompt-optimizer.service.js +0 -211
  265. package/dist/packages/core/src/infrastructure/services/token-optimization/semantic-compressor.service.d.ts +0 -34
  266. package/dist/packages/core/src/infrastructure/services/token-optimization/semantic-compressor.service.d.ts.map +0 -1
  267. package/dist/packages/core/src/infrastructure/services/token-optimization/semantic-compressor.service.js +0 -190
  268. package/dist/packages/core/src/infrastructure/services/token-optimization/skill-routing.service.d.ts +0 -26
  269. package/dist/packages/core/src/infrastructure/services/token-optimization/skill-routing.service.d.ts.map +0 -1
  270. package/dist/packages/core/src/infrastructure/services/token-optimization/skill-routing.service.js +0 -51
  271. package/web/.next/server/chunks/ssr/_34b0a7ad._.js +0 -3
  272. /package/web/.next/static/{EYQFTbDa6VxVniUQK-bHc → UZ2czjiAnEl1RF-HTzHyA}/_buildManifest.js +0 -0
  273. /package/web/.next/static/{EYQFTbDa6VxVniUQK-bHc → UZ2czjiAnEl1RF-HTzHyA}/_clientMiddlewareManifest.json +0 -0
  274. /package/web/.next/static/{EYQFTbDa6VxVniUQK-bHc → UZ2czjiAnEl1RF-HTzHyA}/_ssgManifest.js +0 -0
@@ -1,50 +0,0 @@
1
- /**
2
- * Command Output Filter Service Interface
3
- *
4
- * Output port for filtering command output (test runners, build tools,
5
- * git operations) embedded in prompts. Applies configurable regex-based
6
- * filter policies to reduce token consumption while preserving all
7
- * error-relevant information.
8
- *
9
- * Following Clean Architecture:
10
- * - Application layer depends on this interface
11
- * - Infrastructure layer provides regex-based implementation
12
- */
13
- /**
14
- * Filter policy type identifying the kind of command output.
15
- */
16
- export type OutputFilterPolicyType = 'jest' | 'vitest' | 'typescript-build' | 'git-diff' | 'pnpm-install' | 'generic';
17
- /**
18
- * Result of applying the command output filter to a prompt.
19
- */
20
- export interface CommandOutputFilterResult {
21
- /** The filtered prompt string */
22
- filtered: string;
23
- /** Number of lines removed by the filter */
24
- linesRemoved: number;
25
- }
26
- /**
27
- * Service interface for filtering command output within prompts.
28
- *
29
- * Scans the prompt for recognizable command output blocks and applies
30
- * reduction policies: removing passing test lines, truncating long diffs,
31
- * collapsing blank lines, and summarizing passing sections with counts.
32
- *
33
- * Safety guarantee: any line containing error-related keywords (error,
34
- * fail, warn, ENOENT, exception, stack, panic, timeout, denied, etc.)
35
- * is preserved verbatim.
36
- */
37
- export interface ICommandOutputFilterService {
38
- /**
39
- * Filter command output embedded in a prompt string.
40
- *
41
- * Detects output blocks (fenced code blocks, test runner output patterns)
42
- * and applies reduction policies based on detected output type. Lines
43
- * containing error-related keywords are always preserved.
44
- *
45
- * @param prompt - Raw prompt containing embedded command output
46
- * @returns Filtered prompt and count of lines removed
47
- */
48
- filter(prompt: string): CommandOutputFilterResult;
49
- }
50
- //# sourceMappingURL=command-output-filter.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-output-filter.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/command-output-filter.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC9B,MAAM,GACN,QAAQ,GACR,kBAAkB,GAClB,UAAU,GACV,cAAc,GACd,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,yBAAyB,CAAC;CACnD"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Command Output Filter Service Interface
3
- *
4
- * Output port for filtering command output (test runners, build tools,
5
- * git operations) embedded in prompts. Applies configurable regex-based
6
- * filter policies to reduce token consumption while preserving all
7
- * error-relevant information.
8
- *
9
- * Following Clean Architecture:
10
- * - Application layer depends on this interface
11
- * - Infrastructure layer provides regex-based implementation
12
- */
13
- export {};
@@ -1,57 +0,0 @@
1
- /**
2
- * Delta-Context Service Interface
3
- *
4
- * Output port for hash-based spec file change detection. Compares
5
- * SHA-256 hashes of spec files against previous phase hashes and
6
- * replaces unchanged files with compact summaries to reduce repeated
7
- * context tokens across multi-phase workflows.
8
- *
9
- * Following Clean Architecture:
10
- * - Application layer depends on this interface
11
- * - Infrastructure layer provides hash-based implementation
12
- */
13
- /**
14
- * Description of a spec file to be checked for changes.
15
- */
16
- export interface SpecFileEntry {
17
- /** File name (e.g., 'spec.yaml', 'research.yaml') */
18
- fileName: string;
19
- /** Full file content as read from disk */
20
- content: string;
21
- }
22
- /**
23
- * Result of applying delta-context diffing to spec files.
24
- */
25
- export interface DeltaContextResult {
26
- /** Map of file names to their optimized content (full or summary) */
27
- optimizedFiles: Record<string, string>;
28
- /** Updated SHA-256 hashes for all files (store in LangGraph state) */
29
- currentHashes: Record<string, string>;
30
- /** Number of files that were replaced with compact summaries */
31
- filesSkipped: number;
32
- }
33
- /**
34
- * Service interface for delta-context spec file diffing.
35
- *
36
- * Computes SHA-256 hashes of spec file contents and compares them
37
- * against hashes from the previous phase. Unchanged files are replaced
38
- * with compact summaries (file name, line count, last-modified phase).
39
- * Changed files and first-phase files are returned with full content.
40
- */
41
- export interface IDeltaContextService {
42
- /**
43
- * Diff spec files against previous phase hashes.
44
- *
45
- * For unchanged files: replaces content with a compact summary
46
- * "[file unchanged since {previousPhase} - {lineCount} lines, hash {shortHash}]"
47
- *
48
- * For changed files or first phase (no previous hashes): returns full content.
49
- *
50
- * @param files - Spec files with their current content
51
- * @param previousHashes - SHA-256 hashes from the previous phase (empty for first phase)
52
- * @param previousPhaseName - Name of the previous phase (for summary text)
53
- * @returns Optimized file contents, updated hashes, and count of skipped files
54
- */
55
- diff(files: SpecFileEntry[], previousHashes: Record<string, string>, previousPhaseName?: string): DeltaContextResult;
56
- }
57
- //# sourceMappingURL=delta-context.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delta-context.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/delta-context.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,sEAAsE;IACtE,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,KAAK,EAAE,aAAa,EAAE,EACtB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACtC,iBAAiB,CAAC,EAAE,MAAM,GACzB,kBAAkB,CAAC;CACvB"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Delta-Context Service Interface
3
- *
4
- * Output port for hash-based spec file change detection. Compares
5
- * SHA-256 hashes of spec files against previous phase hashes and
6
- * replaces unchanged files with compact summaries to reduce repeated
7
- * context tokens across multi-phase workflows.
8
- *
9
- * Following Clean Architecture:
10
- * - Application layer depends on this interface
11
- * - Infrastructure layer provides hash-based implementation
12
- */
13
- export {};
@@ -1,45 +0,0 @@
1
- /**
2
- * Optimization Metrics Service Interface
3
- *
4
- * Output port for persisting token optimization metrics alongside
5
- * existing PhaseTiming records. Records per-phase optimization data
6
- * (token estimates, savings, per-capability stats) for observability
7
- * and optimization tuning.
8
- *
9
- * Following Clean Architecture:
10
- * - Application layer depends on this interface
11
- * - Infrastructure layer provides persistence via PhaseTiming repository
12
- */
13
- import type { OptimizationMetrics } from './prompt-optimizer.interface.js';
14
- /**
15
- * Service interface for recording and retrieving optimization metrics.
16
- *
17
- * Persists optimization metrics as additional fields on PhaseTiming
18
- * records. Uses the existing phase timing infrastructure so metrics
19
- * are queryable alongside timing and cost data.
20
- */
21
- export interface IOptimizationMetricsService {
22
- /**
23
- * Record optimization metrics for a phase timing entry.
24
- *
25
- * Updates the PhaseTiming record with optimization-specific fields:
26
- * original/optimized token estimates, savings percent, capabilities
27
- * applied, and per-capability stats.
28
- *
29
- * @param phaseTimingId - ID of the PhaseTiming record to update
30
- * @param metrics - Optimization metrics to persist
31
- */
32
- record(phaseTimingId: string, metrics: OptimizationMetrics): Promise<void>;
33
- /**
34
- * Retrieve optimization metrics previously recorded for a phase timing.
35
- *
36
- * Returns null when no phase timing exists for the supplied ID, when
37
- * the record exists but has no optimization columns populated, or when
38
- * the underlying repository read fails.
39
- *
40
- * @param phaseTimingId - ID of the PhaseTiming record to query
41
- * @returns Stored OptimizationMetrics or null if no metrics are present
42
- */
43
- getByPhaseTimingId(phaseTimingId: string): Promise<OptimizationMetrics | null>;
44
- }
45
- //# sourceMappingURL=optimization-metrics.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"optimization-metrics.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/optimization-metrics.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;;;;;GAMG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;;;;;;OASG;IACH,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3E;;;;;;;;;OASG;IACH,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;CAChF"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Optimization Metrics Service Interface
3
- *
4
- * Output port for persisting token optimization metrics alongside
5
- * existing PhaseTiming records. Records per-phase optimization data
6
- * (token estimates, savings, per-capability stats) for observability
7
- * and optimization tuning.
8
- *
9
- * Following Clean Architecture:
10
- * - Application layer depends on this interface
11
- * - Infrastructure layer provides persistence via PhaseTiming repository
12
- */
13
- export {};
@@ -1,86 +0,0 @@
1
- /**
2
- * Prompt Optimizer Service Interface
3
- *
4
- * Output port for the token optimization layer. Orchestrates all
5
- * optimization capabilities (output filtering, skill routing,
6
- * delta-context diffing, semantic compression, alias compression)
7
- * to reduce prompt token consumption before LLM invocation.
8
- *
9
- * Following Clean Architecture:
10
- * - Application layer depends on this interface
11
- * - Infrastructure layer provides the composable pipeline implementation
12
- */
13
- import type { TokenOptimizationConfig } from '../../../../domain/generated/output.js';
14
- /**
15
- * Context provided to the optimizer for intelligent optimization decisions.
16
- */
17
- export interface PromptOptimizationContext {
18
- /** Current graph node / workflow phase name (e.g., 'analyze', 'implement') */
19
- phaseName: string;
20
- /** Model identifier for the downstream executor */
21
- modelId?: string;
22
- /** Feature ID for per-feature settings lookup */
23
- featureId: string;
24
- /** Agent run ID for metrics correlation */
25
- agentRunId: string;
26
- /** PhaseTiming row ID for persisting optimization metrics (if available) */
27
- phaseTimingId?: string;
28
- /** Previous spec file hashes for delta-context diffing */
29
- previousSpecFileHashes?: Record<string, string>;
30
- /** Optimization config override (if not provided, reads from global settings) */
31
- config?: TokenOptimizationConfig;
32
- }
33
- /**
34
- * Per-capability metrics collected during optimization.
35
- */
36
- export interface OptimizationMetrics {
37
- /** Estimated tokens before optimization (chars / 4 heuristic) */
38
- originalTokenEstimate: number;
39
- /** Estimated tokens after optimization (chars / 4 heuristic) */
40
- optimizedTokenEstimate: number;
41
- /** Percentage of tokens saved ((original - optimized) / original * 100) */
42
- savingsPercent: number;
43
- /** List of optimization capability names that were applied */
44
- capabilitiesApplied: string[];
45
- /** Lines removed by command output filter */
46
- outputFilterLinesRemoved: number;
47
- /** Spec files replaced with compact summaries by delta-context */
48
- deltaContextFilesSkipped: number;
49
- /** Compression ratio from semantic compression (compressed / original) */
50
- compressionRatio: number;
51
- /** Number of alias substitutions created */
52
- aliasesCreated: number;
53
- }
54
- /**
55
- * Result returned by the prompt optimizer.
56
- */
57
- export interface PromptOptimizationResult {
58
- /** The optimized prompt string */
59
- prompt: string;
60
- /** Optimization metrics for tracking and reporting */
61
- metrics: OptimizationMetrics;
62
- /** Updated spec file hashes for delta-context (store in LangGraph state) */
63
- specFileHashes: Record<string, string>;
64
- }
65
- /**
66
- * Service interface for the token optimization layer.
67
- *
68
- * Orchestrates all optimization capabilities based on settings toggles,
69
- * applying them in sequence: output filter -> skill router -> delta-context
70
- * -> semantic compressor -> alias engine.
71
- */
72
- export interface IPromptOptimizerService {
73
- /**
74
- * Optimize a raw prompt string to reduce token consumption.
75
- *
76
- * Applies enabled optimization capabilities in sequence and returns
77
- * the optimized prompt with metrics. If optimization is disabled
78
- * (master toggle off), returns the original prompt with zero-delta metrics.
79
- *
80
- * @param prompt - Raw prompt string from buildPrompt()
81
- * @param context - Phase context for intelligent optimization decisions
82
- * @returns Optimized prompt, metrics, and updated spec file hashes
83
- */
84
- optimize(prompt: string, context: PromptOptimizationContext): Promise<PromptOptimizationResult>;
85
- }
86
- //# sourceMappingURL=prompt-optimizer.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompt-optimizer.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/prompt-optimizer.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEtF;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,iFAAiF;IACjF,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,iEAAiE;IACjE,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gEAAgE;IAChE,sBAAsB,EAAE,MAAM,CAAC;IAC/B,2EAA2E;IAC3E,cAAc,EAAE,MAAM,CAAC;IACvB,8DAA8D;IAC9D,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,6CAA6C;IAC7C,wBAAwB,EAAE,MAAM,CAAC;IACjC,kEAAkE;IAClE,wBAAwB,EAAE,MAAM,CAAC;IACjC,0EAA0E;IAC1E,gBAAgB,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,OAAO,EAAE,mBAAmB,CAAC;IAC7B,4EAA4E;IAC5E,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACjG"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Prompt Optimizer Service Interface
3
- *
4
- * Output port for the token optimization layer. Orchestrates all
5
- * optimization capabilities (output filtering, skill routing,
6
- * delta-context diffing, semantic compression, alias compression)
7
- * to reduce prompt token consumption before LLM invocation.
8
- *
9
- * Following Clean Architecture:
10
- * - Application layer depends on this interface
11
- * - Infrastructure layer provides the composable pipeline implementation
12
- */
13
- export {};
@@ -1,43 +0,0 @@
1
- /**
2
- * Semantic Compressor Service Interface
3
- *
4
- * Output port for rule-based text compression on non-code prompt sections.
5
- * Applies deterministic transformations (article removal, filler word
6
- * stripping, phrase shortening, whitespace collapsing) while preserving
7
- * code blocks, file paths, URLs, YAML/JSON content, and quoted strings.
8
- *
9
- * Following Clean Architecture:
10
- * - Application layer depends on this interface
11
- * - Infrastructure layer provides regex-based caveman compression
12
- */
13
- /**
14
- * Result of applying semantic text compression.
15
- */
16
- export interface SemanticCompressionResult {
17
- /** The compressed text */
18
- compressed: string;
19
- /** Compression ratio (compressed length / original length, 0.0-1.0) */
20
- compressionRatio: number;
21
- }
22
- /**
23
- * Service interface for rule-based semantic text compression.
24
- *
25
- * Applies caveman-style compression to natural language instruction
26
- * sections of prompts: removing articles, filler words, shortening
27
- * common phrases, and collapsing whitespace. Protected regions
28
- * (code blocks, URLs, YAML, quoted strings) are excluded.
29
- */
30
- export interface ISemanticCompressorService {
31
- /**
32
- * Compress natural language text in a prompt.
33
- *
34
- * Detects and preserves protected regions (code fences, URLs, file
35
- * paths, YAML/JSON blocks, quoted strings), then applies compression
36
- * rules to the remaining natural language sections.
37
- *
38
- * @param text - Prompt text to compress
39
- * @returns Compressed text and compression ratio
40
- */
41
- compress(text: string): SemanticCompressionResult;
42
- }
43
- //# sourceMappingURL=semantic-compressor.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"semantic-compressor.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/semantic-compressor.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,yBAAyB,CAAC;CACnD"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Semantic Compressor Service Interface
3
- *
4
- * Output port for rule-based text compression on non-code prompt sections.
5
- * Applies deterministic transformations (article removal, filler word
6
- * stripping, phrase shortening, whitespace collapsing) while preserving
7
- * code blocks, file paths, URLs, YAML/JSON content, and quoted strings.
8
- *
9
- * Following Clean Architecture:
10
- * - Application layer depends on this interface
11
- * - Infrastructure layer provides regex-based caveman compression
12
- */
13
- export {};
@@ -1,41 +0,0 @@
1
- /**
2
- * Skill Routing Service Interface
3
- *
4
- * Output port for phase-aware skill routing. Maintains a mapping of
5
- * workflow phases to relevant skill sets and generates prompt directives
6
- * that guide the agent to prioritize phase-relevant skills.
7
- *
8
- * Following Clean Architecture:
9
- * - Application layer depends on this interface
10
- * - Infrastructure layer provides static mapping with settings override
11
- */
12
- /**
13
- * Result of generating a skill routing directive for a phase.
14
- */
15
- export interface SkillRoutingResult {
16
- /** Ordered list of skill names relevant to the current phase */
17
- relevantSkills: string[];
18
- /** Prompt directive text to prepend/inject into the prompt */
19
- directive: string;
20
- }
21
- /**
22
- * Service interface for phase-aware skill routing.
23
- *
24
- * Maps workflow phases to relevant skill sets using a default routing
25
- * table that can be overridden via settings. Generates a prompt directive
26
- * listing which skills are relevant for the current phase.
27
- */
28
- export interface ISkillRoutingService {
29
- /**
30
- * Get relevant skills and a prompt directive for a workflow phase.
31
- *
32
- * Looks up the phase in the routing table and returns an ordered
33
- * list of relevant skills plus a formatted directive for the prompt.
34
- * Unknown phases return a generic directive with no specific skills.
35
- *
36
- * @param phaseName - Current workflow phase (e.g., 'analyze', 'implement')
37
- * @returns Relevant skills and prompt directive text
38
- */
39
- getRoutingDirective(phaseName: string): SkillRoutingResult;
40
- }
41
- //# sourceMappingURL=skill-routing.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skill-routing.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/skill-routing.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,gEAAgE;IAChE,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;OASG;IACH,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,CAAC;CAC5D"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Skill Routing Service Interface
3
- *
4
- * Output port for phase-aware skill routing. Maintains a mapping of
5
- * workflow phases to relevant skill sets and generates prompt directives
6
- * that guide the agent to prioritize phase-relevant skills.
7
- *
8
- * Following Clean Architecture:
9
- * - Application layer depends on this interface
10
- * - Infrastructure layer provides static mapping with settings override
11
- */
12
- export {};
@@ -1,29 +0,0 @@
1
- /**
2
- * Migration 055: Add token optimization config and metrics columns.
3
- *
4
- * Settings table — token optimization config (all default to 1 = enabled):
5
- * - token_opt_enabled (INTEGER DEFAULT 1)
6
- * - token_opt_output_filtering (INTEGER DEFAULT 1)
7
- * - token_opt_skill_routing (INTEGER DEFAULT 1)
8
- * - token_opt_delta_context (INTEGER DEFAULT 1)
9
- * - token_opt_semantic_compression (INTEGER DEFAULT 1)
10
- * - token_opt_alias_compression (INTEGER DEFAULT 1)
11
- *
12
- * Phase timings table — optimization metrics (all nullable, no defaults):
13
- * - original_token_estimate (INTEGER)
14
- * - optimized_token_estimate (INTEGER)
15
- * - savings_percent (REAL)
16
- * - capabilities_applied (TEXT)
17
- * - output_filter_lines_removed (INTEGER)
18
- * - delta_context_files_skipped (INTEGER)
19
- * - compression_ratio (REAL)
20
- * - aliases_created (INTEGER)
21
- *
22
- * All columns are additive-only. No drops, no renames.
23
- * Guards against duplicate column errors using table_info pragma.
24
- */
25
- import type { MigrationParams } from 'umzug';
26
- import type Database from 'better-sqlite3';
27
- export declare function up({ context: db }: MigrationParams<Database.Database>): Promise<void>;
28
- export declare function down({ context: db }: MigrationParams<Database.Database>): Promise<void>;
29
- //# sourceMappingURL=055-add-token-optimization-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"055-add-token-optimization-config.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-token-optimization-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,wBAAsB,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA0D3F;AAED,wBAAsB,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7F"}
@@ -1,77 +0,0 @@
1
- /**
2
- * Migration 055: Add token optimization config and metrics columns.
3
- *
4
- * Settings table — token optimization config (all default to 1 = enabled):
5
- * - token_opt_enabled (INTEGER DEFAULT 1)
6
- * - token_opt_output_filtering (INTEGER DEFAULT 1)
7
- * - token_opt_skill_routing (INTEGER DEFAULT 1)
8
- * - token_opt_delta_context (INTEGER DEFAULT 1)
9
- * - token_opt_semantic_compression (INTEGER DEFAULT 1)
10
- * - token_opt_alias_compression (INTEGER DEFAULT 1)
11
- *
12
- * Phase timings table — optimization metrics (all nullable, no defaults):
13
- * - original_token_estimate (INTEGER)
14
- * - optimized_token_estimate (INTEGER)
15
- * - savings_percent (REAL)
16
- * - capabilities_applied (TEXT)
17
- * - output_filter_lines_removed (INTEGER)
18
- * - delta_context_files_skipped (INTEGER)
19
- * - compression_ratio (REAL)
20
- * - aliases_created (INTEGER)
21
- *
22
- * All columns are additive-only. No drops, no renames.
23
- * Guards against duplicate column errors using table_info pragma.
24
- */
25
- export async function up({ context: db }) {
26
- // --- Settings table: token optimization config ---
27
- const settingsCols = db.pragma('table_info(settings)');
28
- const settingsNames = new Set(settingsCols.map((c) => c.name));
29
- if (!settingsNames.has('token_opt_enabled')) {
30
- db.exec('ALTER TABLE settings ADD COLUMN token_opt_enabled INTEGER NOT NULL DEFAULT 1');
31
- }
32
- if (!settingsNames.has('token_opt_output_filtering')) {
33
- db.exec('ALTER TABLE settings ADD COLUMN token_opt_output_filtering INTEGER NOT NULL DEFAULT 1');
34
- }
35
- if (!settingsNames.has('token_opt_skill_routing')) {
36
- db.exec('ALTER TABLE settings ADD COLUMN token_opt_skill_routing INTEGER NOT NULL DEFAULT 1');
37
- }
38
- if (!settingsNames.has('token_opt_delta_context')) {
39
- db.exec('ALTER TABLE settings ADD COLUMN token_opt_delta_context INTEGER NOT NULL DEFAULT 1');
40
- }
41
- if (!settingsNames.has('token_opt_semantic_compression')) {
42
- db.exec('ALTER TABLE settings ADD COLUMN token_opt_semantic_compression INTEGER NOT NULL DEFAULT 1');
43
- }
44
- if (!settingsNames.has('token_opt_alias_compression')) {
45
- db.exec('ALTER TABLE settings ADD COLUMN token_opt_alias_compression INTEGER NOT NULL DEFAULT 1');
46
- }
47
- // --- Phase timings table: optimization metrics ---
48
- const timingsCols = db.pragma('table_info(phase_timings)');
49
- const timingsNames = new Set(timingsCols.map((c) => c.name));
50
- if (!timingsNames.has('original_token_estimate')) {
51
- db.exec('ALTER TABLE phase_timings ADD COLUMN original_token_estimate INTEGER');
52
- }
53
- if (!timingsNames.has('optimized_token_estimate')) {
54
- db.exec('ALTER TABLE phase_timings ADD COLUMN optimized_token_estimate INTEGER');
55
- }
56
- if (!timingsNames.has('savings_percent')) {
57
- db.exec('ALTER TABLE phase_timings ADD COLUMN savings_percent REAL');
58
- }
59
- if (!timingsNames.has('capabilities_applied')) {
60
- db.exec('ALTER TABLE phase_timings ADD COLUMN capabilities_applied TEXT');
61
- }
62
- if (!timingsNames.has('output_filter_lines_removed')) {
63
- db.exec('ALTER TABLE phase_timings ADD COLUMN output_filter_lines_removed INTEGER');
64
- }
65
- if (!timingsNames.has('delta_context_files_skipped')) {
66
- db.exec('ALTER TABLE phase_timings ADD COLUMN delta_context_files_skipped INTEGER');
67
- }
68
- if (!timingsNames.has('compression_ratio')) {
69
- db.exec('ALTER TABLE phase_timings ADD COLUMN compression_ratio REAL');
70
- }
71
- if (!timingsNames.has('aliases_created')) {
72
- db.exec('ALTER TABLE phase_timings ADD COLUMN aliases_created INTEGER');
73
- }
74
- }
75
- export async function down({ context: db }) {
76
- void db;
77
- }
@@ -1,42 +0,0 @@
1
- /**
2
- * Prompt Optimization Context
3
- *
4
- * Module-level singleton that exposes the token-optimization layer to
5
- * executeNode() in node-helpers.ts without changing its public API.
6
- *
7
- * The worker calls setPromptOptimizationContext() once after DI init.
8
- * Node helpers call optimizePromptIfEnabled() before invoking the agent
9
- * executor and recordOptimizationMetricsIfEnabled() after the phase
10
- * timing record is updated.
11
- *
12
- * Errors are swallowed so optimization failures never block graph execution.
13
- */
14
- import type { IPromptOptimizerService } from '../../../../application/ports/output/services/prompt-optimizer.interface.js';
15
- import type { IOptimizationMetricsService } from '../../../../application/ports/output/services/optimization-metrics.interface.js';
16
- import type { OptimizationMetrics } from '../../../../application/ports/output/services/prompt-optimizer.interface.js';
17
- /**
18
- * Set the prompt-optimization context. Called once by the worker after DI init.
19
- */
20
- export declare function setPromptOptimizationContext(optimizer: IPromptOptimizerService, metricsService: IOptimizationMetricsService, runId: string, featureId: string): void;
21
- /**
22
- * Clear the prompt-optimization context. Useful for testing.
23
- */
24
- export declare function clearPromptOptimizationContext(): void;
25
- /** Result of an optimization attempt — exposes the prompt to send and metrics to record. */
26
- export interface OptimizePromptResult {
27
- prompt: string;
28
- metrics: OptimizationMetrics | null;
29
- specFileHashes: Record<string, string>;
30
- }
31
- /**
32
- * Optimize the given prompt if the optimizer context is set and the
33
- * master toggle is enabled. Falls back to a passthrough result on any
34
- * error so node execution is never blocked by optimization failures.
35
- */
36
- export declare function optimizePromptIfEnabled(prompt: string, phaseName: string, modelId: string | undefined, previousSpecFileHashes: Record<string, string> | undefined): Promise<OptimizePromptResult>;
37
- /**
38
- * Persist optimization metrics on the given phase timing row.
39
- * No-op if context is not set, timingId is null, or metrics are null.
40
- */
41
- export declare function recordOptimizationMetricsIfEnabled(timingId: string | null, metrics: OptimizationMetrics | null): Promise<void>;
42
- //# sourceMappingURL=prompt-optimization-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompt-optimization-context.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/prompt-optimization-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mEAAmE,CAAC;AACjH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uEAAuE,CAAC;AACzH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mEAAmE,CAAC;AAS7G;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,uBAAuB,EAClC,cAAc,EAAE,2BAA2B,EAC3C,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,IAAI,CAKN;AAED;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,IAAI,CAKrD;AAED,4FAA4F;AAC5F,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC;AAWD;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GACzD,OAAO,CAAC,oBAAoB,CAAC,CA4B/B;AAED;;;GAGG;AACH,wBAAsB,kCAAkC,CACtD,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,OAAO,EAAE,mBAAmB,GAAG,IAAI,GAClC,OAAO,CAAC,IAAI,CAAC,CAQf"}