@lovelybunch/api 1.0.76-alpha.8 → 1.0.76

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 (185) hide show
  1. package/dist/lib/git.d.ts +3 -0
  2. package/dist/lib/git.js +35 -0
  3. package/dist/routes/api/v1/ai/route.js +214 -152
  4. package/dist/routes/api/v1/config/route.js +13 -9
  5. package/dist/routes/api/v1/context/agents/route.js +159 -0
  6. package/dist/routes/api/v1/context/index.js +6 -4
  7. package/dist/routes/api/v1/context/memory/route.js +163 -0
  8. package/dist/routes/api/v1/context/team/route.js +159 -0
  9. package/dist/routes/api/v1/git/index.js +27 -1
  10. package/dist/routes/api/v1/jobs/[id]/route.d.ts +26 -32
  11. package/dist/routes/api/v1/jobs/[id]/route.js +3 -3
  12. package/dist/routes/api/v1/jobs/route.d.ts +33 -33
  13. package/dist/routes/api/v1/jobs/route.js +17 -2
  14. package/dist/routes/api/v1/mcp/index.js +194 -21
  15. package/dist/routes/api/v1/resources/generate/route.js +10 -3
  16. package/package.json +4 -4
  17. package/static/assets/ActivityPage-sJEQn6DK.js +1 -0
  18. package/static/assets/AgentsContextEditPage-DU3qIXk9.js +9 -0
  19. package/static/assets/AgentsContextPage-tJ-LhFYb.js +1 -0
  20. package/static/assets/{ApiKeysSettingsPage-BhaH6ZYP.js → ApiKeysSettingsPage-Bg84BQHV.js} +2 -2
  21. package/static/assets/{AuthSettingsPage-D0MQlHyh.js → AuthSettingsPage-Bwr7uP3z.js} +1 -1
  22. package/static/assets/{CallbackPage-Bz4m3_W8.js → CallbackPage-BFn0Np2S.js} +1 -1
  23. package/static/assets/CodePage-kp4s3wCJ.js +2 -0
  24. package/static/assets/{CollapsibleSection-CxX11hr-.js → CollapsibleSection-CNs1mvsZ.js} +1 -1
  25. package/static/assets/{DashboardPage-B3HR1UM7.js → DashboardPage-DMJSzzgD.js} +9 -19
  26. package/static/assets/{GitPage-Dm36PRw_.js → GitPage-uqene8zj.js} +3 -3
  27. package/static/assets/{GitSettingsPage-CRWcjgVI.js → GitSettingsPage-CLswbZsT.js} +2 -2
  28. package/static/assets/{IdentityPage-YCkmdyzR.js → IdentityPage-BDTPXEo7.js} +2 -2
  29. package/static/assets/{ImplementationStepsEditor-u3dPxmKW.js → ImplementationStepsEditor-D4cvhPhz.js} +2 -2
  30. package/static/assets/IntegrationsSettingsPage-o7NXZGt9.js +1 -0
  31. package/static/assets/JobDetailPage-DuEiPz6X.js +1 -0
  32. package/static/assets/KnowledgeDetailPage-DFVud_VC.js +1 -0
  33. package/static/assets/{KnowledgeEditPage-DhrF6UPg.js → KnowledgeEditPage-XG6HKK7E.js} +1 -1
  34. package/static/assets/{KnowledgePage-_gZhpTe3.js → KnowledgePage-B2zI3xwW.js} +2 -2
  35. package/static/assets/{LoginPage-Cc1Ac2j4.js → LoginPage-CUJRxwXy.js} +1 -1
  36. package/static/assets/MailInboxPage-BlCG-tba.js +1 -0
  37. package/static/assets/MailProcessingModal-BJIdHOqK.js +1 -0
  38. package/static/assets/MailReadPage-MoNo_gmW.js +1 -0
  39. package/static/assets/{MailSentPage-Dj63oQ5D.js → MailSentPage-QzpuIJmT.js} +1 -1
  40. package/static/assets/{McpSettingsPage-DYZ0QNbp.js → McpSettingsPage-BZcCGkGM.js} +1 -1
  41. package/static/assets/MemoryEditPage-DXSQoCT4.js +13 -0
  42. package/static/assets/MemoryPage-oBnyuvSf.js +1 -0
  43. package/static/assets/NewKnowledgePage-deMsezK8.js +1 -0
  44. package/static/assets/{NewSkillPage-BEn18f2A.js → NewSkillPage-DRYWdrlV.js} +1 -1
  45. package/static/assets/{NewTaskPage-CSlncpI5.js → NewTaskPage-B6xdic5_.js} +2 -2
  46. package/static/assets/{NotFoundPage-C4x0lGai.js → NotFoundPage-Bxu9uKFO.js} +1 -1
  47. package/static/assets/{NotificationsSettingsPage-C9YnfRlj.js → NotificationsSettingsPage-CLgtsCVM.js} +1 -1
  48. package/static/assets/{PromptsSettingsPage-Chc4da1S.js → PromptsSettingsPage-BWaELCjG.js} +1 -1
  49. package/static/assets/{ResourceDetailPage-DDYKQxpM.js → ResourceDetailPage-CMPDRdVM.js} +1 -1
  50. package/static/assets/ResourcesPage-DspYILfG.js +41 -0
  51. package/static/assets/{RoleEditPage-Ccfu1tn1.js → RoleEditPage-DXtzicVZ.js} +1 -1
  52. package/static/assets/{RolePage-CcdEUjSm.js → RolePage-DafGURGp.js} +1 -1
  53. package/static/assets/{RulesSettingsPage-Cz1g_eAj.js → RulesSettingsPage-E8V9cexV.js} +1 -1
  54. package/static/assets/RunDetailPage-DsxkqFst.js +1 -0
  55. package/static/assets/SchedulePage-B2YvNDHr.js +4 -0
  56. package/static/assets/{SkillDetailPage-sJg-L8A8.js → SkillDetailPage-CWkqSfuT.js} +1 -1
  57. package/static/assets/{SkillEditPage-BksV7GmD.js → SkillEditPage-DwyebzFV.js} +1 -1
  58. package/static/assets/{SkillsPage-CwarkJmZ.js → SkillsPage-CauK65X_.js} +2 -2
  59. package/static/assets/{SkillsSettingsPage-DTnBlBdE.js → SkillsSettingsPage-DXMRv3jR.js} +1 -1
  60. package/static/assets/{SourceInput-CWazIr6v.js → SourceInput-C0iKqbQ1.js} +1 -1
  61. package/static/assets/{TagInput-Bgyxb_JU.js → TagInput-Ct-WRvTs.js} +1 -1
  62. package/static/assets/{TaskDetailPage-DlmG1kZR.js → TaskDetailPage-CApk2iBh.js} +1 -1
  63. package/static/assets/{TaskEditPage-BnpNeed_.js → TaskEditPage-NgOVShfK.js} +1 -1
  64. package/static/assets/{TasksPage-CXeTMpgy.js → TasksPage-BoPrP_Rl.js} +3 -3
  65. package/static/assets/TeamEditPage-ChY6mYm8.js +9 -0
  66. package/static/assets/TeamPage-DH-dJhFG.js +1 -0
  67. package/static/assets/{TerminalPage-BLcPt381.js → TerminalPage-CRhcscF2.js} +1 -1
  68. package/static/assets/TerminalSessionPage-CSCQg2sn.js +3 -0
  69. package/static/assets/{UserPreferencesPage-BNwEqlRW.js → UserPreferencesPage-DxCSWJnS.js} +1 -1
  70. package/static/assets/{UserSettingsPage-BRafqkiD.js → UserSettingsPage-DKkOLNPV.js} +1 -1
  71. package/static/assets/UtilitiesPage-CBNSvixW.js +1 -0
  72. package/static/assets/{alert-Ci2-OWZ_.js → alert-Dw_RSroN.js} +1 -1
  73. package/static/assets/{arrow-down-C6Flf0DF.js → arrow-down-UClxXzT-.js} +1 -1
  74. package/static/assets/{arrow-left-7TCkaJlN.js → arrow-left-DWmf9YJp.js} +1 -1
  75. package/static/assets/{arrow-up-down-tqbfiBy6.js → arrow-up-down-Btc3okb3.js} +1 -1
  76. package/static/assets/{arrow-up-DeQAxOPq.js → arrow-up-fLCh7Hvh.js} +1 -1
  77. package/static/assets/{badge-D4vHU_w_.js → badge-vIqE5SOP.js} +1 -1
  78. package/static/assets/{browser-modal-BiaqhKHm.js → browser-modal-DgMJTsMd.js} +2 -2
  79. package/static/assets/{card-xkODbJy-.js → card-DPLdBoa5.js} +1 -1
  80. package/static/assets/{chevron-left-CvpfJBPQ.js → chevron-left-CiNaLX-v.js} +1 -1
  81. package/static/assets/{chevron-up-BB-6OS4z.js → chevron-up-DFd-7wxW.js} +1 -1
  82. package/static/assets/{chevrons-up-CLKrQHMU.js → chevrons-up-BfU70OcQ.js} +1 -1
  83. package/static/assets/{circle-alert-lnP0-w3N.js → circle-alert-Mv00T-P2.js} +1 -1
  84. package/static/assets/{circle-check-big-Dbo-OmWQ.js → circle-check-big-BEY1IoIP.js} +1 -1
  85. package/static/assets/{circle-check-BPkEav83.js → circle-check-xMiP6SLO.js} +1 -1
  86. package/static/assets/{circle-play-BbtBIeo3.js → circle-play-iZZwaGbV.js} +1 -1
  87. package/static/assets/{circle-x-BBwi8e5G.js → circle-x-z3iynaE7.js} +1 -1
  88. package/static/assets/{clipboard-Ce816tAO.js → clipboard-C8wZRPDH.js} +1 -1
  89. package/static/assets/{clock-BIeoO5Mt.js → clock-C_9shc08.js} +1 -1
  90. package/static/assets/{code-DTW3giBe.js → code-DH-sRhus.js} +1 -1
  91. package/static/assets/{download-BgKxfry9.js → download-CE8b59ER.js} +1 -1
  92. package/static/assets/{external-link--RjKXREe.js → external-link-DPyKt8NE.js} +1 -1
  93. package/static/assets/{eye--K-OgK7L.js → eye-BpGD-yoS.js} +1 -1
  94. package/static/assets/{folder-git-2-Bgv7r0zC.js → folder-git-2-BIw4zbmy.js} +1 -1
  95. package/static/assets/globe-CUo7eHKN.js +6 -0
  96. package/static/assets/{index-Di7xMYoG.js → index-B07hel4U.js} +1 -1
  97. package/static/assets/{index-DF_KNbKf.js → index-BCwmQxLC.js} +1 -1
  98. package/static/assets/{index-D9xZafJb.js → index-BOKaM9K-.js} +1 -1
  99. package/static/assets/{index-Cd5hBt4x.js → index-BaR4iUzg.js} +1 -1
  100. package/static/assets/index-BcCuKdbf.css +1 -0
  101. package/static/assets/{index-Db5-BoCU.js → index-Bfb3OTwj.js} +1 -1
  102. package/static/assets/{index-Do92mBFr.js → index-Bkt1rQVV.js} +1 -1
  103. package/static/assets/{index-BD9UBXsr.js → index-C65b3D5_.js} +1 -1
  104. package/static/assets/{index-BbrX1XcC.js → index-CGbmjmEy.js} +1 -1
  105. package/static/assets/{index-4RuWYO4M.js → index-CTouvf2d.js} +1 -1
  106. package/static/assets/{index-Dt_WtbUU.js → index-Cdwx6Zps.js} +1 -1
  107. package/static/assets/{index-iIFwHD3L.js → index-ClO9-JVh.js} +1 -1
  108. package/static/assets/{index-BteQHbZ1.js → index-CpJ0uBf3.js} +1 -1
  109. package/static/assets/{index-LMsLdXw_.js → index-CsBxEWw5.js} +1 -1
  110. package/static/assets/{index-CW9pK_cZ.js → index-DZAYfTI2.js} +1 -1
  111. package/static/assets/{index-BkEdELOI.js → index-Dkr9CBL7.js} +1 -1
  112. package/static/assets/{index-BQYB8kWb.js → index-DnZKG-_7.js} +1 -1
  113. package/static/assets/index-UXL5-kaP.js +497 -0
  114. package/static/assets/{index-Ch4GVR8L.js → index-iB8oed57.js} +1 -1
  115. package/static/assets/{index-R44k73Ca.js → index-jaRIZ6SY.js} +1 -1
  116. package/static/assets/{info-DgZN3xWF.js → info-D-UNBNx2.js} +1 -1
  117. package/static/assets/{label-DvPENm3h.js → label-8VKluf9w.js} +1 -1
  118. package/static/assets/{markdown-editor-DpZxV-fa.js → markdown-editor-DBdRsbP2.js} +3 -3
  119. package/static/assets/{message-square-CoaQYehb.js → message-square-CO8kDUed.js} +1 -1
  120. package/static/assets/{paperclip-ChugoOAp.js → paperclip-DlLXZbru.js} +1 -1
  121. package/static/assets/{pause-m9YcgxdE.js → pause-zSiaxJBu.js} +1 -1
  122. package/static/assets/{play-DtFz_MLh.js → play-DVBhRokt.js} +1 -1
  123. package/static/assets/{radio-group-C5Te9bVb.js → radio-group-CThYUcA4.js} +1 -1
  124. package/static/assets/{refresh-cw-B1bWW9Rg.js → refresh-cw-tXYl1ePu.js} +1 -1
  125. package/static/assets/{search-CPOHeeUa.js → search-BxF7Wwex.js} +1 -1
  126. package/static/assets/{select-B1v2u6hQ.js → select-CyHFRA1Y.js} +1 -1
  127. package/static/assets/server-lRxThHjr.js +6 -0
  128. package/static/assets/{switch-Bf1Cq3P6.js → switch-BUpDbrux.js} +1 -1
  129. package/static/assets/tabs-DkvCmQEX.js +1 -0
  130. package/static/assets/{tag-Cz4z82t0.js → tag-CkcZNLnh.js} +1 -1
  131. package/static/assets/{terminal-preview-DTUohQ5b.js → terminal-preview-CLWDhoOZ.js} +1 -1
  132. package/static/assets/triangle-alert-CmjG_mbF.js +6 -0
  133. package/static/assets/{use-terminal-CFbQv1ie.js → use-terminal-D3iV7-iC.js} +1 -1
  134. package/static/assets/{video-B6ZJ-Epb.js → video-CY_dOujm.js} +1 -1
  135. package/static/index.html +2 -2
  136. package/dist/lib/mcp-client.d.ts +0 -39
  137. package/dist/lib/mcp-client.js +0 -131
  138. package/dist/routes/api/v1/ai/tools.d.ts +0 -17
  139. package/dist/routes/api/v1/ai/tools.js +0 -931
  140. package/dist/routes/api/v1/context/knowledge/[filename]/index.d.ts +0 -1
  141. package/dist/routes/api/v1/context/knowledge/[filename]/index.js +0 -1
  142. package/dist/routes/api/v1/context/knowledge/[filename]/route.js +0 -254
  143. package/dist/routes/api/v1/context/knowledge/index.d.ts +0 -1
  144. package/dist/routes/api/v1/context/knowledge/index.js +0 -1
  145. package/dist/routes/api/v1/context/knowledge/route.js +0 -176
  146. package/dist/routes/api/v1/proposals/[id]/route.d.ts +0 -337
  147. package/dist/routes/api/v1/proposals/[id]/route.js +0 -165
  148. package/dist/routes/api/v1/proposals/index.d.ts +0 -3
  149. package/dist/routes/api/v1/proposals/index.js +0 -10
  150. package/dist/routes/api/v1/proposals/route.d.ts +0 -315
  151. package/dist/routes/api/v1/proposals/route.js +0 -129
  152. package/dist/routes/api/v1/terminal/[proposalId]/create/index.d.ts +0 -3
  153. package/dist/routes/api/v1/terminal/[proposalId]/create/index.js +0 -5
  154. package/dist/routes/api/v1/terminal/[proposalId]/create/route.d.ts +0 -10
  155. package/dist/routes/api/v1/terminal/[proposalId]/create/route.js +0 -27
  156. package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.js +0 -5
  157. package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.d.ts +0 -10
  158. package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.js +0 -21
  159. package/dist/routes/api/v1/terminal/[proposalId]/resize/index.d.ts +0 -3
  160. package/dist/routes/api/v1/terminal/[proposalId]/resize/index.js +0 -5
  161. package/dist/routes/api/v1/terminal/[proposalId]/resize/route.d.ts +0 -10
  162. package/dist/routes/api/v1/terminal/[proposalId]/resize/route.js +0 -21
  163. package/static/assets/ActivityPage-uL-Qknui.js +0 -1
  164. package/static/assets/ArchitectureEditPage-BWKyKi3T.js +0 -21
  165. package/static/assets/ArchitecturePage-Dtm0OAac.js +0 -1
  166. package/static/assets/CodePage-BuO2K_xx.js +0 -2
  167. package/static/assets/IntegrationsSettingsPage-Z8xCUmX9.js +0 -1
  168. package/static/assets/JobDetailPage-B8Za82RA.js +0 -1
  169. package/static/assets/KnowledgeDetailPage-CR9c4_WD.js +0 -1
  170. package/static/assets/MailInboxPage-B_h1Kz4D.js +0 -1
  171. package/static/assets/MailProcessingModal-D_qEwqmL.js +0 -6
  172. package/static/assets/MailReadPage-_q-xk_cX.js +0 -1
  173. package/static/assets/NewKnowledgePage-BEVMYnKG.js +0 -9
  174. package/static/assets/ProjectEditPage-X0-4mEAS.js +0 -11
  175. package/static/assets/ProjectPage-D8OX1GKt.js +0 -1
  176. package/static/assets/ResourcesPage-BmOpgt3L.js +0 -41
  177. package/static/assets/SchedulePage-CGxZHEL-.js +0 -4
  178. package/static/assets/TerminalSessionPage-CeAd8IAy.js +0 -8
  179. package/static/assets/UtilitiesPage-BPX_Unxu.js +0 -1
  180. package/static/assets/index-DH_vXhd4.css +0 -1
  181. package/static/assets/index-PyVlsLW8.js +0 -487
  182. package/static/assets/tabs-DAbCZiFC.js +0 -1
  183. /package/dist/routes/api/v1/context/{knowledge/[filename] → agents}/route.d.ts +0 -0
  184. /package/dist/routes/api/v1/context/{knowledge → memory}/route.d.ts +0 -0
  185. /package/dist/routes/api/v1/{terminal/[proposalId]/destroy/index.d.ts → context/team/route.d.ts} +0 -0
@@ -1,315 +0,0 @@
1
- import { Context } from 'hono';
2
- export declare function GET(c: Context): Promise<(Response & import("hono").TypedResponse<{
3
- success: true;
4
- data: {
5
- id: string;
6
- intent: string;
7
- content?: string;
8
- author: {
9
- type: import("@lovelybunch/types").AuthorType;
10
- id: string;
11
- name: string;
12
- email?: string;
13
- };
14
- productSpecRef?: string;
15
- planSteps: {
16
- id: string;
17
- description: string;
18
- command?: string;
19
- expectedOutcome?: string;
20
- status: "pending" | "in-progress" | "completed" | "failed";
21
- output?: string;
22
- error?: string;
23
- executedAt?: string;
24
- }[];
25
- evidence: {
26
- type: "test" | "benchmark" | "screenshot" | "log" | "other";
27
- description: string;
28
- data: any;
29
- timestamp: string;
30
- }[];
31
- policies: {
32
- id: string;
33
- name: string;
34
- description: string;
35
- status: "pending" | "passed" | "failed" | "skipped";
36
- message?: string;
37
- checkedAt?: string;
38
- }[];
39
- featureFlags: {
40
- id: string;
41
- version: string;
42
- name: string;
43
- description: string;
44
- type: import("@lovelybunch/types").FeatureFlagType;
45
- defaultValue: any;
46
- scopes: string[];
47
- targets: {
48
- audience: string;
49
- value: any;
50
- percentage?: number;
51
- }[];
52
- killSwitch: boolean;
53
- dependencies: string[];
54
- createdAt: string;
55
- updatedAt: string;
56
- }[];
57
- experiments: {
58
- id: string;
59
- name: string;
60
- hypothesis: string;
61
- variants: {
62
- id: string;
63
- name: string;
64
- description: string;
65
- allocation: number;
66
- config: {
67
- [x: string]: any;
68
- };
69
- }[];
70
- allocation: {
71
- method: "random" | "deterministic" | "weighted";
72
- seed?: string;
73
- totalAllocation: number;
74
- };
75
- successMetrics: string[];
76
- guardrailMetrics: {
77
- name: string;
78
- threshold: number;
79
- comparison: "greater" | "less" | "equal";
80
- action: "alert" | "pause" | "stop";
81
- }[];
82
- stopRules: {
83
- metric: string;
84
- condition: string;
85
- action: "stop" | "pause";
86
- }[];
87
- analysisConfig: {
88
- confidenceLevel: number;
89
- minimumSampleSize: number;
90
- testType: "two-tailed" | "one-tailed";
91
- };
92
- status: import("@lovelybunch/types").ExperimentStatus;
93
- startedAt?: string;
94
- endedAt?: string;
95
- }[];
96
- telemetryContracts: {
97
- eventName: string;
98
- version: string;
99
- schema: {
100
- [x: string]: any;
101
- };
102
- piiFields: {
103
- field: string;
104
- classification: "none" | "quasi" | "sensitive" | "highly-sensitive";
105
- handling: "clear" | "hash" | "encrypt" | "remove";
106
- }[];
107
- samplingRate: number;
108
- retentionPolicy: {
109
- duration: number;
110
- archiveAfter?: number;
111
- deleteAfter: number;
112
- };
113
- approvals: {
114
- approver: string;
115
- approvedAt: string;
116
- comment?: string;
117
- }[];
118
- }[];
119
- releasePlan: {
120
- strategy: "immediate" | "gradual" | "scheduled" | "gated";
121
- stages?: {
122
- name: string;
123
- percentage: number;
124
- duration?: number;
125
- criteria?: string[];
126
- }[];
127
- schedule?: string;
128
- rollbackPlan?: string;
129
- };
130
- status: import("@lovelybunch/types").CPStatus;
131
- metadata: {
132
- createdAt: string;
133
- updatedAt: string;
134
- reviewers: string[];
135
- aiInteractions: {
136
- id: string;
137
- timestamp: string;
138
- model: string;
139
- prompt: string;
140
- response: string;
141
- tokens: {
142
- prompt: number;
143
- completion: number;
144
- total: number;
145
- };
146
- cost?: number;
147
- }[];
148
- tags?: string[];
149
- priority?: "low" | "medium" | "high" | "critical";
150
- };
151
- }[];
152
- }, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
153
- success: false;
154
- error: {
155
- code: string;
156
- message: any;
157
- };
158
- }, 500, "json">)>;
159
- export declare function POST(c: Context): Promise<(Response & import("hono").TypedResponse<{
160
- success: true;
161
- data: {
162
- id: string;
163
- intent: string;
164
- content?: string;
165
- author: {
166
- type: import("@lovelybunch/types").AuthorType;
167
- id: string;
168
- name: string;
169
- email?: string;
170
- };
171
- productSpecRef?: string;
172
- planSteps: {
173
- id: string;
174
- description: string;
175
- command?: string;
176
- expectedOutcome?: string;
177
- status: "pending" | "in-progress" | "completed" | "failed";
178
- output?: string;
179
- error?: string;
180
- executedAt?: string;
181
- }[];
182
- evidence: {
183
- type: "test" | "benchmark" | "screenshot" | "log" | "other";
184
- description: string;
185
- data: any;
186
- timestamp: string;
187
- }[];
188
- policies: {
189
- id: string;
190
- name: string;
191
- description: string;
192
- status: "pending" | "passed" | "failed" | "skipped";
193
- message?: string;
194
- checkedAt?: string;
195
- }[];
196
- featureFlags: {
197
- id: string;
198
- version: string;
199
- name: string;
200
- description: string;
201
- type: import("@lovelybunch/types").FeatureFlagType;
202
- defaultValue: any;
203
- scopes: string[];
204
- targets: {
205
- audience: string;
206
- value: any;
207
- percentage?: number;
208
- }[];
209
- killSwitch: boolean;
210
- dependencies: string[];
211
- createdAt: string;
212
- updatedAt: string;
213
- }[];
214
- experiments: {
215
- id: string;
216
- name: string;
217
- hypothesis: string;
218
- variants: {
219
- id: string;
220
- name: string;
221
- description: string;
222
- allocation: number;
223
- config: {
224
- [x: string]: any;
225
- };
226
- }[];
227
- allocation: {
228
- method: "random" | "deterministic" | "weighted";
229
- seed?: string;
230
- totalAllocation: number;
231
- };
232
- successMetrics: string[];
233
- guardrailMetrics: {
234
- name: string;
235
- threshold: number;
236
- comparison: "greater" | "less" | "equal";
237
- action: "alert" | "pause" | "stop";
238
- }[];
239
- stopRules: {
240
- metric: string;
241
- condition: string;
242
- action: "stop" | "pause";
243
- }[];
244
- analysisConfig: {
245
- confidenceLevel: number;
246
- minimumSampleSize: number;
247
- testType: "two-tailed" | "one-tailed";
248
- };
249
- status: import("@lovelybunch/types").ExperimentStatus;
250
- startedAt?: string;
251
- endedAt?: string;
252
- }[];
253
- telemetryContracts: {
254
- eventName: string;
255
- version: string;
256
- schema: {
257
- [x: string]: any;
258
- };
259
- piiFields: {
260
- field: string;
261
- classification: "none" | "quasi" | "sensitive" | "highly-sensitive";
262
- handling: "clear" | "hash" | "encrypt" | "remove";
263
- }[];
264
- samplingRate: number;
265
- retentionPolicy: {
266
- duration: number;
267
- archiveAfter?: number;
268
- deleteAfter: number;
269
- };
270
- approvals: {
271
- approver: string;
272
- approvedAt: string;
273
- comment?: string;
274
- }[];
275
- }[];
276
- releasePlan: {
277
- strategy: "immediate" | "gradual" | "scheduled" | "gated";
278
- stages?: {
279
- name: string;
280
- percentage: number;
281
- duration?: number;
282
- criteria?: string[];
283
- }[];
284
- schedule?: string;
285
- rollbackPlan?: string;
286
- };
287
- status: import("@lovelybunch/types").CPStatus;
288
- metadata: {
289
- createdAt: string;
290
- updatedAt: string;
291
- reviewers: string[];
292
- aiInteractions: {
293
- id: string;
294
- timestamp: string;
295
- model: string;
296
- prompt: string;
297
- response: string;
298
- tokens: {
299
- prompt: number;
300
- completion: number;
301
- total: number;
302
- };
303
- cost?: number;
304
- }[];
305
- tags?: string[];
306
- priority?: "low" | "medium" | "high" | "critical";
307
- };
308
- };
309
- }, 201, "json">) | (Response & import("hono").TypedResponse<{
310
- success: false;
311
- error: {
312
- code: string;
313
- message: any;
314
- };
315
- }, 500, "json">)>;
@@ -1,129 +0,0 @@
1
- import { FileStorageAdapter } from '../../../../lib/storage/file-storage.js';
2
- import { getAuthorInfo } from '../../../../lib/user-preferences.js';
3
- import Fuse from 'fuse.js';
4
- import { getLogger } from '@lovelybunch/core/logging';
5
- import { getSlackService } from '../../../../lib/slack/slack-service.js';
6
- const storage = new FileStorageAdapter();
7
- // Logger is lazily initialized inside handlers to use server config
8
- export async function GET(c) {
9
- try {
10
- const url = new URL(c.req.url);
11
- const searchParams = url.searchParams;
12
- const status = searchParams.get('status');
13
- const author = searchParams.get('author');
14
- const priority = searchParams.get('priority');
15
- const tags = searchParams.get('tags')?.split(',');
16
- const searchQuery = searchParams.get('q'); // Add search query parameter
17
- let proposals = await storage.listCPs({
18
- status,
19
- author: author || undefined,
20
- priority: priority || undefined,
21
- tags
22
- });
23
- // Apply search filter if provided
24
- if (searchQuery?.trim()) {
25
- const fuse = new Fuse(proposals, {
26
- keys: [
27
- { name: 'intent', weight: 0.4 },
28
- { name: 'id', weight: 0.3 },
29
- { name: 'author.name', weight: 0.2 },
30
- { name: 'metadata.tags', weight: 0.1 }
31
- ],
32
- threshold: 0.3,
33
- includeScore: true
34
- });
35
- const searchResults = fuse.search(searchQuery);
36
- proposals = searchResults.map(result => result.item);
37
- }
38
- return c.json({
39
- success: true,
40
- data: proposals
41
- });
42
- }
43
- catch (error) {
44
- console.error('Error listing proposals:', error);
45
- return c.json({
46
- success: false,
47
- error: {
48
- code: 'LIST_PROPOSALS_ERROR',
49
- message: error.message
50
- }
51
- }, 500);
52
- }
53
- }
54
- export async function POST(c) {
55
- try {
56
- const body = await c.req.json();
57
- // Get author info from saved preferences if not provided
58
- const authorInfo = await getAuthorInfo();
59
- // Create a new proposal with required fields
60
- const now = new Date();
61
- const proposal = {
62
- id: body.id || `cp-${Date.now()}`,
63
- intent: body.intent,
64
- content: body.content,
65
- author: body.author || {
66
- id: 'current-user',
67
- name: authorInfo.name,
68
- email: authorInfo.email,
69
- role: 'engineer',
70
- type: 'human'
71
- },
72
- planSteps: body.planSteps || [],
73
- evidence: body.evidence || [],
74
- policies: body.policies || [],
75
- featureFlags: body.featureFlags || [],
76
- experiments: body.experiments || [],
77
- telemetryContracts: body.telemetryContracts || [],
78
- releasePlan: body.releasePlan || { strategy: 'immediate' },
79
- status: body.status || 'draft',
80
- metadata: {
81
- createdAt: now,
82
- updatedAt: now,
83
- reviewers: body.metadata?.reviewers || [],
84
- aiInteractions: body.metadata?.aiInteractions || [],
85
- tags: body.metadata?.tags || [],
86
- priority: body.metadata?.priority || 'medium'
87
- },
88
- productSpecRef: body.productSpecRef
89
- };
90
- await storage.createCP(proposal);
91
- // Log the proposal creation event
92
- const logger = getLogger();
93
- logger.log({
94
- kind: 'proposal.create',
95
- actor: proposal.author.type === 'agent'
96
- ? `agent:${proposal.author.name}`
97
- : `human:${proposal.author.email}`,
98
- subject: `proposal:${proposal.id}`,
99
- tags: ['proposal'],
100
- payload: {
101
- id: proposal.id,
102
- intent: proposal.intent,
103
- priority: proposal.metadata.priority,
104
- author: proposal.author
105
- }
106
- });
107
- // Send Slack notification (non-blocking)
108
- getSlackService().sendNotification({
109
- type: 'proposal.created',
110
- proposalId: proposal.id,
111
- intent: proposal.intent,
112
- author: proposal.author.name,
113
- }).catch(err => console.warn('[proposals] Slack notification failed:', err));
114
- return c.json({
115
- success: true,
116
- data: proposal
117
- }, 201);
118
- }
119
- catch (error) {
120
- console.error('Error creating proposal:', error);
121
- return c.json({
122
- success: false,
123
- error: {
124
- code: 'CREATE_PROPOSAL_ERROR',
125
- message: error.message
126
- }
127
- }, 500);
128
- }
129
- }
@@ -1,3 +0,0 @@
1
- import { Hono } from 'hono';
2
- declare const create: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
3
- export default create;
@@ -1,5 +0,0 @@
1
- import { Hono } from 'hono';
2
- import { POST } from './route.js';
3
- const create = new Hono();
4
- create.post('/', POST);
5
- export default create;
@@ -1,10 +0,0 @@
1
- import { Context } from 'hono';
2
- export declare function POST(c: Context): Promise<(Response & import("hono").TypedResponse<{
3
- error: string;
4
- }, 400, "json">) | (Response & import("hono").TypedResponse<{
5
- sessionId: string;
6
- proposalId: string;
7
- createdAt: string;
8
- }, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
9
- error: string;
10
- }, 500, "json">)>;
@@ -1,27 +0,0 @@
1
- import { getGlobalTerminalManager } from '../../../../../../lib/terminal/global-manager.js';
2
- import { loadUserSettings } from '../../../../../../lib/user-preferences.js';
3
- export async function POST(c) {
4
- try {
5
- const proposalId = c.req.param('proposalId');
6
- const body = await c.req.json().catch(() => ({}));
7
- const { enableLogging = false, startupCommand } = body;
8
- if (!proposalId) {
9
- return c.json({ error: 'Proposal ID is required' }, 400);
10
- }
11
- // Load user settings to get shell preference
12
- const userSettings = await loadUserSettings();
13
- const shellPreference = (userSettings.preferences.terminalShell || 'bash');
14
- // Create a new terminal session for this proposal
15
- const terminalManager = getGlobalTerminalManager();
16
- const session = await terminalManager.createSession(proposalId, enableLogging, shellPreference, startupCommand);
17
- return c.json({
18
- sessionId: session.id,
19
- proposalId: session.proposalId,
20
- createdAt: session.createdAt,
21
- });
22
- }
23
- catch (error) {
24
- console.error('Error creating terminal session:', error);
25
- return c.json({ error: 'Failed to create terminal session' }, 500);
26
- }
27
- }
@@ -1,5 +0,0 @@
1
- import { Hono } from 'hono';
2
- import { POST } from './route.js';
3
- const app = new Hono();
4
- app.post('/', POST);
5
- export default app;
@@ -1,10 +0,0 @@
1
- import { Context } from 'hono';
2
- export declare function POST(c: Context): Promise<(Response & import("hono").TypedResponse<{
3
- error: string;
4
- }, 400, "json">) | (Response & import("hono").TypedResponse<{
5
- error: string;
6
- }, 404, "json">) | (Response & import("hono").TypedResponse<{
7
- success: true;
8
- }, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
9
- error: string;
10
- }, 500, "json">)>;
@@ -1,21 +0,0 @@
1
- import { getGlobalTerminalManager } from '../../../../../../lib/terminal/global-manager.js';
2
- export async function POST(c) {
3
- try {
4
- const proposalId = c.req.param('proposalId');
5
- const body = await c.req.json();
6
- const { sessionId } = body;
7
- if (!sessionId) {
8
- return c.json({ error: 'Session ID is required' }, 400);
9
- }
10
- const terminalManager = getGlobalTerminalManager();
11
- const success = terminalManager.destroySession(sessionId);
12
- if (!success) {
13
- return c.json({ error: 'Session not found' }, 404);
14
- }
15
- return c.json({ success: true });
16
- }
17
- catch (error) {
18
- console.error('Error destroying terminal session:', error);
19
- return c.json({ error: 'Failed to destroy terminal session' }, 500);
20
- }
21
- }
@@ -1,3 +0,0 @@
1
- import { Hono } from 'hono';
2
- declare const app: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
3
- export default app;
@@ -1,5 +0,0 @@
1
- import { Hono } from 'hono';
2
- import { POST } from './route.js';
3
- const app = new Hono();
4
- app.post('/', POST);
5
- export default app;
@@ -1,10 +0,0 @@
1
- import { Context } from 'hono';
2
- export declare function POST(c: Context): Promise<(Response & import("hono").TypedResponse<{
3
- error: string;
4
- }, 400, "json">) | (Response & import("hono").TypedResponse<{
5
- error: string;
6
- }, 404, "json">) | (Response & import("hono").TypedResponse<{
7
- success: true;
8
- }, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
9
- error: string;
10
- }, 500, "json">)>;
@@ -1,21 +0,0 @@
1
- import { getGlobalTerminalManager } from '../../../../../../lib/terminal/global-manager.js';
2
- export async function POST(c) {
3
- try {
4
- const proposalId = c.req.param('proposalId');
5
- const body = await c.req.json();
6
- const { sessionId, cols, rows } = body;
7
- if (!sessionId || !cols || !rows) {
8
- return c.json({ error: 'Session ID, cols, and rows are required' }, 400);
9
- }
10
- const terminalManager = getGlobalTerminalManager();
11
- const success = terminalManager.resizeSession(sessionId, cols, rows);
12
- if (!success) {
13
- return c.json({ error: 'Session not found or resize failed' }, 404);
14
- }
15
- return c.json({ success: true });
16
- }
17
- catch (error) {
18
- console.error('Error resizing terminal session:', error);
19
- return c.json({ error: 'Failed to resize terminal session' }, 500);
20
- }
21
- }
@@ -1 +0,0 @@
1
- import{r as a,A as p,j as e,t as y,bI as v,B as N,n as w,C as b}from"./index-PyVlsLW8.js";import{C as c,a as d,b as k,c as C}from"./card-xkODbJy-.js";import{B as m}from"./badge-D4vHU_w_.js";import{R as E}from"./refresh-cw-B1bWW9Rg.js";const A=5e3;function $(){const[n,o]=a.useState([]),[i,x]=a.useState(!0),[h,u]=a.useState(new Set),l=a.useCallback(async()=>{x(!0);try{const s=await fetch(`${p}/api/v1/events?limit=${A}`);if(!s.ok)throw new Error("Failed to load events");const t=await s.json();o(Array.isArray(t.items)?[...t.items].reverse():[])}catch(s){console.error("Failed to load events:",s),o([])}finally{x(!1)}},[]),g=a.useCallback(s=>{u(t=>{const r=new Set(t);return r.has(s)?r.delete(s):r.add(s),r})},[]);a.useEffect(()=>{l()},[l]);const f=s=>{if(!s)return"Unknown time";try{return new Date(s).toLocaleString()}catch{return s}},j=s=>{switch(s?.toLowerCase()){case"error":return"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200";case"warn":case"warning":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200";case"info":return"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200";case"debug":return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200";default:return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200"}};return i?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Activity"}),e.jsx("p",{className:"text-muted-foreground",children:"View system activity and events"})]}),e.jsx(c,{children:e.jsx(d,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(y,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading events..."})]})})})]}):n.length===0?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Activity"}),e.jsx("p",{className:"text-muted-foreground",children:"View system activity and events"})]}),e.jsx(c,{children:e.jsx(d,{className:"pt-6",children:e.jsxs("div",{className:"text-center",children:[e.jsx(v,{className:"mx-auto h-12 w-12 text-muted-foreground"}),e.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No Events Found"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Activity events will appear here as they occur."})]})})})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Activity"}),e.jsxs("p",{className:"text-muted-foreground",children:["View system activity and events (",n.length," events)"]})]}),e.jsxs(N,{variant:"outline",size:"sm",onClick:()=>void l(),disabled:i,children:[e.jsx(E,{className:`h-4 w-4 mr-2 ${i?"animate-spin":""}`}),"Refresh"]})]}),e.jsx("div",{className:"space-y-3",children:n.map(s=>{const t=h.has(s.seq);return e.jsxs(c,{className:"transition-colors",children:[e.jsx(k,{className:"py-3 cursor-pointer hover:bg-muted/30",onClick:()=>g(s.seq),children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-2 flex-1 min-w-0",children:[t?e.jsx(w,{className:"h-4 w-4 mt-0.5 text-muted-foreground shrink-0"}):e.jsx(b,{className:"h-4 w-4 mt-0.5 text-muted-foreground shrink-0"}),e.jsxs("div",{className:"space-y-1 flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(C,{className:"text-sm font-medium",children:["#",s.seq]}),s.kind&&e.jsx(m,{variant:"outline",className:"text-xs",children:s.kind}),s.level&&e.jsx(m,{className:`text-xs ${j(s.level)}`,children:s.level})]}),s.message&&e.jsx("p",{className:`text-sm text-muted-foreground ${t?"":"truncate"}`,children:s.message})]})]}),e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:f(s.ts)})]})}),t&&e.jsx(d,{className:"pt-0 pb-4",children:e.jsx("pre",{className:"text-xs bg-muted p-3 rounded-md overflow-x-auto",children:JSON.stringify(s,null,2)})})]},s.seq)})})]})}export{$ as default};
@@ -1,21 +0,0 @@
1
- import{u as D,a as M,r as l,A as b,j as e,B as S,L as I,a0 as _,I as d,o as B}from"./index-PyVlsLW8.js";import{C as u,a as p,b as j,c as v}from"./card-xkODbJy-.js";import{L as o}from"./label-DvPENm3h.js";import{M as P}from"./markdown-editor-DpZxV-fa.js";import{A as R}from"./arrow-left-7TCkaJlN.js";import{C as $}from"./circle-check-big-Dbo-OmWQ.js";import"./index-BQYB8kWb.js";function W(){const F=D(),{toast:h}=M(),[n,x]=l.useState({stack:{runtime:"",framework:"",language:"",database:"",deployment:"",repository:""},commands:{}}),[y,f]=l.useState(""),[E,k]=l.useState(""),[L,N]=l.useState(!0),[C,w]=l.useState(!1);l.useEffect(()=>{fetch(`${b}/api/v1/context/architecture`).then(t=>t.json()).then(t=>{if(t.success){const a=t.document,m={stack:{runtime:a.metadata.stack?.runtime||"",framework:a.metadata.stack?.framework||"",language:a.metadata.stack?.language||"",database:a.metadata.stack?.database||"",deployment:a.metadata.stack?.deployment||"",repository:a.metadata.stack?.repository||""},commands:a.metadata.commands||{}};x(m);const s=Object.entries(m.commands).map(([r,c])=>`${r}: ${c}`).join(`
2
- `);k(s),f(a.content.trim())}N(!1)}).catch(t=>{console.error("Failed to load context:",t),h({title:"Error",description:"Failed to load architecture documentation",variant:"destructive"}),N(!1)})},[h]);const A=async()=>{w(!0);try{const a=await(await fetch(`${b}/api/v1/context/architecture`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:y,metadata:{stack:n.stack,commands:n.commands}})})).json();if(a.success)h({title:"Success",description:"Architecture documentation saved successfully",action:e.jsx($,{className:"h-4 w-4"})}),F("/context/architecture");else throw new Error(a.error||"Failed to save context")}catch(t){console.error("Save error:",t),h({title:"Error",description:"Failed to save architecture documentation",variant:"destructive"})}finally{w(!1)}},i=(t,a)=>{x(m=>{const s={...m},r=t.split(".");let c=s;for(let g=0;g<r.length-1;g++)c=c[r[g]];return c[r[r.length-1]]=a,s})},T=t=>{k(t);const a={};t.split(`
3
- `).filter(s=>s.trim()).forEach(s=>{const[r,...c]=s.split(":");r&&c.length>0&&(a[r.trim()]=c.join(":").trim())}),x(s=>({...s,commands:a}))};return L?e.jsx("div",{className:"space-y-6",children:e.jsx(u,{children:e.jsx(p,{className:"pt-6",children:e.jsx("div",{className:"text-center",children:e.jsx("p",{children:"Loading..."})})})})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-xl sm:text-2xl font-bold tracking-tight",children:"Edit Architecture"}),e.jsx("p",{className:"text-muted-foreground text-sm hidden sm:block",children:"Edit technical architecture and supporting metadata"})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx(S,{variant:"ghost",size:"sm",asChild:!0,children:e.jsx(I,{to:"/context/architecture",className:"text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(R,{className:"w-4 h-4"})})}),e.jsxs(S,{onClick:A,disabled:C,size:"sm",children:[e.jsx(_,{className:"w-4 h-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:C?"Saving...":"Save"})]})]})]}),e.jsxs(u,{children:[e.jsx(j,{children:e.jsx(v,{children:"Technology Stack"})}),e.jsxs(p,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"runtime",children:"Runtime"}),e.jsx(d,{id:"runtime",value:n.stack.runtime,onChange:t=>i("stack.runtime",t.target.value),placeholder:"node|python|go|etc"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"framework",children:"Framework"}),e.jsx(d,{id:"framework",value:n.stack.framework,onChange:t=>i("stack.framework",t.target.value),placeholder:"express|fastify|django|gin|etc"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"language",children:"Language"}),e.jsx(d,{id:"language",value:n.stack.language,onChange:t=>i("stack.language",t.target.value),placeholder:"typescript|javascript|python|go|etc"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"database",children:"Database"}),e.jsx(d,{id:"database",value:n.stack.database,onChange:t=>i("stack.database",t.target.value),placeholder:"postgresql|mysql|mongodb|sqlite|etc"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"deployment",children:"Deployment"}),e.jsx(d,{id:"deployment",value:n.stack.deployment,onChange:t=>i("stack.deployment",t.target.value),placeholder:"docker|kubernetes|vercel|aws|etc"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"repository",children:"Repository"}),e.jsx(d,{id:"repository",value:n.stack.repository,onChange:t=>i("stack.repository",t.target.value),placeholder:"https://github.com/yourorg/yourproject"})]})]})]})]}),e.jsxs(u,{children:[e.jsx(j,{children:e.jsx(v,{children:"Quick Commands"})}),e.jsx(p,{className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"commands",children:"Commands (format: command_name: command_to_run)"}),e.jsx(B,{id:"commands",value:E,onChange:t=>T(t.target.value),placeholder:`install: npm install
4
- dev: npm run dev
5
- test: npm test
6
- build: npm run build
7
- deploy: npm run deploy`,rows:4})]})})]}),e.jsxs(u,{children:[e.jsx(j,{children:e.jsx(v,{children:"Architecture Documentation"})}),e.jsx(p,{children:e.jsx(P,{value:y,onChange:t=>f(t||""),placeholder:`Write your architecture documentation in markdown...
8
-
9
- ## System Design
10
-
11
- Describe your high-level system architecture here.
12
-
13
- ## Directory Structure
14
-
15
- \`\`\`
16
- project-root/
17
- ├── src/
18
- │ ├── components/
19
- │ ├── pages/
20
- │ └── services/
21
- \`\`\``,height:800})})]})]})}export{W as default};
@@ -1 +0,0 @@
1
- import{a as g,r as n,A as v,j as e,t as y,F as k,B as l,M as b,au as w,L as C,Y as E,ar as A}from"./index-PyVlsLW8.js";import{C as a,a as c,b as o,c as m}from"./card-xkODbJy-.js";import{c as D}from"./clipboard-B9ndUJKl.js";function S(){const{toast:h}=g(),[r,x]=n.useState(null),[u,p]=n.useState(!0),[j,i]=n.useState(!1);n.useEffect(()=>{fetch(`${v}/api/v1/context/architecture`).then(t=>{if(t.ok)return t.json();throw new Error("Not found")}).then(t=>{t.success?(x(t.document),i(!0)):i(!1)}).catch(()=>{i(!1)}).finally(()=>{p(!1)})},[]);const N=async()=>{const t=".nut/context/architecture.md";try{await D(t),h({title:"Copied!",description:`Path ${t} copied to clipboard`})}catch(d){console.error("Failed to copy path:",d),h({title:"Error",description:"Failed to copy path to clipboard",variant:"destructive"})}},f=()=>{const t=new CustomEvent("discuss-in-chat",{detail:{type:"context",id:"architecture-md",filename:"architecture.md",name:"architecture.md",path:".nut/context/architecture.md"}});window.dispatchEvent(t)};if(u)return e.jsx("div",{className:"space-y-6",children:e.jsx(a,{children:e.jsx(c,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(y,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading architecture documentation..."})]})})})});if(!j||!r)return e.jsx("div",{className:"space-y-6",children:e.jsx(a,{children:e.jsx(c,{className:"pt-6",children:e.jsxs("div",{className:"text-center",children:[e.jsx(k,{className:"mx-auto h-12 w-12 text-muted-foreground"}),e.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No Architecture Documentation Found"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Architecture documentation will appear here once created."})]})})})});const s=r.metadata;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Technical Architecture"}),e.jsx("p",{className:"text-muted-foreground",children:"System design, components, and technical patterns"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(l,{variant:"outline",size:"sm",onClick:f,children:[e.jsx(b,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Discuss"})]}),e.jsxs(l,{variant:"outline",size:"sm",onClick:N,children:[e.jsx(w,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Copy Path"})]}),e.jsx(l,{size:"sm",asChild:!0,children:e.jsxs(C,{to:"/context/architecture/edit",children:[e.jsx(E,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Edit"})]})})]})]}),s&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs(a,{children:[e.jsx(o,{className:"pb-3",children:e.jsx(m,{className:"text-lg font-semibold",children:"Technology Stack"})}),e.jsx(c,{className:"space-y-3",children:s.stack&&e.jsxs("div",{className:"space-y-1 text-sm",children:[s.stack.runtime&&e.jsxs("div",{children:["Runtime: ",s.stack.runtime]}),s.stack.framework&&e.jsxs("div",{children:["Framework: ",s.stack.framework]}),s.stack.language&&e.jsxs("div",{children:["Language: ",s.stack.language]}),s.stack.database&&e.jsxs("div",{children:["Database: ",s.stack.database]}),s.stack.deployment&&e.jsxs("div",{children:["Deployment: ",s.stack.deployment]}),s.stack.repository&&e.jsxs("div",{children:["Repository:"," ",e.jsx("a",{href:s.stack.repository,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:s.stack.repository})]})]})})]}),e.jsxs(a,{children:[e.jsx(o,{className:"pb-3",children:e.jsx(m,{className:"text-lg font-semibold",children:"Quick Commands"})}),e.jsx(c,{className:"space-y-3",children:s.commands&&e.jsxs("div",{className:"space-y-1",children:[Object.entries(s.commands).slice(0,5).map(([t,d])=>e.jsxs("div",{className:"text-sm",children:[e.jsxs("span",{className:"font-medium capitalize",children:[t,": "]}),e.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs",children:d})]},t)),Object.entries(s.commands).length>5&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["+ ",Object.entries(s.commands).length-5," more commands"]})]})})]})]}),e.jsxs(a,{children:[e.jsx(o,{children:e.jsx(m,{className:"text-lg font-semibold",children:"Architecture Documentation"})}),e.jsx(c,{children:e.jsx("div",{className:"prose prose-sm max-w-none dark:prose-invert",children:e.jsx(A,{children:r.content||"No content available"})})})]})]})}export{S as default};