@lovelybunch/api 1.0.76-alpha.8 → 1.0.76-alpha.9

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 (147) hide show
  1. package/package.json +4 -4
  2. package/static/assets/{ActivityPage-uL-Qknui.js → ActivityPage-BaSoKgwZ.js} +1 -1
  3. package/static/assets/{ApiKeysSettingsPage-BhaH6ZYP.js → ApiKeysSettingsPage-CjrCuHHE.js} +1 -1
  4. package/static/assets/{ArchitectureEditPage-BWKyKi3T.js → ArchitectureEditPage-MYU7btLs.js} +1 -1
  5. package/static/assets/{ArchitecturePage-Dtm0OAac.js → ArchitecturePage-CGqWy8b1.js} +1 -1
  6. package/static/assets/{AuthSettingsPage-D0MQlHyh.js → AuthSettingsPage-elJX4TCV.js} +1 -1
  7. package/static/assets/{CallbackPage-Bz4m3_W8.js → CallbackPage-CUuZYgBL.js} +1 -1
  8. package/static/assets/{CodePage-BuO2K_xx.js → CodePage-C_bzfOnI.js} +1 -1
  9. package/static/assets/{CollapsibleSection-CxX11hr-.js → CollapsibleSection-DfTxWX0X.js} +1 -1
  10. package/static/assets/{DashboardPage-B3HR1UM7.js → DashboardPage-CmS8UPSm.js} +1 -1
  11. package/static/assets/{GitPage-Dm36PRw_.js → GitPage-DSfn76oO.js} +1 -1
  12. package/static/assets/{GitSettingsPage-CRWcjgVI.js → GitSettingsPage-Bu8h7hcr.js} +1 -1
  13. package/static/assets/{IdentityPage-YCkmdyzR.js → IdentityPage-NFKq2FHi.js} +2 -2
  14. package/static/assets/{ImplementationStepsEditor-u3dPxmKW.js → ImplementationStepsEditor-Cn-MshnR.js} +1 -1
  15. package/static/assets/{IntegrationsSettingsPage-Z8xCUmX9.js → IntegrationsSettingsPage-Cw6ItrNf.js} +1 -1
  16. package/static/assets/{JobDetailPage-B8Za82RA.js → JobDetailPage-DLSD4HiU.js} +1 -1
  17. package/static/assets/{KnowledgeDetailPage-CR9c4_WD.js → KnowledgeDetailPage-DY8PpD9X.js} +1 -1
  18. package/static/assets/{KnowledgeEditPage-DhrF6UPg.js → KnowledgeEditPage-B28N-7vM.js} +1 -1
  19. package/static/assets/{KnowledgePage-_gZhpTe3.js → KnowledgePage-C3zoPEcH.js} +1 -1
  20. package/static/assets/{LoginPage-Cc1Ac2j4.js → LoginPage-BYNLGEnz.js} +1 -1
  21. package/static/assets/{MailInboxPage-B_h1Kz4D.js → MailInboxPage-DDYg0W70.js} +1 -1
  22. package/static/assets/{MailProcessingModal-D_qEwqmL.js → MailProcessingModal-CXIrtSz0.js} +1 -1
  23. package/static/assets/{MailReadPage-_q-xk_cX.js → MailReadPage-CVz6oD-y.js} +1 -1
  24. package/static/assets/{MailSentPage-Dj63oQ5D.js → MailSentPage-ClaVWZCR.js} +1 -1
  25. package/static/assets/{McpSettingsPage-DYZ0QNbp.js → McpSettingsPage-CfhBioEH.js} +1 -1
  26. package/static/assets/NewKnowledgePage-BUwh_DFd.js +1 -0
  27. package/static/assets/{NewSkillPage-BEn18f2A.js → NewSkillPage-B2rztwzD.js} +1 -1
  28. package/static/assets/{NewTaskPage-CSlncpI5.js → NewTaskPage-Cvw20nug.js} +1 -1
  29. package/static/assets/{NotFoundPage-C4x0lGai.js → NotFoundPage-CXvLVHsT.js} +1 -1
  30. package/static/assets/{NotificationsSettingsPage-C9YnfRlj.js → NotificationsSettingsPage-Df_GZ7_p.js} +1 -1
  31. package/static/assets/{ProjectEditPage-X0-4mEAS.js → ProjectEditPage-DKf6ZoiG.js} +1 -1
  32. package/static/assets/{ProjectPage-D8OX1GKt.js → ProjectPage-CHhx9s1k.js} +1 -1
  33. package/static/assets/{PromptsSettingsPage-Chc4da1S.js → PromptsSettingsPage-QTxJgO5-.js} +1 -1
  34. package/static/assets/{ResourceDetailPage-DDYKQxpM.js → ResourceDetailPage-C9RHHVKu.js} +1 -1
  35. package/static/assets/{ResourcesPage-BmOpgt3L.js → ResourcesPage-BI8tfYZ2.js} +1 -1
  36. package/static/assets/{RoleEditPage-Ccfu1tn1.js → RoleEditPage-N2-v2MXN.js} +1 -1
  37. package/static/assets/{RolePage-CcdEUjSm.js → RolePage-Da0kZMUH.js} +1 -1
  38. package/static/assets/{RulesSettingsPage-Cz1g_eAj.js → RulesSettingsPage-CSd5iz22.js} +1 -1
  39. package/static/assets/{SchedulePage-CGxZHEL-.js → SchedulePage-CS8g2Db-.js} +1 -1
  40. package/static/assets/{SkillDetailPage-sJg-L8A8.js → SkillDetailPage-QjqBAuFU.js} +1 -1
  41. package/static/assets/{SkillEditPage-BksV7GmD.js → SkillEditPage-BB0x4VVH.js} +1 -1
  42. package/static/assets/{SkillsPage-CwarkJmZ.js → SkillsPage-BMDNxMmZ.js} +1 -1
  43. package/static/assets/{SkillsSettingsPage-DTnBlBdE.js → SkillsSettingsPage-DcdeOlAl.js} +1 -1
  44. package/static/assets/{SourceInput-CWazIr6v.js → SourceInput-rc4KSqcv.js} +1 -1
  45. package/static/assets/{TagInput-Bgyxb_JU.js → TagInput-bxFcAknC.js} +1 -1
  46. package/static/assets/{TaskDetailPage-DlmG1kZR.js → TaskDetailPage-CAmREdfh.js} +1 -1
  47. package/static/assets/{TaskEditPage-BnpNeed_.js → TaskEditPage-BDgZtG36.js} +1 -1
  48. package/static/assets/{TasksPage-CXeTMpgy.js → TasksPage-BQ6eLw0T.js} +1 -1
  49. package/static/assets/{TerminalPage-BLcPt381.js → TerminalPage-BhWGRGf1.js} +1 -1
  50. package/static/assets/TerminalSessionPage-Bu-WiE0d.js +3 -0
  51. package/static/assets/{UserPreferencesPage-BNwEqlRW.js → UserPreferencesPage-B_Tu1a8h.js} +1 -1
  52. package/static/assets/{UserSettingsPage-BRafqkiD.js → UserSettingsPage-BnEGtrGo.js} +1 -1
  53. package/static/assets/{UtilitiesPage-BPX_Unxu.js → UtilitiesPage-k7ABCAig.js} +1 -1
  54. package/static/assets/{alert-Ci2-OWZ_.js → alert-C42EBWiI.js} +1 -1
  55. package/static/assets/{arrow-down-C6Flf0DF.js → arrow-down-CuFFg288.js} +1 -1
  56. package/static/assets/{arrow-left-7TCkaJlN.js → arrow-left-C8VbyW3d.js} +1 -1
  57. package/static/assets/{arrow-up-down-tqbfiBy6.js → arrow-up-down-GN3qK2mU.js} +1 -1
  58. package/static/assets/{arrow-up-DeQAxOPq.js → arrow-up-vC1c-5gW.js} +1 -1
  59. package/static/assets/{badge-D4vHU_w_.js → badge-CKwUSKzT.js} +1 -1
  60. package/static/assets/{browser-modal-BiaqhKHm.js → browser-modal-C9VBJ_El.js} +1 -1
  61. package/static/assets/{card-xkODbJy-.js → card-DRBgMGuU.js} +1 -1
  62. package/static/assets/{chevron-left-CvpfJBPQ.js → chevron-left-2sP4ienq.js} +1 -1
  63. package/static/assets/{chevron-up-BB-6OS4z.js → chevron-up-DJfyvHso.js} +1 -1
  64. package/static/assets/{chevrons-up-CLKrQHMU.js → chevrons-up-DfFpzHXf.js} +1 -1
  65. package/static/assets/{circle-alert-lnP0-w3N.js → circle-alert-DP4rtmEK.js} +1 -1
  66. package/static/assets/{circle-check-BPkEav83.js → circle-check-Cnp-EoKX.js} +1 -1
  67. package/static/assets/{circle-check-big-Dbo-OmWQ.js → circle-check-big-3mrGMFVn.js} +1 -1
  68. package/static/assets/{circle-play-BbtBIeo3.js → circle-play-7F5AVehH.js} +1 -1
  69. package/static/assets/{circle-x-BBwi8e5G.js → circle-x-DxbiyJ6w.js} +1 -1
  70. package/static/assets/{clipboard-Ce816tAO.js → clipboard-CQNR4_yT.js} +1 -1
  71. package/static/assets/{clock-BIeoO5Mt.js → clock-DGw3R_UL.js} +1 -1
  72. package/static/assets/{code-DTW3giBe.js → code-DSNMK8tD.js} +1 -1
  73. package/static/assets/{download-BgKxfry9.js → download-BWL6PFiw.js} +1 -1
  74. package/static/assets/{external-link--RjKXREe.js → external-link-BqUE-DMN.js} +1 -1
  75. package/static/assets/{eye--K-OgK7L.js → eye-BD57N1qQ.js} +1 -1
  76. package/static/assets/{folder-git-2-Bgv7r0zC.js → folder-git-2-CW5Zi8Bm.js} +1 -1
  77. package/static/assets/{index-DF_KNbKf.js → index-B0fLM-4F.js} +1 -1
  78. package/static/assets/{index-LMsLdXw_.js → index-B9OOTqx4.js} +1 -1
  79. package/static/assets/{index-4RuWYO4M.js → index-BArpuuuE.js} +1 -1
  80. package/static/assets/{index-Db5-BoCU.js → index-BG5vEV31.js} +1 -1
  81. package/static/assets/{index-R44k73Ca.js → index-BWktaW8U.js} +1 -1
  82. package/static/assets/{index-BQYB8kWb.js → index-Bedu89qc.js} +1 -1
  83. package/static/assets/{index-BD9UBXsr.js → index-BmTTXfmk.js} +1 -1
  84. package/static/assets/{index-Do92mBFr.js → index-CMQcknsg.js} +1 -1
  85. package/static/assets/{index-iIFwHD3L.js → index-CMt1ExW-.js} +1 -1
  86. package/static/assets/{index-BteQHbZ1.js → index-CVVL2h9f.js} +1 -1
  87. package/static/assets/{index-BbrX1XcC.js → index-CXWGFCS-.js} +1 -1
  88. package/static/assets/{index-Di7xMYoG.js → index-CheR43vH.js} +1 -1
  89. package/static/assets/index-Cht-fo9a.css +1 -0
  90. package/static/assets/{index-Dt_WtbUU.js → index-D4awulBm.js} +1 -1
  91. package/static/assets/{index-PyVlsLW8.js → index-DB2Tq9wz.js} +3 -3
  92. package/static/assets/{index-D9xZafJb.js → index-DO47L-WG.js} +1 -1
  93. package/static/assets/{index-Cd5hBt4x.js → index-EpelXypg.js} +1 -1
  94. package/static/assets/{index-BkEdELOI.js → index-X4fPPLHI.js} +1 -1
  95. package/static/assets/{index-CW9pK_cZ.js → index-stPObw-o.js} +1 -1
  96. package/static/assets/{index-Ch4GVR8L.js → index-uxv5vQZF.js} +1 -1
  97. package/static/assets/{info-DgZN3xWF.js → info-DMJxIp7i.js} +1 -1
  98. package/static/assets/{label-DvPENm3h.js → label-DxDedS8x.js} +1 -1
  99. package/static/assets/{markdown-editor-DpZxV-fa.js → markdown-editor-DJ2CscSp.js} +3 -3
  100. package/static/assets/{message-square-CoaQYehb.js → message-square-DF58cqKJ.js} +1 -1
  101. package/static/assets/{paperclip-ChugoOAp.js → paperclip-CHyfSVll.js} +1 -1
  102. package/static/assets/{pause-m9YcgxdE.js → pause-B-ouFhaQ.js} +1 -1
  103. package/static/assets/{play-DtFz_MLh.js → play-B0y1weCV.js} +1 -1
  104. package/static/assets/{radio-group-C5Te9bVb.js → radio-group-DFNQiPDU.js} +1 -1
  105. package/static/assets/{refresh-cw-B1bWW9Rg.js → refresh-cw-5y5jTc6x.js} +1 -1
  106. package/static/assets/{search-CPOHeeUa.js → search-B5deRThk.js} +1 -1
  107. package/static/assets/{select-B1v2u6hQ.js → select-BzOa_wZx.js} +1 -1
  108. package/static/assets/{switch-Bf1Cq3P6.js → switch-Bf2z8aaj.js} +1 -1
  109. package/static/assets/{tabs-DAbCZiFC.js → tabs-DkdBSep3.js} +1 -1
  110. package/static/assets/{tag-Cz4z82t0.js → tag-gRsTk0jY.js} +1 -1
  111. package/static/assets/{terminal-preview-DTUohQ5b.js → terminal-preview-BfrUN2ok.js} +1 -1
  112. package/static/assets/{use-terminal-CFbQv1ie.js → use-terminal-D6Qe1nwM.js} +1 -1
  113. package/static/assets/{video-B6ZJ-Epb.js → video-DXo9sCfT.js} +1 -1
  114. package/static/index.html +2 -2
  115. package/dist/lib/mcp-client.d.ts +0 -39
  116. package/dist/lib/mcp-client.js +0 -131
  117. package/dist/routes/api/v1/ai/tools.d.ts +0 -17
  118. package/dist/routes/api/v1/ai/tools.js +0 -931
  119. package/dist/routes/api/v1/context/knowledge/[filename]/index.d.ts +0 -1
  120. package/dist/routes/api/v1/context/knowledge/[filename]/index.js +0 -1
  121. package/dist/routes/api/v1/context/knowledge/[filename]/route.d.ts +0 -3
  122. package/dist/routes/api/v1/context/knowledge/[filename]/route.js +0 -254
  123. package/dist/routes/api/v1/context/knowledge/index.d.ts +0 -1
  124. package/dist/routes/api/v1/context/knowledge/index.js +0 -1
  125. package/dist/routes/api/v1/context/knowledge/route.d.ts +0 -3
  126. package/dist/routes/api/v1/context/knowledge/route.js +0 -176
  127. package/dist/routes/api/v1/proposals/[id]/route.d.ts +0 -337
  128. package/dist/routes/api/v1/proposals/[id]/route.js +0 -165
  129. package/dist/routes/api/v1/proposals/index.d.ts +0 -3
  130. package/dist/routes/api/v1/proposals/index.js +0 -10
  131. package/dist/routes/api/v1/proposals/route.d.ts +0 -315
  132. package/dist/routes/api/v1/proposals/route.js +0 -129
  133. package/dist/routes/api/v1/terminal/[proposalId]/create/index.d.ts +0 -3
  134. package/dist/routes/api/v1/terminal/[proposalId]/create/index.js +0 -5
  135. package/dist/routes/api/v1/terminal/[proposalId]/create/route.d.ts +0 -10
  136. package/dist/routes/api/v1/terminal/[proposalId]/create/route.js +0 -27
  137. package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.d.ts +0 -3
  138. package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.js +0 -5
  139. package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.d.ts +0 -10
  140. package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.js +0 -21
  141. package/dist/routes/api/v1/terminal/[proposalId]/resize/index.d.ts +0 -3
  142. package/dist/routes/api/v1/terminal/[proposalId]/resize/index.js +0 -5
  143. package/dist/routes/api/v1/terminal/[proposalId]/resize/route.d.ts +0 -10
  144. package/dist/routes/api/v1/terminal/[proposalId]/resize/route.js +0 -21
  145. package/static/assets/NewKnowledgePage-BEVMYnKG.js +0 -9
  146. package/static/assets/TerminalSessionPage-CeAd8IAy.js +0 -8
  147. package/static/assets/index-DH_vXhd4.css +0 -1
@@ -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,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 } = 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,9 +0,0 @@
1
- import{u as S,a as y,r,j as e,B as j,t as E,a0 as T,L,I as b,A as I}from"./index-PyVlsLW8.js";import{C as i,b as c,c as l,a as d}from"./card-xkODbJy-.js";import{L as m}from"./label-DvPENm3h.js";import{M as A}from"./markdown-editor-DpZxV-fa.js";import{T as B}from"./TagInput-Bgyxb_JU.js";import{S as P}from"./SourceInput-CWazIr6v.js";import{A as M}from"./arrow-left-7TCkaJlN.js";import"./index-BQYB8kWb.js";import"./badge-D4vHU_w_.js";import"./external-link--RjKXREe.js";function U(){const g=S(),{toast:s}=y(),[u,h]=r.useState(!1),[a,f]=r.useState(""),[n,v]=r.useState(""),[x,w]=r.useState([]),[p,C]=r.useState([]),k=async()=>{if(!a.trim()){s({title:"Error",description:"Please provide a title for the knowledge document",variant:"destructive"});return}if(!n.trim()){s({title:"Error",description:"Please provide content for the knowledge document",variant:"destructive"});return}h(!0);try{const o=await(await fetch(`${I}/api/v1/knowledge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a.trim(),content:n.trim(),metadata:{tags:x,sources:p}})})).json();if(o.success){s({title:"Success",description:"Knowledge document created successfully"});const N=o.document.filename.replace(".md","");g(`/knowledge/${N}`)}else s({title:"Error",description:o.error||"Failed to create knowledge document",variant:"destructive"})}catch(t){console.error("Error creating document:",t),s({title:"Error",description:"Failed to create knowledge document",variant:"destructive"})}finally{h(!1)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{children:e.jsx("h1",{className:"text-3xl font-bold",children:"Create Knowledge Document"})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(j,{onClick:k,disabled:u||!a.trim()||!n.trim(),size:"sm",children:[u?e.jsx(E,{className:"w-4 h-4 animate-spin"}):e.jsx(T,{className:"w-4 h-4"}),"Create Document"]}),e.jsx(j,{variant:"ghost",size:"sm",asChild:!0,children:e.jsx(L,{to:"/knowledge",className:"flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(M,{className:"h-4 w-4"})})})]})]}),e.jsxs(i,{children:[e.jsx(c,{children:e.jsx(l,{children:"Basic Information"})}),e.jsx(d,{className:"space-y-4",children:e.jsxs("div",{children:[e.jsx(m,{htmlFor:"title",children:"Title *"}),e.jsx(b,{id:"title",value:a,onChange:t=>f(t.target.value),placeholder:"Enter document title...",className:"text-lg"})]})})]}),e.jsxs(i,{children:[e.jsx(c,{children:e.jsx(l,{children:"Metadata"})}),e.jsxs(d,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(m,{children:"Tags"}),e.jsx(B,{tags:x,onChange:w,placeholder:"Add a tag"})]}),e.jsxs("div",{children:[e.jsx(m,{children:"Sources"}),e.jsx(P,{sources:p,onChange:C})]})]})]}),e.jsxs(i,{children:[e.jsx(c,{children:e.jsx(l,{children:"Content *"})}),e.jsx(d,{children:e.jsx(A,{value:n,onChange:t=>v(t||""),placeholder:`Enter your knowledge content in Markdown...
2
-
3
- You can use:
4
- - **Bold text**
5
- - *Italic text*
6
- - # Headers
7
- - - Lists
8
- - [Links](https://example.com)
9
- - Code blocks and more!`})})]})]})}export{U as default};