@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.
- package/package.json +4 -4
- package/static/assets/{ActivityPage-uL-Qknui.js → ActivityPage-BaSoKgwZ.js} +1 -1
- package/static/assets/{ApiKeysSettingsPage-BhaH6ZYP.js → ApiKeysSettingsPage-CjrCuHHE.js} +1 -1
- package/static/assets/{ArchitectureEditPage-BWKyKi3T.js → ArchitectureEditPage-MYU7btLs.js} +1 -1
- package/static/assets/{ArchitecturePage-Dtm0OAac.js → ArchitecturePage-CGqWy8b1.js} +1 -1
- package/static/assets/{AuthSettingsPage-D0MQlHyh.js → AuthSettingsPage-elJX4TCV.js} +1 -1
- package/static/assets/{CallbackPage-Bz4m3_W8.js → CallbackPage-CUuZYgBL.js} +1 -1
- package/static/assets/{CodePage-BuO2K_xx.js → CodePage-C_bzfOnI.js} +1 -1
- package/static/assets/{CollapsibleSection-CxX11hr-.js → CollapsibleSection-DfTxWX0X.js} +1 -1
- package/static/assets/{DashboardPage-B3HR1UM7.js → DashboardPage-CmS8UPSm.js} +1 -1
- package/static/assets/{GitPage-Dm36PRw_.js → GitPage-DSfn76oO.js} +1 -1
- package/static/assets/{GitSettingsPage-CRWcjgVI.js → GitSettingsPage-Bu8h7hcr.js} +1 -1
- package/static/assets/{IdentityPage-YCkmdyzR.js → IdentityPage-NFKq2FHi.js} +2 -2
- package/static/assets/{ImplementationStepsEditor-u3dPxmKW.js → ImplementationStepsEditor-Cn-MshnR.js} +1 -1
- package/static/assets/{IntegrationsSettingsPage-Z8xCUmX9.js → IntegrationsSettingsPage-Cw6ItrNf.js} +1 -1
- package/static/assets/{JobDetailPage-B8Za82RA.js → JobDetailPage-DLSD4HiU.js} +1 -1
- package/static/assets/{KnowledgeDetailPage-CR9c4_WD.js → KnowledgeDetailPage-DY8PpD9X.js} +1 -1
- package/static/assets/{KnowledgeEditPage-DhrF6UPg.js → KnowledgeEditPage-B28N-7vM.js} +1 -1
- package/static/assets/{KnowledgePage-_gZhpTe3.js → KnowledgePage-C3zoPEcH.js} +1 -1
- package/static/assets/{LoginPage-Cc1Ac2j4.js → LoginPage-BYNLGEnz.js} +1 -1
- package/static/assets/{MailInboxPage-B_h1Kz4D.js → MailInboxPage-DDYg0W70.js} +1 -1
- package/static/assets/{MailProcessingModal-D_qEwqmL.js → MailProcessingModal-CXIrtSz0.js} +1 -1
- package/static/assets/{MailReadPage-_q-xk_cX.js → MailReadPage-CVz6oD-y.js} +1 -1
- package/static/assets/{MailSentPage-Dj63oQ5D.js → MailSentPage-ClaVWZCR.js} +1 -1
- package/static/assets/{McpSettingsPage-DYZ0QNbp.js → McpSettingsPage-CfhBioEH.js} +1 -1
- package/static/assets/NewKnowledgePage-BUwh_DFd.js +1 -0
- package/static/assets/{NewSkillPage-BEn18f2A.js → NewSkillPage-B2rztwzD.js} +1 -1
- package/static/assets/{NewTaskPage-CSlncpI5.js → NewTaskPage-Cvw20nug.js} +1 -1
- package/static/assets/{NotFoundPage-C4x0lGai.js → NotFoundPage-CXvLVHsT.js} +1 -1
- package/static/assets/{NotificationsSettingsPage-C9YnfRlj.js → NotificationsSettingsPage-Df_GZ7_p.js} +1 -1
- package/static/assets/{ProjectEditPage-X0-4mEAS.js → ProjectEditPage-DKf6ZoiG.js} +1 -1
- package/static/assets/{ProjectPage-D8OX1GKt.js → ProjectPage-CHhx9s1k.js} +1 -1
- package/static/assets/{PromptsSettingsPage-Chc4da1S.js → PromptsSettingsPage-QTxJgO5-.js} +1 -1
- package/static/assets/{ResourceDetailPage-DDYKQxpM.js → ResourceDetailPage-C9RHHVKu.js} +1 -1
- package/static/assets/{ResourcesPage-BmOpgt3L.js → ResourcesPage-BI8tfYZ2.js} +1 -1
- package/static/assets/{RoleEditPage-Ccfu1tn1.js → RoleEditPage-N2-v2MXN.js} +1 -1
- package/static/assets/{RolePage-CcdEUjSm.js → RolePage-Da0kZMUH.js} +1 -1
- package/static/assets/{RulesSettingsPage-Cz1g_eAj.js → RulesSettingsPage-CSd5iz22.js} +1 -1
- package/static/assets/{SchedulePage-CGxZHEL-.js → SchedulePage-CS8g2Db-.js} +1 -1
- package/static/assets/{SkillDetailPage-sJg-L8A8.js → SkillDetailPage-QjqBAuFU.js} +1 -1
- package/static/assets/{SkillEditPage-BksV7GmD.js → SkillEditPage-BB0x4VVH.js} +1 -1
- package/static/assets/{SkillsPage-CwarkJmZ.js → SkillsPage-BMDNxMmZ.js} +1 -1
- package/static/assets/{SkillsSettingsPage-DTnBlBdE.js → SkillsSettingsPage-DcdeOlAl.js} +1 -1
- package/static/assets/{SourceInput-CWazIr6v.js → SourceInput-rc4KSqcv.js} +1 -1
- package/static/assets/{TagInput-Bgyxb_JU.js → TagInput-bxFcAknC.js} +1 -1
- package/static/assets/{TaskDetailPage-DlmG1kZR.js → TaskDetailPage-CAmREdfh.js} +1 -1
- package/static/assets/{TaskEditPage-BnpNeed_.js → TaskEditPage-BDgZtG36.js} +1 -1
- package/static/assets/{TasksPage-CXeTMpgy.js → TasksPage-BQ6eLw0T.js} +1 -1
- package/static/assets/{TerminalPage-BLcPt381.js → TerminalPage-BhWGRGf1.js} +1 -1
- package/static/assets/TerminalSessionPage-Bu-WiE0d.js +3 -0
- package/static/assets/{UserPreferencesPage-BNwEqlRW.js → UserPreferencesPage-B_Tu1a8h.js} +1 -1
- package/static/assets/{UserSettingsPage-BRafqkiD.js → UserSettingsPage-BnEGtrGo.js} +1 -1
- package/static/assets/{UtilitiesPage-BPX_Unxu.js → UtilitiesPage-k7ABCAig.js} +1 -1
- package/static/assets/{alert-Ci2-OWZ_.js → alert-C42EBWiI.js} +1 -1
- package/static/assets/{arrow-down-C6Flf0DF.js → arrow-down-CuFFg288.js} +1 -1
- package/static/assets/{arrow-left-7TCkaJlN.js → arrow-left-C8VbyW3d.js} +1 -1
- package/static/assets/{arrow-up-down-tqbfiBy6.js → arrow-up-down-GN3qK2mU.js} +1 -1
- package/static/assets/{arrow-up-DeQAxOPq.js → arrow-up-vC1c-5gW.js} +1 -1
- package/static/assets/{badge-D4vHU_w_.js → badge-CKwUSKzT.js} +1 -1
- package/static/assets/{browser-modal-BiaqhKHm.js → browser-modal-C9VBJ_El.js} +1 -1
- package/static/assets/{card-xkODbJy-.js → card-DRBgMGuU.js} +1 -1
- package/static/assets/{chevron-left-CvpfJBPQ.js → chevron-left-2sP4ienq.js} +1 -1
- package/static/assets/{chevron-up-BB-6OS4z.js → chevron-up-DJfyvHso.js} +1 -1
- package/static/assets/{chevrons-up-CLKrQHMU.js → chevrons-up-DfFpzHXf.js} +1 -1
- package/static/assets/{circle-alert-lnP0-w3N.js → circle-alert-DP4rtmEK.js} +1 -1
- package/static/assets/{circle-check-BPkEav83.js → circle-check-Cnp-EoKX.js} +1 -1
- package/static/assets/{circle-check-big-Dbo-OmWQ.js → circle-check-big-3mrGMFVn.js} +1 -1
- package/static/assets/{circle-play-BbtBIeo3.js → circle-play-7F5AVehH.js} +1 -1
- package/static/assets/{circle-x-BBwi8e5G.js → circle-x-DxbiyJ6w.js} +1 -1
- package/static/assets/{clipboard-Ce816tAO.js → clipboard-CQNR4_yT.js} +1 -1
- package/static/assets/{clock-BIeoO5Mt.js → clock-DGw3R_UL.js} +1 -1
- package/static/assets/{code-DTW3giBe.js → code-DSNMK8tD.js} +1 -1
- package/static/assets/{download-BgKxfry9.js → download-BWL6PFiw.js} +1 -1
- package/static/assets/{external-link--RjKXREe.js → external-link-BqUE-DMN.js} +1 -1
- package/static/assets/{eye--K-OgK7L.js → eye-BD57N1qQ.js} +1 -1
- package/static/assets/{folder-git-2-Bgv7r0zC.js → folder-git-2-CW5Zi8Bm.js} +1 -1
- package/static/assets/{index-DF_KNbKf.js → index-B0fLM-4F.js} +1 -1
- package/static/assets/{index-LMsLdXw_.js → index-B9OOTqx4.js} +1 -1
- package/static/assets/{index-4RuWYO4M.js → index-BArpuuuE.js} +1 -1
- package/static/assets/{index-Db5-BoCU.js → index-BG5vEV31.js} +1 -1
- package/static/assets/{index-R44k73Ca.js → index-BWktaW8U.js} +1 -1
- package/static/assets/{index-BQYB8kWb.js → index-Bedu89qc.js} +1 -1
- package/static/assets/{index-BD9UBXsr.js → index-BmTTXfmk.js} +1 -1
- package/static/assets/{index-Do92mBFr.js → index-CMQcknsg.js} +1 -1
- package/static/assets/{index-iIFwHD3L.js → index-CMt1ExW-.js} +1 -1
- package/static/assets/{index-BteQHbZ1.js → index-CVVL2h9f.js} +1 -1
- package/static/assets/{index-BbrX1XcC.js → index-CXWGFCS-.js} +1 -1
- package/static/assets/{index-Di7xMYoG.js → index-CheR43vH.js} +1 -1
- package/static/assets/index-Cht-fo9a.css +1 -0
- package/static/assets/{index-Dt_WtbUU.js → index-D4awulBm.js} +1 -1
- package/static/assets/{index-PyVlsLW8.js → index-DB2Tq9wz.js} +3 -3
- package/static/assets/{index-D9xZafJb.js → index-DO47L-WG.js} +1 -1
- package/static/assets/{index-Cd5hBt4x.js → index-EpelXypg.js} +1 -1
- package/static/assets/{index-BkEdELOI.js → index-X4fPPLHI.js} +1 -1
- package/static/assets/{index-CW9pK_cZ.js → index-stPObw-o.js} +1 -1
- package/static/assets/{index-Ch4GVR8L.js → index-uxv5vQZF.js} +1 -1
- package/static/assets/{info-DgZN3xWF.js → info-DMJxIp7i.js} +1 -1
- package/static/assets/{label-DvPENm3h.js → label-DxDedS8x.js} +1 -1
- package/static/assets/{markdown-editor-DpZxV-fa.js → markdown-editor-DJ2CscSp.js} +3 -3
- package/static/assets/{message-square-CoaQYehb.js → message-square-DF58cqKJ.js} +1 -1
- package/static/assets/{paperclip-ChugoOAp.js → paperclip-CHyfSVll.js} +1 -1
- package/static/assets/{pause-m9YcgxdE.js → pause-B-ouFhaQ.js} +1 -1
- package/static/assets/{play-DtFz_MLh.js → play-B0y1weCV.js} +1 -1
- package/static/assets/{radio-group-C5Te9bVb.js → radio-group-DFNQiPDU.js} +1 -1
- package/static/assets/{refresh-cw-B1bWW9Rg.js → refresh-cw-5y5jTc6x.js} +1 -1
- package/static/assets/{search-CPOHeeUa.js → search-B5deRThk.js} +1 -1
- package/static/assets/{select-B1v2u6hQ.js → select-BzOa_wZx.js} +1 -1
- package/static/assets/{switch-Bf1Cq3P6.js → switch-Bf2z8aaj.js} +1 -1
- package/static/assets/{tabs-DAbCZiFC.js → tabs-DkdBSep3.js} +1 -1
- package/static/assets/{tag-Cz4z82t0.js → tag-gRsTk0jY.js} +1 -1
- package/static/assets/{terminal-preview-DTUohQ5b.js → terminal-preview-BfrUN2ok.js} +1 -1
- package/static/assets/{use-terminal-CFbQv1ie.js → use-terminal-D6Qe1nwM.js} +1 -1
- package/static/assets/{video-B6ZJ-Epb.js → video-DXo9sCfT.js} +1 -1
- package/static/index.html +2 -2
- package/dist/lib/mcp-client.d.ts +0 -39
- package/dist/lib/mcp-client.js +0 -131
- package/dist/routes/api/v1/ai/tools.d.ts +0 -17
- package/dist/routes/api/v1/ai/tools.js +0 -931
- package/dist/routes/api/v1/context/knowledge/[filename]/index.d.ts +0 -1
- package/dist/routes/api/v1/context/knowledge/[filename]/index.js +0 -1
- package/dist/routes/api/v1/context/knowledge/[filename]/route.d.ts +0 -3
- package/dist/routes/api/v1/context/knowledge/[filename]/route.js +0 -254
- package/dist/routes/api/v1/context/knowledge/index.d.ts +0 -1
- package/dist/routes/api/v1/context/knowledge/index.js +0 -1
- package/dist/routes/api/v1/context/knowledge/route.d.ts +0 -3
- package/dist/routes/api/v1/context/knowledge/route.js +0 -176
- package/dist/routes/api/v1/proposals/[id]/route.d.ts +0 -337
- package/dist/routes/api/v1/proposals/[id]/route.js +0 -165
- package/dist/routes/api/v1/proposals/index.d.ts +0 -3
- package/dist/routes/api/v1/proposals/index.js +0 -10
- package/dist/routes/api/v1/proposals/route.d.ts +0 -315
- package/dist/routes/api/v1/proposals/route.js +0 -129
- package/dist/routes/api/v1/terminal/[proposalId]/create/index.d.ts +0 -3
- package/dist/routes/api/v1/terminal/[proposalId]/create/index.js +0 -5
- package/dist/routes/api/v1/terminal/[proposalId]/create/route.d.ts +0 -10
- package/dist/routes/api/v1/terminal/[proposalId]/create/route.js +0 -27
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.d.ts +0 -3
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.js +0 -5
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.d.ts +0 -10
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.js +0 -21
- package/dist/routes/api/v1/terminal/[proposalId]/resize/index.d.ts +0 -3
- package/dist/routes/api/v1/terminal/[proposalId]/resize/index.js +0 -5
- package/dist/routes/api/v1/terminal/[proposalId]/resize/route.d.ts +0 -10
- package/dist/routes/api/v1/terminal/[proposalId]/resize/route.js +0 -21
- package/static/assets/NewKnowledgePage-BEVMYnKG.js +0 -9
- package/static/assets/TerminalSessionPage-CeAd8IAy.js +0 -8
- package/static/assets/index-DH_vXhd4.css +0 -1
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
import { Context } from 'hono';
|
|
2
|
-
export declare function GET(c: Context): Promise<(Response & import("hono").TypedResponse<{
|
|
3
|
-
success: false;
|
|
4
|
-
error: {
|
|
5
|
-
code: string;
|
|
6
|
-
message: string;
|
|
7
|
-
};
|
|
8
|
-
}, 404, "json">) | (Response & import("hono").TypedResponse<{
|
|
9
|
-
success: true;
|
|
10
|
-
data: {
|
|
11
|
-
id: string;
|
|
12
|
-
intent: string;
|
|
13
|
-
content?: string;
|
|
14
|
-
author: {
|
|
15
|
-
type: import("@lovelybunch/types").AuthorType;
|
|
16
|
-
id: string;
|
|
17
|
-
name: string;
|
|
18
|
-
email?: string;
|
|
19
|
-
};
|
|
20
|
-
productSpecRef?: string;
|
|
21
|
-
planSteps: {
|
|
22
|
-
id: string;
|
|
23
|
-
description: string;
|
|
24
|
-
command?: string;
|
|
25
|
-
expectedOutcome?: string;
|
|
26
|
-
status: "pending" | "in-progress" | "completed" | "failed";
|
|
27
|
-
output?: string;
|
|
28
|
-
error?: string;
|
|
29
|
-
executedAt?: string;
|
|
30
|
-
}[];
|
|
31
|
-
evidence: {
|
|
32
|
-
type: "test" | "benchmark" | "screenshot" | "log" | "other";
|
|
33
|
-
description: string;
|
|
34
|
-
data: any;
|
|
35
|
-
timestamp: string;
|
|
36
|
-
}[];
|
|
37
|
-
policies: {
|
|
38
|
-
id: string;
|
|
39
|
-
name: string;
|
|
40
|
-
description: string;
|
|
41
|
-
status: "pending" | "passed" | "failed" | "skipped";
|
|
42
|
-
message?: string;
|
|
43
|
-
checkedAt?: string;
|
|
44
|
-
}[];
|
|
45
|
-
featureFlags: {
|
|
46
|
-
id: string;
|
|
47
|
-
version: string;
|
|
48
|
-
name: string;
|
|
49
|
-
description: string;
|
|
50
|
-
type: import("@lovelybunch/types").FeatureFlagType;
|
|
51
|
-
defaultValue: any;
|
|
52
|
-
scopes: string[];
|
|
53
|
-
targets: {
|
|
54
|
-
audience: string;
|
|
55
|
-
value: any;
|
|
56
|
-
percentage?: number;
|
|
57
|
-
}[];
|
|
58
|
-
killSwitch: boolean;
|
|
59
|
-
dependencies: string[];
|
|
60
|
-
createdAt: string;
|
|
61
|
-
updatedAt: string;
|
|
62
|
-
}[];
|
|
63
|
-
experiments: {
|
|
64
|
-
id: string;
|
|
65
|
-
name: string;
|
|
66
|
-
hypothesis: string;
|
|
67
|
-
variants: {
|
|
68
|
-
id: string;
|
|
69
|
-
name: string;
|
|
70
|
-
description: string;
|
|
71
|
-
allocation: number;
|
|
72
|
-
config: {
|
|
73
|
-
[x: string]: any;
|
|
74
|
-
};
|
|
75
|
-
}[];
|
|
76
|
-
allocation: {
|
|
77
|
-
method: "random" | "deterministic" | "weighted";
|
|
78
|
-
seed?: string;
|
|
79
|
-
totalAllocation: number;
|
|
80
|
-
};
|
|
81
|
-
successMetrics: string[];
|
|
82
|
-
guardrailMetrics: {
|
|
83
|
-
name: string;
|
|
84
|
-
threshold: number;
|
|
85
|
-
comparison: "greater" | "less" | "equal";
|
|
86
|
-
action: "alert" | "pause" | "stop";
|
|
87
|
-
}[];
|
|
88
|
-
stopRules: {
|
|
89
|
-
metric: string;
|
|
90
|
-
condition: string;
|
|
91
|
-
action: "stop" | "pause";
|
|
92
|
-
}[];
|
|
93
|
-
analysisConfig: {
|
|
94
|
-
confidenceLevel: number;
|
|
95
|
-
minimumSampleSize: number;
|
|
96
|
-
testType: "two-tailed" | "one-tailed";
|
|
97
|
-
};
|
|
98
|
-
status: import("@lovelybunch/types").ExperimentStatus;
|
|
99
|
-
startedAt?: string;
|
|
100
|
-
endedAt?: string;
|
|
101
|
-
}[];
|
|
102
|
-
telemetryContracts: {
|
|
103
|
-
eventName: string;
|
|
104
|
-
version: string;
|
|
105
|
-
schema: {
|
|
106
|
-
[x: string]: any;
|
|
107
|
-
};
|
|
108
|
-
piiFields: {
|
|
109
|
-
field: string;
|
|
110
|
-
classification: "none" | "quasi" | "sensitive" | "highly-sensitive";
|
|
111
|
-
handling: "clear" | "hash" | "encrypt" | "remove";
|
|
112
|
-
}[];
|
|
113
|
-
samplingRate: number;
|
|
114
|
-
retentionPolicy: {
|
|
115
|
-
duration: number;
|
|
116
|
-
archiveAfter?: number;
|
|
117
|
-
deleteAfter: number;
|
|
118
|
-
};
|
|
119
|
-
approvals: {
|
|
120
|
-
approver: string;
|
|
121
|
-
approvedAt: string;
|
|
122
|
-
comment?: string;
|
|
123
|
-
}[];
|
|
124
|
-
}[];
|
|
125
|
-
releasePlan: {
|
|
126
|
-
strategy: "immediate" | "gradual" | "scheduled" | "gated";
|
|
127
|
-
stages?: {
|
|
128
|
-
name: string;
|
|
129
|
-
percentage: number;
|
|
130
|
-
duration?: number;
|
|
131
|
-
criteria?: string[];
|
|
132
|
-
}[];
|
|
133
|
-
schedule?: string;
|
|
134
|
-
rollbackPlan?: string;
|
|
135
|
-
};
|
|
136
|
-
status: import("@lovelybunch/types").CPStatus;
|
|
137
|
-
metadata: {
|
|
138
|
-
createdAt: string;
|
|
139
|
-
updatedAt: string;
|
|
140
|
-
reviewers: string[];
|
|
141
|
-
aiInteractions: {
|
|
142
|
-
id: string;
|
|
143
|
-
timestamp: string;
|
|
144
|
-
model: string;
|
|
145
|
-
prompt: string;
|
|
146
|
-
response: string;
|
|
147
|
-
tokens: {
|
|
148
|
-
prompt: number;
|
|
149
|
-
completion: number;
|
|
150
|
-
total: number;
|
|
151
|
-
};
|
|
152
|
-
cost?: number;
|
|
153
|
-
}[];
|
|
154
|
-
tags?: string[];
|
|
155
|
-
priority?: "low" | "medium" | "high" | "critical";
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
159
|
-
success: false;
|
|
160
|
-
error: {
|
|
161
|
-
code: string;
|
|
162
|
-
message: any;
|
|
163
|
-
};
|
|
164
|
-
}, 500, "json">)>;
|
|
165
|
-
export declare function PATCH(c: Context): Promise<(Response & import("hono").TypedResponse<{
|
|
166
|
-
success: true;
|
|
167
|
-
data: {
|
|
168
|
-
id: string;
|
|
169
|
-
intent: string;
|
|
170
|
-
content?: string;
|
|
171
|
-
author: {
|
|
172
|
-
type: import("@lovelybunch/types").AuthorType;
|
|
173
|
-
id: string;
|
|
174
|
-
name: string;
|
|
175
|
-
email?: string;
|
|
176
|
-
};
|
|
177
|
-
productSpecRef?: string;
|
|
178
|
-
planSteps: {
|
|
179
|
-
id: string;
|
|
180
|
-
description: string;
|
|
181
|
-
command?: string;
|
|
182
|
-
expectedOutcome?: string;
|
|
183
|
-
status: "pending" | "in-progress" | "completed" | "failed";
|
|
184
|
-
output?: string;
|
|
185
|
-
error?: string;
|
|
186
|
-
executedAt?: string;
|
|
187
|
-
}[];
|
|
188
|
-
evidence: {
|
|
189
|
-
type: "test" | "benchmark" | "screenshot" | "log" | "other";
|
|
190
|
-
description: string;
|
|
191
|
-
data: any;
|
|
192
|
-
timestamp: string;
|
|
193
|
-
}[];
|
|
194
|
-
policies: {
|
|
195
|
-
id: string;
|
|
196
|
-
name: string;
|
|
197
|
-
description: string;
|
|
198
|
-
status: "pending" | "passed" | "failed" | "skipped";
|
|
199
|
-
message?: string;
|
|
200
|
-
checkedAt?: string;
|
|
201
|
-
}[];
|
|
202
|
-
featureFlags: {
|
|
203
|
-
id: string;
|
|
204
|
-
version: string;
|
|
205
|
-
name: string;
|
|
206
|
-
description: string;
|
|
207
|
-
type: import("@lovelybunch/types").FeatureFlagType;
|
|
208
|
-
defaultValue: any;
|
|
209
|
-
scopes: string[];
|
|
210
|
-
targets: {
|
|
211
|
-
audience: string;
|
|
212
|
-
value: any;
|
|
213
|
-
percentage?: number;
|
|
214
|
-
}[];
|
|
215
|
-
killSwitch: boolean;
|
|
216
|
-
dependencies: string[];
|
|
217
|
-
createdAt: string;
|
|
218
|
-
updatedAt: string;
|
|
219
|
-
}[];
|
|
220
|
-
experiments: {
|
|
221
|
-
id: string;
|
|
222
|
-
name: string;
|
|
223
|
-
hypothesis: string;
|
|
224
|
-
variants: {
|
|
225
|
-
id: string;
|
|
226
|
-
name: string;
|
|
227
|
-
description: string;
|
|
228
|
-
allocation: number;
|
|
229
|
-
config: {
|
|
230
|
-
[x: string]: any;
|
|
231
|
-
};
|
|
232
|
-
}[];
|
|
233
|
-
allocation: {
|
|
234
|
-
method: "random" | "deterministic" | "weighted";
|
|
235
|
-
seed?: string;
|
|
236
|
-
totalAllocation: number;
|
|
237
|
-
};
|
|
238
|
-
successMetrics: string[];
|
|
239
|
-
guardrailMetrics: {
|
|
240
|
-
name: string;
|
|
241
|
-
threshold: number;
|
|
242
|
-
comparison: "greater" | "less" | "equal";
|
|
243
|
-
action: "alert" | "pause" | "stop";
|
|
244
|
-
}[];
|
|
245
|
-
stopRules: {
|
|
246
|
-
metric: string;
|
|
247
|
-
condition: string;
|
|
248
|
-
action: "stop" | "pause";
|
|
249
|
-
}[];
|
|
250
|
-
analysisConfig: {
|
|
251
|
-
confidenceLevel: number;
|
|
252
|
-
minimumSampleSize: number;
|
|
253
|
-
testType: "two-tailed" | "one-tailed";
|
|
254
|
-
};
|
|
255
|
-
status: import("@lovelybunch/types").ExperimentStatus;
|
|
256
|
-
startedAt?: string;
|
|
257
|
-
endedAt?: string;
|
|
258
|
-
}[];
|
|
259
|
-
telemetryContracts: {
|
|
260
|
-
eventName: string;
|
|
261
|
-
version: string;
|
|
262
|
-
schema: {
|
|
263
|
-
[x: string]: any;
|
|
264
|
-
};
|
|
265
|
-
piiFields: {
|
|
266
|
-
field: string;
|
|
267
|
-
classification: "none" | "quasi" | "sensitive" | "highly-sensitive";
|
|
268
|
-
handling: "clear" | "hash" | "encrypt" | "remove";
|
|
269
|
-
}[];
|
|
270
|
-
samplingRate: number;
|
|
271
|
-
retentionPolicy: {
|
|
272
|
-
duration: number;
|
|
273
|
-
archiveAfter?: number;
|
|
274
|
-
deleteAfter: number;
|
|
275
|
-
};
|
|
276
|
-
approvals: {
|
|
277
|
-
approver: string;
|
|
278
|
-
approvedAt: string;
|
|
279
|
-
comment?: string;
|
|
280
|
-
}[];
|
|
281
|
-
}[];
|
|
282
|
-
releasePlan: {
|
|
283
|
-
strategy: "immediate" | "gradual" | "scheduled" | "gated";
|
|
284
|
-
stages?: {
|
|
285
|
-
name: string;
|
|
286
|
-
percentage: number;
|
|
287
|
-
duration?: number;
|
|
288
|
-
criteria?: string[];
|
|
289
|
-
}[];
|
|
290
|
-
schedule?: string;
|
|
291
|
-
rollbackPlan?: string;
|
|
292
|
-
};
|
|
293
|
-
status: import("@lovelybunch/types").CPStatus;
|
|
294
|
-
metadata: {
|
|
295
|
-
createdAt: string;
|
|
296
|
-
updatedAt: string;
|
|
297
|
-
reviewers: string[];
|
|
298
|
-
aiInteractions: {
|
|
299
|
-
id: string;
|
|
300
|
-
timestamp: string;
|
|
301
|
-
model: string;
|
|
302
|
-
prompt: string;
|
|
303
|
-
response: string;
|
|
304
|
-
tokens: {
|
|
305
|
-
prompt: number;
|
|
306
|
-
completion: number;
|
|
307
|
-
total: number;
|
|
308
|
-
};
|
|
309
|
-
cost?: number;
|
|
310
|
-
}[];
|
|
311
|
-
tags?: string[];
|
|
312
|
-
priority?: "low" | "medium" | "high" | "critical";
|
|
313
|
-
};
|
|
314
|
-
};
|
|
315
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
316
|
-
success: false;
|
|
317
|
-
error: {
|
|
318
|
-
code: string;
|
|
319
|
-
message: any;
|
|
320
|
-
};
|
|
321
|
-
}, 404, "json">) | (Response & import("hono").TypedResponse<{
|
|
322
|
-
success: false;
|
|
323
|
-
error: {
|
|
324
|
-
code: string;
|
|
325
|
-
message: any;
|
|
326
|
-
};
|
|
327
|
-
}, 500, "json">)>;
|
|
328
|
-
export declare function DELETE(c: Context): Promise<(Response & import("hono").TypedResponse<{
|
|
329
|
-
success: true;
|
|
330
|
-
message: string;
|
|
331
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
332
|
-
success: false;
|
|
333
|
-
error: {
|
|
334
|
-
code: string;
|
|
335
|
-
message: any;
|
|
336
|
-
};
|
|
337
|
-
}, 500, "json">)>;
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { FileStorageAdapter } from '../../../../../lib/storage/file-storage.js';
|
|
2
|
-
import { getLogger } from '@lovelybunch/core/logging';
|
|
3
|
-
import { getSlackService } from '../../../../../lib/slack/slack-service.js';
|
|
4
|
-
const storage = new FileStorageAdapter();
|
|
5
|
-
// Logger is lazily initialized inside handlers to use server config
|
|
6
|
-
export async function GET(c) {
|
|
7
|
-
try {
|
|
8
|
-
const id = c.req.param('id');
|
|
9
|
-
const proposal = await storage.getCP(id);
|
|
10
|
-
if (!proposal) {
|
|
11
|
-
return c.json({
|
|
12
|
-
success: false,
|
|
13
|
-
error: {
|
|
14
|
-
code: 'PROPOSAL_NOT_FOUND',
|
|
15
|
-
message: `Proposal with id ${id} not found`
|
|
16
|
-
}
|
|
17
|
-
}, 404);
|
|
18
|
-
}
|
|
19
|
-
return c.json({
|
|
20
|
-
success: true,
|
|
21
|
-
data: proposal
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
catch (error) {
|
|
25
|
-
console.error('Error getting proposal:', error);
|
|
26
|
-
return c.json({
|
|
27
|
-
success: false,
|
|
28
|
-
error: {
|
|
29
|
-
code: 'GET_PROPOSAL_ERROR',
|
|
30
|
-
message: error.message
|
|
31
|
-
}
|
|
32
|
-
}, 500);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
export async function PATCH(c) {
|
|
36
|
-
try {
|
|
37
|
-
const id = c.req.param('id');
|
|
38
|
-
const updates = await c.req.json();
|
|
39
|
-
// Get existing proposal to merge updates properly
|
|
40
|
-
const existing = await storage.getCP(id);
|
|
41
|
-
if (!existing) {
|
|
42
|
-
return c.json({
|
|
43
|
-
success: false,
|
|
44
|
-
error: {
|
|
45
|
-
code: 'PROPOSAL_NOT_FOUND',
|
|
46
|
-
message: `Proposal with id ${id} not found`
|
|
47
|
-
}
|
|
48
|
-
}, 404);
|
|
49
|
-
}
|
|
50
|
-
// Handle special fields like comments
|
|
51
|
-
let finalUpdates = { ...updates };
|
|
52
|
-
if (updates.comments) {
|
|
53
|
-
finalUpdates = { ...finalUpdates, comments: updates.comments };
|
|
54
|
-
}
|
|
55
|
-
await storage.updateCP(id, finalUpdates);
|
|
56
|
-
// Fetch the updated proposal
|
|
57
|
-
const updatedProposal = await storage.getCP(id);
|
|
58
|
-
// Determine what changed
|
|
59
|
-
const changedFields = Object.keys(updates);
|
|
60
|
-
const oldStatus = existing.status;
|
|
61
|
-
const newStatus = updatedProposal?.status || existing.status;
|
|
62
|
-
// Log proposal.update event
|
|
63
|
-
const logger = getLogger();
|
|
64
|
-
logger.log({
|
|
65
|
-
kind: 'proposal.update',
|
|
66
|
-
actor: updatedProposal?.author.type === 'agent'
|
|
67
|
-
? `agent:${updatedProposal.author.name}`
|
|
68
|
-
: `human:${updatedProposal?.author.email || 'unknown'}`,
|
|
69
|
-
subject: `proposal:${id}`,
|
|
70
|
-
tags: ['proposal'],
|
|
71
|
-
payload: {
|
|
72
|
-
id,
|
|
73
|
-
changes: changedFields,
|
|
74
|
-
oldStatus,
|
|
75
|
-
newStatus
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
// If status changed, also log a status.change event
|
|
79
|
-
if (oldStatus !== newStatus) {
|
|
80
|
-
logger.log({
|
|
81
|
-
kind: 'proposal.status.change',
|
|
82
|
-
actor: updatedProposal?.author.type === 'agent'
|
|
83
|
-
? `agent:${updatedProposal.author.name}`
|
|
84
|
-
: `human:${updatedProposal?.author.email || 'unknown'}`,
|
|
85
|
-
subject: `proposal:${id}`,
|
|
86
|
-
tags: ['proposal', 'status'],
|
|
87
|
-
payload: {
|
|
88
|
-
id,
|
|
89
|
-
from: oldStatus,
|
|
90
|
-
to: newStatus,
|
|
91
|
-
reason: null
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
// Send Slack notification for status change (non-blocking)
|
|
95
|
-
getSlackService().sendNotification({
|
|
96
|
-
type: 'proposal.statusChange',
|
|
97
|
-
proposalId: id,
|
|
98
|
-
intent: updatedProposal?.intent || existing.intent,
|
|
99
|
-
status: newStatus,
|
|
100
|
-
previousStatus: oldStatus,
|
|
101
|
-
}).catch(err => console.warn('[proposals] Slack notification failed:', err));
|
|
102
|
-
}
|
|
103
|
-
return c.json({
|
|
104
|
-
success: true,
|
|
105
|
-
data: updatedProposal
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
catch (error) {
|
|
109
|
-
console.error('Error updating proposal:', error);
|
|
110
|
-
if (error.message.includes('not found')) {
|
|
111
|
-
return c.json({
|
|
112
|
-
success: false,
|
|
113
|
-
error: {
|
|
114
|
-
code: 'PROPOSAL_NOT_FOUND',
|
|
115
|
-
message: error.message
|
|
116
|
-
}
|
|
117
|
-
}, 404);
|
|
118
|
-
}
|
|
119
|
-
return c.json({
|
|
120
|
-
success: false,
|
|
121
|
-
error: {
|
|
122
|
-
code: 'UPDATE_PROPOSAL_ERROR',
|
|
123
|
-
message: error.message
|
|
124
|
-
}
|
|
125
|
-
}, 500);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
export async function DELETE(c) {
|
|
129
|
-
try {
|
|
130
|
-
const id = c.req.param('id');
|
|
131
|
-
// Get proposal info before deleting
|
|
132
|
-
const proposal = await storage.getCP(id);
|
|
133
|
-
await storage.deleteCP(id);
|
|
134
|
-
// Log the deletion event
|
|
135
|
-
if (proposal) {
|
|
136
|
-
const logger = getLogger();
|
|
137
|
-
logger.log({
|
|
138
|
-
kind: 'proposal.delete',
|
|
139
|
-
actor: proposal.author.type === 'agent'
|
|
140
|
-
? `agent:${proposal.author.name}`
|
|
141
|
-
: `human:${proposal.author.email || 'unknown'}`,
|
|
142
|
-
subject: `proposal:${id}`,
|
|
143
|
-
tags: ['proposal'],
|
|
144
|
-
payload: {
|
|
145
|
-
id,
|
|
146
|
-
intent: proposal.intent
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
return c.json({
|
|
151
|
-
success: true,
|
|
152
|
-
message: `Proposal ${id} deleted successfully`
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
catch (error) {
|
|
156
|
-
console.error('Error deleting proposal:', error);
|
|
157
|
-
return c.json({
|
|
158
|
-
success: false,
|
|
159
|
-
error: {
|
|
160
|
-
code: 'DELETE_PROPOSAL_ERROR',
|
|
161
|
-
message: error.message
|
|
162
|
-
}
|
|
163
|
-
}, 500);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Hono } from 'hono';
|
|
2
|
-
import { GET, POST } from './route.js';
|
|
3
|
-
import { GET as getProposal, PATCH as patchProposal, DELETE as deleteProposal } from './[id]/route.js';
|
|
4
|
-
const proposals = new Hono();
|
|
5
|
-
proposals.get('/', GET);
|
|
6
|
-
proposals.post('/', POST);
|
|
7
|
-
proposals.get('/:id', getProposal);
|
|
8
|
-
proposals.patch('/:id', patchProposal);
|
|
9
|
-
proposals.delete('/:id', deleteProposal);
|
|
10
|
-
export default proposals;
|