@lovelybunch/api 1.0.76-alpha.2 → 1.0.76-alpha.3
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/dist/routes/api/v1/jobs/[id]/runs/[runId]/route.d.ts +2 -2
- package/dist/routes/api/v1/mail/route.d.ts +3 -3
- package/dist/routes/api/v1/slack/route.d.ts +6 -6
- package/dist/routes/api/v1/terminal/code/route.d.ts +1 -0
- package/dist/routes/api/v1/terminal/code/route.js +13 -3
- package/package.json +4 -4
- package/static/assets/{ActivityPage-BIYCh5I6.js → ActivityPage-Cktjpci7.js} +1 -1
- package/static/assets/{ApiKeysSettingsPage-uPmxt5fp.js → ApiKeysSettingsPage-n-srNxQn.js} +1 -1
- package/static/assets/{ArchitectureEditPage-DlNQfJe3.js → ArchitectureEditPage-DG9ahyi7.js} +1 -1
- package/static/assets/{ArchitecturePage-z4FsbdfN.js → ArchitecturePage-BfBKdW5c.js} +1 -1
- package/static/assets/{AuthSettingsPage-Ct9brG0C.js → AuthSettingsPage-Db1Xoq5F.js} +1 -1
- package/static/assets/{CallbackPage-DrMJVPyS.js → CallbackPage-CglxDr9P.js} +1 -1
- package/static/assets/{CodePage-CFl4HO-3.js → CodePage-BrgNt-bV.js} +1 -1
- package/static/assets/{CollapsibleSection-D_16mIbS.js → CollapsibleSection-vKx39wB0.js} +1 -1
- package/static/assets/{DashboardPage---KVQx1B.js → DashboardPage-BXGFgfmx.js} +1 -1
- package/static/assets/{GitPage-CNYHAHAE.js → GitPage-BcjXkIIp.js} +1 -1
- package/static/assets/{GitSettingsPage-CQbe217E.js → GitSettingsPage-Dkf0xFd3.js} +1 -1
- package/static/assets/{IdentityPage-BNrnoMAb.js → IdentityPage-B9DlFVs2.js} +1 -1
- package/static/assets/{ImplementationStepsEditor-CpIE-yvb.js → ImplementationStepsEditor-BmhZCJkG.js} +1 -1
- package/static/assets/{IntegrationsSettingsPage-Bvrthw6u.js → IntegrationsSettingsPage-pY_ByIP_.js} +1 -1
- package/static/assets/{JobDetailPage-C1uyETkW.js → JobDetailPage-DG7g8kZw.js} +1 -1
- package/static/assets/{KnowledgeDetailPage-D4ZUM3Zz.js → KnowledgeDetailPage-CUTafqOC.js} +1 -1
- package/static/assets/{KnowledgeEditPage-CkO6HZ1m.js → KnowledgeEditPage-DemxKFuT.js} +1 -1
- package/static/assets/{KnowledgePage-DTgCuE5t.js → KnowledgePage-Cy94lzVN.js} +1 -1
- package/static/assets/{LoginPage-kNNO_ouW.js → LoginPage-DIOIFPpd.js} +1 -1
- package/static/assets/{MailInboxPage-DFA4mCj0.js → MailInboxPage-C0DJJfjN.js} +1 -1
- package/static/assets/{MailProcessingModal-Caii7A8L.js → MailProcessingModal-C5c7Hxr1.js} +1 -1
- package/static/assets/{MailReadPage-DnxomkpM.js → MailReadPage-D850TxKf.js} +1 -1
- package/static/assets/{MailSentPage-BHkc5X_Y.js → MailSentPage-DdCosCt5.js} +1 -1
- package/static/assets/{McpSettingsPage-DFwFqNpn.js → McpSettingsPage-BFs7optm.js} +1 -1
- package/static/assets/{NewKnowledgePage-Dst7m_BB.js → NewKnowledgePage-CinAhmhe.js} +1 -1
- package/static/assets/{NewSkillPage-E2godqql.js → NewSkillPage-_PUiZWTT.js} +1 -1
- package/static/assets/{NewTaskPage--x_FMYzw.js → NewTaskPage-Cj_pFRNh.js} +1 -1
- package/static/assets/{NotFoundPage-CWYaoUzq.js → NotFoundPage-C1WDBXFV.js} +1 -1
- package/static/assets/{NotificationsSettingsPage-BgGoQm7i.js → NotificationsSettingsPage-CLi28JAP.js} +1 -1
- package/static/assets/{ProjectEditPage-BlQkGGW3.js → ProjectEditPage-Dr366988.js} +1 -1
- package/static/assets/{ProjectPage-cnzG8ymb.js → ProjectPage-DweaymEr.js} +1 -1
- package/static/assets/{PromptsSettingsPage-DEMozxxj.js → PromptsSettingsPage-CYJ_llrO.js} +1 -1
- package/static/assets/{ResourceDetailPage-D-amMTWE.js → ResourceDetailPage-Q2RCaRRC.js} +1 -1
- package/static/assets/{ResourcesPage-BaxxCRUq.js → ResourcesPage-DhPwqABQ.js} +1 -1
- package/static/assets/{RoleEditPage-Bn5nL0Hm.js → RoleEditPage-C31VNX51.js} +1 -1
- package/static/assets/{RolePage-BOBxbE4o.js → RolePage-BtP1ZAXn.js} +1 -1
- package/static/assets/{RulesSettingsPage-BX4-A4bn.js → RulesSettingsPage-BL9_FzSn.js} +1 -1
- package/static/assets/{SchedulePage-BNmUnXVu.js → SchedulePage-DUAZfOex.js} +1 -1
- package/static/assets/{SkillDetailPage-Dyvc1AIM.js → SkillDetailPage-DtO9qUkm.js} +1 -1
- package/static/assets/{SkillEditPage-BBr2jC5s.js → SkillEditPage-BeTa_IPy.js} +1 -1
- package/static/assets/{SkillsPage-C8moT36F.js → SkillsPage-D7cQKv9a.js} +1 -1
- package/static/assets/{SkillsSettingsPage-D1begXXp.js → SkillsSettingsPage-DEWXQvQS.js} +1 -1
- package/static/assets/{SourceInput-D_5iVkI5.js → SourceInput-DoUioMfT.js} +1 -1
- package/static/assets/{TagInput-C1r8NbaU.js → TagInput-BxCMXfcS.js} +1 -1
- package/static/assets/{TaskDetailPage-DY-hfPO_.js → TaskDetailPage-DdqyQ4Md.js} +1 -1
- package/static/assets/{TaskEditPage-BQNQc-sZ.js → TaskEditPage-Do2nmXct.js} +1 -1
- package/static/assets/{TasksPage-ssM1z2ta.js → TasksPage-CnvtbfDU.js} +1 -1
- package/static/assets/{TerminalPage-Cny60rpN.js → TerminalPage-DoijWtPu.js} +1 -1
- package/static/assets/{TerminalSessionPage-Cy2h1IvH.js → TerminalSessionPage-DpDou_1W.js} +1 -1
- package/static/assets/{UserPreferencesPage-DLLHv7Sv.js → UserPreferencesPage-Delx2st9.js} +1 -1
- package/static/assets/{UserSettingsPage-wrlm0m4w.js → UserSettingsPage-BzvZ0ENB.js} +1 -1
- package/static/assets/{UtilitiesPage-DDdi2gjr.js → UtilitiesPage-Dn1sRlZ5.js} +1 -1
- package/static/assets/{alert-ClYcOZrl.js → alert-rjIgDS-V.js} +1 -1
- package/static/assets/{arrow-down-C21GpXY8.js → arrow-down-BUF9PsVt.js} +1 -1
- package/static/assets/{arrow-left-Bo3ORcvL.js → arrow-left-D3otDKod.js} +1 -1
- package/static/assets/{arrow-up-BvV2LsrY.js → arrow-up-D_qb79lZ.js} +1 -1
- package/static/assets/{arrow-up-down-vbTTNMQ9.js → arrow-up-down-DNI83nZr.js} +1 -1
- package/static/assets/{badge-BIzmYH_4.js → badge-D2aQlcxQ.js} +1 -1
- package/static/assets/{browser-modal-CkjrwJ8N.js → browser-modal-Cdsk2tVF.js} +1 -1
- package/static/assets/{card-Bg-wA9s_.js → card-CxtDjDKY.js} +1 -1
- package/static/assets/{chevron-left-DO-Zz6cq.js → chevron-left--lDS1l8m.js} +1 -1
- package/static/assets/{chevron-up-C115Uf6r.js → chevron-up-CjDDMMJu.js} +1 -1
- package/static/assets/{chevrons-up-bgADpoQ9.js → chevrons-up-BB0xPeZH.js} +1 -1
- package/static/assets/{circle-alert-D8dEhUnq.js → circle-alert-BMJmMq2s.js} +1 -1
- package/static/assets/{circle-check-CS2LuTcV.js → circle-check-ByTq4NJ8.js} +1 -1
- package/static/assets/{circle-check-big-Bm4c-_XI.js → circle-check-big-ffEHzVVe.js} +1 -1
- package/static/assets/{circle-play-N-BXePlE.js → circle-play-1hF_cA0H.js} +1 -1
- package/static/assets/{circle-x-DWHqcJFb.js → circle-x-DmE_F1rc.js} +1 -1
- package/static/assets/{clipboard-BBdw7Fw8.js → clipboard-BjaDjgWb.js} +1 -1
- package/static/assets/{clock-Cg9nPTux.js → clock-BB0UgsVd.js} +1 -1
- package/static/assets/{code-D21v96Wj.js → code-DOk08pmu.js} +1 -1
- package/static/assets/{download-ULpe9uEL.js → download-Dcxv9aVW.js} +1 -1
- package/static/assets/{external-link--nEePPjR.js → external-link-DIMKYjHG.js} +1 -1
- package/static/assets/{eye-nqxk2SXP.js → eye-jNavJOmE.js} +1 -1
- package/static/assets/{folder-git-2-D1jARXTb.js → folder-git-2-CYrsj8b-.js} +1 -1
- package/static/assets/{index-AeonINTL.js → index-B80Gxduz.js} +1 -1
- package/static/assets/{index-ChD5bDHD.js → index-BA3w3CnT.js} +1 -1
- package/static/assets/{index-AIsVwTBP.js → index-BVRdkhj2.js} +1 -1
- package/static/assets/{index-BBY4n5t-.js → index-BduAKlgn.js} +1 -1
- package/static/assets/{index-Beun4ywN.js → index-Be7gMvi9.js} +1 -1
- package/static/assets/{index-DHmd0I4e.js → index-BfNvp3tP.js} +1 -1
- package/static/assets/{index-CR0uN9wO.js → index-Bnh1XFKf.js} +1 -1
- package/static/assets/{index-BEkvG6MQ.js → index-CD4GQ7sO.js} +1 -1
- package/static/assets/{index-CawWXqM_.js → index-CMVAyePi.js} +1 -1
- package/static/assets/{index-D8UBHQdy.js → index-CP0Sm80t.js} +1 -1
- package/static/assets/{index-DCrCdQ-J.js → index-CVuqy6zg.js} +1 -1
- package/static/assets/{index-ClFRvTkG.js → index-CWpX8DAq.js} +1 -1
- package/static/assets/{index-p-EXqOgO.js → index-CjdjJ5zF.js} +1 -1
- package/static/assets/{index-80RT6UXi.js → index-CsUt0G9A.js} +1 -1
- package/static/assets/{index-DF2yEDGL.js → index-Dnh3d5dh.js} +3 -3
- package/static/assets/{index-CRSfgM43.js → index-QNazGQsT.js} +1 -1
- package/static/assets/{index-BEvAFxs_.js → index-SImVYpAE.js} +1 -1
- package/static/assets/{index-DvIiLgyh.js → index-dad-EstO.js} +1 -1
- package/static/assets/{index-BS_uzzCh.js → index-q8NyCSdt.js} +1 -1
- package/static/assets/{info-jWH_Nbw8.js → info-Yy5O8i5m.js} +1 -1
- package/static/assets/{label-Bo7tep86.js → label-Cz7OkZOa.js} +1 -1
- package/static/assets/{markdown-editor-DGcgv9Jo.js → markdown-editor-BB9LQlVV.js} +3 -3
- package/static/assets/{message-square-CJkxqplf.js → message-square-CM5C3WrG.js} +1 -1
- package/static/assets/{paperclip-Dw99lBW-.js → paperclip-DeU_srFt.js} +1 -1
- package/static/assets/{pause-CSm_MUb9.js → pause-CTaIY1s_.js} +1 -1
- package/static/assets/{pipeline-builders-UvjOF56t.js → pipeline-builders-Bkf0wt_O.js} +11 -11
- package/static/assets/{play-Sq1Ji6eG.js → play-B1b-UHj0.js} +1 -1
- package/static/assets/{radio-group-BfqZdNY5.js → radio-group-BWLXdTdF.js} +1 -1
- package/static/assets/{refresh-cw-DwXF5JvK.js → refresh-cw-DY5O1wul.js} +1 -1
- package/static/assets/{search-NagOQziO.js → search-B1RvqxVs.js} +1 -1
- package/static/assets/{select-XHfMw_BF.js → select-DGSoJZ_9.js} +1 -1
- package/static/assets/{switch-uoWXvqqm.js → switch-BD6hHCvO.js} +1 -1
- package/static/assets/{tabs-Be_b96k_.js → tabs-gR86EHwh.js} +1 -1
- package/static/assets/{tag-wGnl5hoT.js → tag-B6vbC3rM.js} +1 -1
- package/static/assets/{terminal-preview-BBm_7lm8.js → terminal-preview-BF6OYmEL.js} +1 -1
- package/static/assets/{use-terminal-QLr-9n4J.js → use-terminal-D6UJQuYa.js} +1 -1
- package/static/assets/{video-Dn8vsERP.js → video-NvQlXQ8s.js} +1 -1
- package/static/index.html +1 -1
- 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
|
@@ -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;
|