@chrryai/waffles 2.4.41 → 2.4.42
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/index.d.mts +312 -1
- package/dist/index.d.ts +312 -1
- package/dist/index.js +403 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +397 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -55,6 +55,317 @@ declare const scheduledJobFactory: {
|
|
|
55
55
|
buildMany(count: number, overrides?: Partial<TribeScheduleInput>): TribeScheduleInput[];
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
+
/**
|
|
59
|
+
* ChopStick Expert - Payload Optimizer
|
|
60
|
+
*
|
|
61
|
+
* Senkron, deterministik payload optimizasyonu.
|
|
62
|
+
* JSON çıktı - AI her şeyi görsün.
|
|
63
|
+
*/
|
|
64
|
+
type JoinConfig = {
|
|
65
|
+
memories?: {
|
|
66
|
+
user?: number;
|
|
67
|
+
app?: number;
|
|
68
|
+
dna?: number;
|
|
69
|
+
thread?: number;
|
|
70
|
+
};
|
|
71
|
+
instructions?: {
|
|
72
|
+
user?: number;
|
|
73
|
+
app?: number;
|
|
74
|
+
dna?: number;
|
|
75
|
+
thread?: number;
|
|
76
|
+
};
|
|
77
|
+
characterProfile?: {
|
|
78
|
+
user?: number;
|
|
79
|
+
app?: number;
|
|
80
|
+
dna?: number;
|
|
81
|
+
thread?: number;
|
|
82
|
+
};
|
|
83
|
+
placeholders?: {
|
|
84
|
+
user?: number;
|
|
85
|
+
app?: number;
|
|
86
|
+
dna?: number;
|
|
87
|
+
thread?: number;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
type Ramen = {
|
|
91
|
+
id?: string;
|
|
92
|
+
slug?: string;
|
|
93
|
+
join?: JoinConfig;
|
|
94
|
+
depth?: number;
|
|
95
|
+
[key: string]: any;
|
|
96
|
+
};
|
|
97
|
+
declare const modelPricing: {
|
|
98
|
+
readonly "deepseek/deepseek-v3.2": {
|
|
99
|
+
readonly input: 0.28;
|
|
100
|
+
readonly output: 0.4;
|
|
101
|
+
readonly tools: true;
|
|
102
|
+
readonly analyze: false;
|
|
103
|
+
};
|
|
104
|
+
readonly "deepseek/deepseek-chat": {
|
|
105
|
+
readonly input: 0.15;
|
|
106
|
+
readonly output: 0.45;
|
|
107
|
+
readonly tools: true;
|
|
108
|
+
readonly analyze: false;
|
|
109
|
+
};
|
|
110
|
+
readonly "anthropic/claude-sonnet-4-6": {
|
|
111
|
+
readonly input: 3;
|
|
112
|
+
readonly output: 15;
|
|
113
|
+
readonly tools: true;
|
|
114
|
+
readonly analyze: true;
|
|
115
|
+
};
|
|
116
|
+
readonly "google/gemini-3.1-pro-preview": {
|
|
117
|
+
readonly input: 0.35;
|
|
118
|
+
readonly output: 1.05;
|
|
119
|
+
readonly tools: true;
|
|
120
|
+
readonly analyze: true;
|
|
121
|
+
};
|
|
122
|
+
readonly "deepseek/deepseek-v3.2-thinking": {
|
|
123
|
+
readonly input: 0.28;
|
|
124
|
+
readonly output: 0.4;
|
|
125
|
+
readonly tools: true;
|
|
126
|
+
readonly analyze: false;
|
|
127
|
+
};
|
|
128
|
+
readonly "qwen/qwen3.6-plus": {
|
|
129
|
+
readonly input: 0.3;
|
|
130
|
+
readonly output: 0.8;
|
|
131
|
+
readonly tools: true;
|
|
132
|
+
readonly analyze: true;
|
|
133
|
+
};
|
|
134
|
+
readonly "minimax/minimax-m2.5": {
|
|
135
|
+
readonly input: 0.3;
|
|
136
|
+
readonly output: 1.1;
|
|
137
|
+
readonly tools: true;
|
|
138
|
+
readonly analyze: false;
|
|
139
|
+
};
|
|
140
|
+
readonly "minimax/minimax-m2.7": {
|
|
141
|
+
readonly input: 0.3;
|
|
142
|
+
readonly output: 1.2;
|
|
143
|
+
readonly tools: true;
|
|
144
|
+
readonly analyze: false;
|
|
145
|
+
};
|
|
146
|
+
readonly "x-ai/grok-4.1-fast": {
|
|
147
|
+
readonly input: 0.5;
|
|
148
|
+
readonly output: 2;
|
|
149
|
+
readonly tools: true;
|
|
150
|
+
readonly analyze: true;
|
|
151
|
+
};
|
|
152
|
+
readonly "perplexity/sonar-pro": {
|
|
153
|
+
readonly input: 2;
|
|
154
|
+
readonly output: 8;
|
|
155
|
+
readonly tools: false;
|
|
156
|
+
readonly analyze: false;
|
|
157
|
+
};
|
|
158
|
+
readonly "openrouter/free": {
|
|
159
|
+
readonly input: 0;
|
|
160
|
+
readonly output: 0;
|
|
161
|
+
readonly tools: false;
|
|
162
|
+
readonly analyze: false;
|
|
163
|
+
};
|
|
164
|
+
readonly "openai/gpt-oss-120b:free": {
|
|
165
|
+
readonly input: 0;
|
|
166
|
+
readonly output: 0.073;
|
|
167
|
+
readonly tools: false;
|
|
168
|
+
readonly analyze: true;
|
|
169
|
+
};
|
|
170
|
+
readonly "nvidia/nemotron-3-super-120b-a12b:free": {
|
|
171
|
+
readonly input: 0;
|
|
172
|
+
readonly output: 0;
|
|
173
|
+
readonly tools: true;
|
|
174
|
+
readonly analyze: false;
|
|
175
|
+
};
|
|
176
|
+
readonly "gpt-4o": {
|
|
177
|
+
readonly input: 2.5;
|
|
178
|
+
readonly output: 10;
|
|
179
|
+
readonly tools: true;
|
|
180
|
+
readonly analyze: true;
|
|
181
|
+
};
|
|
182
|
+
readonly "gpt-4o-mini": {
|
|
183
|
+
readonly input: 0.15;
|
|
184
|
+
readonly output: 0.6;
|
|
185
|
+
readonly tools: true;
|
|
186
|
+
readonly analyze: true;
|
|
187
|
+
};
|
|
188
|
+
readonly "openai/gpt-5.4": {
|
|
189
|
+
readonly input: 2.5;
|
|
190
|
+
readonly output: 15;
|
|
191
|
+
readonly tools: true;
|
|
192
|
+
readonly analyze: true;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
interface ModelInfo {
|
|
196
|
+
modelId: string;
|
|
197
|
+
inputPrice: number;
|
|
198
|
+
outputPrice: number;
|
|
199
|
+
hasTools: boolean;
|
|
200
|
+
canAnalyze: boolean;
|
|
201
|
+
reason: string;
|
|
202
|
+
}
|
|
203
|
+
interface JoinWeights {
|
|
204
|
+
memories: {
|
|
205
|
+
user: number;
|
|
206
|
+
app: number;
|
|
207
|
+
dna: number;
|
|
208
|
+
thread: number;
|
|
209
|
+
};
|
|
210
|
+
instructions: {
|
|
211
|
+
user: number;
|
|
212
|
+
app: number;
|
|
213
|
+
dna: number;
|
|
214
|
+
thread: number;
|
|
215
|
+
};
|
|
216
|
+
characterProfile: {
|
|
217
|
+
user: number;
|
|
218
|
+
app: number;
|
|
219
|
+
dna: number;
|
|
220
|
+
thread: number;
|
|
221
|
+
};
|
|
222
|
+
placeholders: {
|
|
223
|
+
user: number;
|
|
224
|
+
app: number;
|
|
225
|
+
dna: number;
|
|
226
|
+
thread: number;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
interface ChopStickDecision {
|
|
230
|
+
join: JoinWeights;
|
|
231
|
+
depth: number;
|
|
232
|
+
model: ModelInfo;
|
|
233
|
+
reasoning: string[];
|
|
234
|
+
}
|
|
235
|
+
interface StoreAppKnowledge {
|
|
236
|
+
/** App temel bilgileri */
|
|
237
|
+
app: {
|
|
238
|
+
id: string;
|
|
239
|
+
name: string;
|
|
240
|
+
slug: string;
|
|
241
|
+
description?: string;
|
|
242
|
+
systemPrompt?: string;
|
|
243
|
+
};
|
|
244
|
+
/** Context configuration */
|
|
245
|
+
context: {
|
|
246
|
+
join: JoinWeights;
|
|
247
|
+
depth: number;
|
|
248
|
+
isMainApp: boolean;
|
|
249
|
+
};
|
|
250
|
+
/** Ne kadar data çekilecek */
|
|
251
|
+
limits: {
|
|
252
|
+
memories: number;
|
|
253
|
+
instructions: number;
|
|
254
|
+
messages: number;
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
interface StoreKnowledgeBase {
|
|
258
|
+
/** Tüm store apps */
|
|
259
|
+
apps: StoreAppKnowledge[];
|
|
260
|
+
/** Ana app (mevcut request) */
|
|
261
|
+
mainApp: StoreAppKnowledge;
|
|
262
|
+
/** Diğer apps (context için) */
|
|
263
|
+
contextApps: StoreAppKnowledge[];
|
|
264
|
+
/** Toplam context boyutu tahmini */
|
|
265
|
+
estimatedTokens: number;
|
|
266
|
+
/** Configuration metadata */
|
|
267
|
+
meta: {
|
|
268
|
+
totalApps: number;
|
|
269
|
+
reasoning: string[];
|
|
270
|
+
timestamp: string;
|
|
271
|
+
};
|
|
272
|
+
/** DNA Artifacts for context */
|
|
273
|
+
artifacts?: Array<{
|
|
274
|
+
id: string;
|
|
275
|
+
content: string;
|
|
276
|
+
type: string;
|
|
277
|
+
createdAt: string;
|
|
278
|
+
}>;
|
|
279
|
+
/** DNA Memories for context */
|
|
280
|
+
memories?: Array<{
|
|
281
|
+
id: string;
|
|
282
|
+
content: string;
|
|
283
|
+
type: string;
|
|
284
|
+
createdAt: string;
|
|
285
|
+
}>;
|
|
286
|
+
/** Current task info */
|
|
287
|
+
task?: {
|
|
288
|
+
id: string;
|
|
289
|
+
title: string;
|
|
290
|
+
description?: string;
|
|
291
|
+
status: string;
|
|
292
|
+
};
|
|
293
|
+
/** Task messages/work history */
|
|
294
|
+
messages?: {
|
|
295
|
+
messages: Array<{
|
|
296
|
+
id: string;
|
|
297
|
+
content: string;
|
|
298
|
+
role: string;
|
|
299
|
+
createdAt: string;
|
|
300
|
+
mood?: {
|
|
301
|
+
type: string;
|
|
302
|
+
};
|
|
303
|
+
}>;
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
interface ChopStickContext {
|
|
307
|
+
appType?: "chat" | "tribe" | "kanban" | "retro" | "swarm" | "focus" | "default";
|
|
308
|
+
messageCount?: number;
|
|
309
|
+
hasTimer?: boolean;
|
|
310
|
+
hasDNA?: boolean;
|
|
311
|
+
hasKanban?: boolean;
|
|
312
|
+
hasRetro?: boolean;
|
|
313
|
+
memoriesCount?: number;
|
|
314
|
+
instructionsCount?: number;
|
|
315
|
+
isBackgroundJob?: boolean;
|
|
316
|
+
isAdmin?: boolean;
|
|
317
|
+
isSatoMode?: boolean;
|
|
318
|
+
defaultModelId?: string;
|
|
319
|
+
allowsModelSwap?: boolean;
|
|
320
|
+
needsTools?: boolean;
|
|
321
|
+
needsAnalysis?: boolean;
|
|
322
|
+
preferFree?: boolean;
|
|
323
|
+
creditsLeft?: number;
|
|
324
|
+
storeAppIds?: string[];
|
|
325
|
+
mainAppId?: string;
|
|
326
|
+
}
|
|
327
|
+
declare const presets: Record<string, ChopStickDecision>;
|
|
328
|
+
type PresetName = keyof typeof presets;
|
|
329
|
+
declare function optimizeChopStick(ctx: ChopStickContext): ChopStickDecision;
|
|
330
|
+
/**
|
|
331
|
+
* Store apps için knowledge base oluştur - JSON output
|
|
332
|
+
*
|
|
333
|
+
* @example
|
|
334
|
+
* ```ts
|
|
335
|
+
* const kb = buildStoreKnowledgeBase({
|
|
336
|
+
* mainAppId: "app-123",
|
|
337
|
+
* storeAppIds: ["app-123", "app-456", "app-789"],
|
|
338
|
+
* appType: "kanban",
|
|
339
|
+
* hasDNA: true,
|
|
340
|
+
* })
|
|
341
|
+
*
|
|
342
|
+
* // Direkt JSON olarak kullan
|
|
343
|
+
* return Response.json(kb)
|
|
344
|
+
* ```
|
|
345
|
+
*/
|
|
346
|
+
declare function buildStoreKnowledgeBase(ctx: {
|
|
347
|
+
mainAppId: string;
|
|
348
|
+
storeAppIds: string[];
|
|
349
|
+
appType?: ChopStickContext["appType"];
|
|
350
|
+
hasDNA?: boolean;
|
|
351
|
+
hasTimer?: boolean;
|
|
352
|
+
hasKanban?: boolean;
|
|
353
|
+
messageCount?: number;
|
|
354
|
+
isBackgroundJob?: boolean;
|
|
355
|
+
}): StoreKnowledgeBase;
|
|
356
|
+
/** Preset al */
|
|
357
|
+
declare function getPreset(name: PresetName): ChopStickDecision;
|
|
358
|
+
/** Sadece join weights */
|
|
359
|
+
declare function getJoinWeights(ctx: ChopStickContext): JoinWeights;
|
|
360
|
+
/** Ramen payload builder */
|
|
361
|
+
declare function buildRamenPayload(base: Omit<Ramen, "join" | "depth">, ctx: ChopStickContext): Ramen & {
|
|
362
|
+
_meta: {
|
|
363
|
+
modelId: string;
|
|
364
|
+
estimatedCost: number;
|
|
365
|
+
reasoning: string[];
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
|
|
58
369
|
type modelName = "chatGPT" | "claude" | "gemini" | "sushi" | "perplexity";
|
|
59
370
|
declare const TEST_GUEST_FINGERPRINTS: string[];
|
|
60
371
|
declare const TEST_MEMBER_FINGERPRINTS: string[];
|
|
@@ -94,4 +405,4 @@ declare const log: ({ page }: {
|
|
|
94
405
|
page: Page;
|
|
95
406
|
}) => void;
|
|
96
407
|
|
|
97
|
-
export { APIClient, type ScheduledJob, TEST_GUEST_FINGERPRINTS, TEST_MEMBER_EMAILS, TEST_MEMBER_FINGERPRINTS, TEST_URL, VEX_LIVE_FINGERPRINT, VEX_LIVE_FINGERPRINTS, VEX_LIVE_FINGERPRINT_2, VEX_LIVE_FINGERPRINT_3, VEX_TEST_EMAIL, VEX_TEST_EMAIL_2, VEX_TEST_EMAIL_3, VEX_TEST_EMAIL_4, VEX_TEST_FINGERPRINT, VEX_TEST_FINGERPRINT_2, VEX_TEST_FINGERPRINT_3, VEX_TEST_FINGERPRINT_4, VEX_TEST_PASSWORD, VEX_TEST_PASSWORD_2, VEX_TEST_PASSWORD_3, VEX_TEST_PASSWORD_4, capitalizeFirstLetter, getModelCredits, getURL, isCI, log, type modelName, scheduledJobFactory, simulateInputPaste, simulatePaste, storeApps, wait };
|
|
408
|
+
export { APIClient, type ChopStickContext, type ChopStickDecision, type JoinWeights, type ModelInfo, type PresetName, type ScheduledJob, type StoreAppKnowledge, type StoreKnowledgeBase, TEST_GUEST_FINGERPRINTS, TEST_MEMBER_EMAILS, TEST_MEMBER_FINGERPRINTS, TEST_URL, VEX_LIVE_FINGERPRINT, VEX_LIVE_FINGERPRINTS, VEX_LIVE_FINGERPRINT_2, VEX_LIVE_FINGERPRINT_3, VEX_TEST_EMAIL, VEX_TEST_EMAIL_2, VEX_TEST_EMAIL_3, VEX_TEST_EMAIL_4, VEX_TEST_FINGERPRINT, VEX_TEST_FINGERPRINT_2, VEX_TEST_FINGERPRINT_3, VEX_TEST_FINGERPRINT_4, VEX_TEST_PASSWORD, VEX_TEST_PASSWORD_2, VEX_TEST_PASSWORD_3, VEX_TEST_PASSWORD_4, buildRamenPayload, buildStoreKnowledgeBase, capitalizeFirstLetter, getJoinWeights, getModelCredits, getPreset, getURL, isCI, log, type modelName, modelPricing, optimizeChopStick, presets, scheduledJobFactory, simulateInputPaste, simulatePaste, storeApps, wait };
|
package/dist/index.d.ts
CHANGED
|
@@ -55,6 +55,317 @@ declare const scheduledJobFactory: {
|
|
|
55
55
|
buildMany(count: number, overrides?: Partial<TribeScheduleInput>): TribeScheduleInput[];
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
+
/**
|
|
59
|
+
* ChopStick Expert - Payload Optimizer
|
|
60
|
+
*
|
|
61
|
+
* Senkron, deterministik payload optimizasyonu.
|
|
62
|
+
* JSON çıktı - AI her şeyi görsün.
|
|
63
|
+
*/
|
|
64
|
+
type JoinConfig = {
|
|
65
|
+
memories?: {
|
|
66
|
+
user?: number;
|
|
67
|
+
app?: number;
|
|
68
|
+
dna?: number;
|
|
69
|
+
thread?: number;
|
|
70
|
+
};
|
|
71
|
+
instructions?: {
|
|
72
|
+
user?: number;
|
|
73
|
+
app?: number;
|
|
74
|
+
dna?: number;
|
|
75
|
+
thread?: number;
|
|
76
|
+
};
|
|
77
|
+
characterProfile?: {
|
|
78
|
+
user?: number;
|
|
79
|
+
app?: number;
|
|
80
|
+
dna?: number;
|
|
81
|
+
thread?: number;
|
|
82
|
+
};
|
|
83
|
+
placeholders?: {
|
|
84
|
+
user?: number;
|
|
85
|
+
app?: number;
|
|
86
|
+
dna?: number;
|
|
87
|
+
thread?: number;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
type Ramen = {
|
|
91
|
+
id?: string;
|
|
92
|
+
slug?: string;
|
|
93
|
+
join?: JoinConfig;
|
|
94
|
+
depth?: number;
|
|
95
|
+
[key: string]: any;
|
|
96
|
+
};
|
|
97
|
+
declare const modelPricing: {
|
|
98
|
+
readonly "deepseek/deepseek-v3.2": {
|
|
99
|
+
readonly input: 0.28;
|
|
100
|
+
readonly output: 0.4;
|
|
101
|
+
readonly tools: true;
|
|
102
|
+
readonly analyze: false;
|
|
103
|
+
};
|
|
104
|
+
readonly "deepseek/deepseek-chat": {
|
|
105
|
+
readonly input: 0.15;
|
|
106
|
+
readonly output: 0.45;
|
|
107
|
+
readonly tools: true;
|
|
108
|
+
readonly analyze: false;
|
|
109
|
+
};
|
|
110
|
+
readonly "anthropic/claude-sonnet-4-6": {
|
|
111
|
+
readonly input: 3;
|
|
112
|
+
readonly output: 15;
|
|
113
|
+
readonly tools: true;
|
|
114
|
+
readonly analyze: true;
|
|
115
|
+
};
|
|
116
|
+
readonly "google/gemini-3.1-pro-preview": {
|
|
117
|
+
readonly input: 0.35;
|
|
118
|
+
readonly output: 1.05;
|
|
119
|
+
readonly tools: true;
|
|
120
|
+
readonly analyze: true;
|
|
121
|
+
};
|
|
122
|
+
readonly "deepseek/deepseek-v3.2-thinking": {
|
|
123
|
+
readonly input: 0.28;
|
|
124
|
+
readonly output: 0.4;
|
|
125
|
+
readonly tools: true;
|
|
126
|
+
readonly analyze: false;
|
|
127
|
+
};
|
|
128
|
+
readonly "qwen/qwen3.6-plus": {
|
|
129
|
+
readonly input: 0.3;
|
|
130
|
+
readonly output: 0.8;
|
|
131
|
+
readonly tools: true;
|
|
132
|
+
readonly analyze: true;
|
|
133
|
+
};
|
|
134
|
+
readonly "minimax/minimax-m2.5": {
|
|
135
|
+
readonly input: 0.3;
|
|
136
|
+
readonly output: 1.1;
|
|
137
|
+
readonly tools: true;
|
|
138
|
+
readonly analyze: false;
|
|
139
|
+
};
|
|
140
|
+
readonly "minimax/minimax-m2.7": {
|
|
141
|
+
readonly input: 0.3;
|
|
142
|
+
readonly output: 1.2;
|
|
143
|
+
readonly tools: true;
|
|
144
|
+
readonly analyze: false;
|
|
145
|
+
};
|
|
146
|
+
readonly "x-ai/grok-4.1-fast": {
|
|
147
|
+
readonly input: 0.5;
|
|
148
|
+
readonly output: 2;
|
|
149
|
+
readonly tools: true;
|
|
150
|
+
readonly analyze: true;
|
|
151
|
+
};
|
|
152
|
+
readonly "perplexity/sonar-pro": {
|
|
153
|
+
readonly input: 2;
|
|
154
|
+
readonly output: 8;
|
|
155
|
+
readonly tools: false;
|
|
156
|
+
readonly analyze: false;
|
|
157
|
+
};
|
|
158
|
+
readonly "openrouter/free": {
|
|
159
|
+
readonly input: 0;
|
|
160
|
+
readonly output: 0;
|
|
161
|
+
readonly tools: false;
|
|
162
|
+
readonly analyze: false;
|
|
163
|
+
};
|
|
164
|
+
readonly "openai/gpt-oss-120b:free": {
|
|
165
|
+
readonly input: 0;
|
|
166
|
+
readonly output: 0.073;
|
|
167
|
+
readonly tools: false;
|
|
168
|
+
readonly analyze: true;
|
|
169
|
+
};
|
|
170
|
+
readonly "nvidia/nemotron-3-super-120b-a12b:free": {
|
|
171
|
+
readonly input: 0;
|
|
172
|
+
readonly output: 0;
|
|
173
|
+
readonly tools: true;
|
|
174
|
+
readonly analyze: false;
|
|
175
|
+
};
|
|
176
|
+
readonly "gpt-4o": {
|
|
177
|
+
readonly input: 2.5;
|
|
178
|
+
readonly output: 10;
|
|
179
|
+
readonly tools: true;
|
|
180
|
+
readonly analyze: true;
|
|
181
|
+
};
|
|
182
|
+
readonly "gpt-4o-mini": {
|
|
183
|
+
readonly input: 0.15;
|
|
184
|
+
readonly output: 0.6;
|
|
185
|
+
readonly tools: true;
|
|
186
|
+
readonly analyze: true;
|
|
187
|
+
};
|
|
188
|
+
readonly "openai/gpt-5.4": {
|
|
189
|
+
readonly input: 2.5;
|
|
190
|
+
readonly output: 15;
|
|
191
|
+
readonly tools: true;
|
|
192
|
+
readonly analyze: true;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
interface ModelInfo {
|
|
196
|
+
modelId: string;
|
|
197
|
+
inputPrice: number;
|
|
198
|
+
outputPrice: number;
|
|
199
|
+
hasTools: boolean;
|
|
200
|
+
canAnalyze: boolean;
|
|
201
|
+
reason: string;
|
|
202
|
+
}
|
|
203
|
+
interface JoinWeights {
|
|
204
|
+
memories: {
|
|
205
|
+
user: number;
|
|
206
|
+
app: number;
|
|
207
|
+
dna: number;
|
|
208
|
+
thread: number;
|
|
209
|
+
};
|
|
210
|
+
instructions: {
|
|
211
|
+
user: number;
|
|
212
|
+
app: number;
|
|
213
|
+
dna: number;
|
|
214
|
+
thread: number;
|
|
215
|
+
};
|
|
216
|
+
characterProfile: {
|
|
217
|
+
user: number;
|
|
218
|
+
app: number;
|
|
219
|
+
dna: number;
|
|
220
|
+
thread: number;
|
|
221
|
+
};
|
|
222
|
+
placeholders: {
|
|
223
|
+
user: number;
|
|
224
|
+
app: number;
|
|
225
|
+
dna: number;
|
|
226
|
+
thread: number;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
interface ChopStickDecision {
|
|
230
|
+
join: JoinWeights;
|
|
231
|
+
depth: number;
|
|
232
|
+
model: ModelInfo;
|
|
233
|
+
reasoning: string[];
|
|
234
|
+
}
|
|
235
|
+
interface StoreAppKnowledge {
|
|
236
|
+
/** App temel bilgileri */
|
|
237
|
+
app: {
|
|
238
|
+
id: string;
|
|
239
|
+
name: string;
|
|
240
|
+
slug: string;
|
|
241
|
+
description?: string;
|
|
242
|
+
systemPrompt?: string;
|
|
243
|
+
};
|
|
244
|
+
/** Context configuration */
|
|
245
|
+
context: {
|
|
246
|
+
join: JoinWeights;
|
|
247
|
+
depth: number;
|
|
248
|
+
isMainApp: boolean;
|
|
249
|
+
};
|
|
250
|
+
/** Ne kadar data çekilecek */
|
|
251
|
+
limits: {
|
|
252
|
+
memories: number;
|
|
253
|
+
instructions: number;
|
|
254
|
+
messages: number;
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
interface StoreKnowledgeBase {
|
|
258
|
+
/** Tüm store apps */
|
|
259
|
+
apps: StoreAppKnowledge[];
|
|
260
|
+
/** Ana app (mevcut request) */
|
|
261
|
+
mainApp: StoreAppKnowledge;
|
|
262
|
+
/** Diğer apps (context için) */
|
|
263
|
+
contextApps: StoreAppKnowledge[];
|
|
264
|
+
/** Toplam context boyutu tahmini */
|
|
265
|
+
estimatedTokens: number;
|
|
266
|
+
/** Configuration metadata */
|
|
267
|
+
meta: {
|
|
268
|
+
totalApps: number;
|
|
269
|
+
reasoning: string[];
|
|
270
|
+
timestamp: string;
|
|
271
|
+
};
|
|
272
|
+
/** DNA Artifacts for context */
|
|
273
|
+
artifacts?: Array<{
|
|
274
|
+
id: string;
|
|
275
|
+
content: string;
|
|
276
|
+
type: string;
|
|
277
|
+
createdAt: string;
|
|
278
|
+
}>;
|
|
279
|
+
/** DNA Memories for context */
|
|
280
|
+
memories?: Array<{
|
|
281
|
+
id: string;
|
|
282
|
+
content: string;
|
|
283
|
+
type: string;
|
|
284
|
+
createdAt: string;
|
|
285
|
+
}>;
|
|
286
|
+
/** Current task info */
|
|
287
|
+
task?: {
|
|
288
|
+
id: string;
|
|
289
|
+
title: string;
|
|
290
|
+
description?: string;
|
|
291
|
+
status: string;
|
|
292
|
+
};
|
|
293
|
+
/** Task messages/work history */
|
|
294
|
+
messages?: {
|
|
295
|
+
messages: Array<{
|
|
296
|
+
id: string;
|
|
297
|
+
content: string;
|
|
298
|
+
role: string;
|
|
299
|
+
createdAt: string;
|
|
300
|
+
mood?: {
|
|
301
|
+
type: string;
|
|
302
|
+
};
|
|
303
|
+
}>;
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
interface ChopStickContext {
|
|
307
|
+
appType?: "chat" | "tribe" | "kanban" | "retro" | "swarm" | "focus" | "default";
|
|
308
|
+
messageCount?: number;
|
|
309
|
+
hasTimer?: boolean;
|
|
310
|
+
hasDNA?: boolean;
|
|
311
|
+
hasKanban?: boolean;
|
|
312
|
+
hasRetro?: boolean;
|
|
313
|
+
memoriesCount?: number;
|
|
314
|
+
instructionsCount?: number;
|
|
315
|
+
isBackgroundJob?: boolean;
|
|
316
|
+
isAdmin?: boolean;
|
|
317
|
+
isSatoMode?: boolean;
|
|
318
|
+
defaultModelId?: string;
|
|
319
|
+
allowsModelSwap?: boolean;
|
|
320
|
+
needsTools?: boolean;
|
|
321
|
+
needsAnalysis?: boolean;
|
|
322
|
+
preferFree?: boolean;
|
|
323
|
+
creditsLeft?: number;
|
|
324
|
+
storeAppIds?: string[];
|
|
325
|
+
mainAppId?: string;
|
|
326
|
+
}
|
|
327
|
+
declare const presets: Record<string, ChopStickDecision>;
|
|
328
|
+
type PresetName = keyof typeof presets;
|
|
329
|
+
declare function optimizeChopStick(ctx: ChopStickContext): ChopStickDecision;
|
|
330
|
+
/**
|
|
331
|
+
* Store apps için knowledge base oluştur - JSON output
|
|
332
|
+
*
|
|
333
|
+
* @example
|
|
334
|
+
* ```ts
|
|
335
|
+
* const kb = buildStoreKnowledgeBase({
|
|
336
|
+
* mainAppId: "app-123",
|
|
337
|
+
* storeAppIds: ["app-123", "app-456", "app-789"],
|
|
338
|
+
* appType: "kanban",
|
|
339
|
+
* hasDNA: true,
|
|
340
|
+
* })
|
|
341
|
+
*
|
|
342
|
+
* // Direkt JSON olarak kullan
|
|
343
|
+
* return Response.json(kb)
|
|
344
|
+
* ```
|
|
345
|
+
*/
|
|
346
|
+
declare function buildStoreKnowledgeBase(ctx: {
|
|
347
|
+
mainAppId: string;
|
|
348
|
+
storeAppIds: string[];
|
|
349
|
+
appType?: ChopStickContext["appType"];
|
|
350
|
+
hasDNA?: boolean;
|
|
351
|
+
hasTimer?: boolean;
|
|
352
|
+
hasKanban?: boolean;
|
|
353
|
+
messageCount?: number;
|
|
354
|
+
isBackgroundJob?: boolean;
|
|
355
|
+
}): StoreKnowledgeBase;
|
|
356
|
+
/** Preset al */
|
|
357
|
+
declare function getPreset(name: PresetName): ChopStickDecision;
|
|
358
|
+
/** Sadece join weights */
|
|
359
|
+
declare function getJoinWeights(ctx: ChopStickContext): JoinWeights;
|
|
360
|
+
/** Ramen payload builder */
|
|
361
|
+
declare function buildRamenPayload(base: Omit<Ramen, "join" | "depth">, ctx: ChopStickContext): Ramen & {
|
|
362
|
+
_meta: {
|
|
363
|
+
modelId: string;
|
|
364
|
+
estimatedCost: number;
|
|
365
|
+
reasoning: string[];
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
|
|
58
369
|
type modelName = "chatGPT" | "claude" | "gemini" | "sushi" | "perplexity";
|
|
59
370
|
declare const TEST_GUEST_FINGERPRINTS: string[];
|
|
60
371
|
declare const TEST_MEMBER_FINGERPRINTS: string[];
|
|
@@ -94,4 +405,4 @@ declare const log: ({ page }: {
|
|
|
94
405
|
page: Page;
|
|
95
406
|
}) => void;
|
|
96
407
|
|
|
97
|
-
export { APIClient, type ScheduledJob, TEST_GUEST_FINGERPRINTS, TEST_MEMBER_EMAILS, TEST_MEMBER_FINGERPRINTS, TEST_URL, VEX_LIVE_FINGERPRINT, VEX_LIVE_FINGERPRINTS, VEX_LIVE_FINGERPRINT_2, VEX_LIVE_FINGERPRINT_3, VEX_TEST_EMAIL, VEX_TEST_EMAIL_2, VEX_TEST_EMAIL_3, VEX_TEST_EMAIL_4, VEX_TEST_FINGERPRINT, VEX_TEST_FINGERPRINT_2, VEX_TEST_FINGERPRINT_3, VEX_TEST_FINGERPRINT_4, VEX_TEST_PASSWORD, VEX_TEST_PASSWORD_2, VEX_TEST_PASSWORD_3, VEX_TEST_PASSWORD_4, capitalizeFirstLetter, getModelCredits, getURL, isCI, log, type modelName, scheduledJobFactory, simulateInputPaste, simulatePaste, storeApps, wait };
|
|
408
|
+
export { APIClient, type ChopStickContext, type ChopStickDecision, type JoinWeights, type ModelInfo, type PresetName, type ScheduledJob, type StoreAppKnowledge, type StoreKnowledgeBase, TEST_GUEST_FINGERPRINTS, TEST_MEMBER_EMAILS, TEST_MEMBER_FINGERPRINTS, TEST_URL, VEX_LIVE_FINGERPRINT, VEX_LIVE_FINGERPRINTS, VEX_LIVE_FINGERPRINT_2, VEX_LIVE_FINGERPRINT_3, VEX_TEST_EMAIL, VEX_TEST_EMAIL_2, VEX_TEST_EMAIL_3, VEX_TEST_EMAIL_4, VEX_TEST_FINGERPRINT, VEX_TEST_FINGERPRINT_2, VEX_TEST_FINGERPRINT_3, VEX_TEST_FINGERPRINT_4, VEX_TEST_PASSWORD, VEX_TEST_PASSWORD_2, VEX_TEST_PASSWORD_3, VEX_TEST_PASSWORD_4, buildRamenPayload, buildStoreKnowledgeBase, capitalizeFirstLetter, getJoinWeights, getModelCredits, getPreset, getURL, isCI, log, type modelName, modelPricing, optimizeChopStick, presets, scheduledJobFactory, simulateInputPaste, simulatePaste, storeApps, wait };
|