teleton 0.7.4 → 0.8.0
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/README.md +43 -30
- package/dist/chunk-3RG5ZIWI.js +10 -0
- package/dist/{chunk-U7FQYCBQ.js → chunk-7TECSLJ4.js} +2 -2
- package/dist/{chunk-LAQOUFOJ.js → chunk-H36RFKRI.js} +7583 -11185
- package/dist/{chunk-RO62LO6Z.js → chunk-IJBWWQE4.js} +4 -0
- package/dist/{chunk-BGC2IUM5.js → chunk-JHYZYFZJ.js} +69 -20
- package/dist/{chunk-QOQWUUA4.js → chunk-OJCLKU5Z.js} +68 -2
- package/dist/{chunk-OCLG5GKI.js → chunk-P36I6OIV.js} +2 -2
- package/dist/chunk-PHSAHTK4.js +314 -0
- package/dist/{chunk-5PLZ3KSO.js → chunk-QVBSUYVX.js} +14 -42
- package/dist/{chunk-4DU3C27M.js → chunk-R4YSJ4EY.js} +5 -1
- package/dist/chunk-RQBAMUCV.js +10281 -0
- package/dist/{chunk-XDYDA2KV.js → chunk-SD4NLLYG.js} +293 -64
- package/dist/chunk-TVRZJIZX.js +292 -0
- package/dist/{chunk-EK7M5K26.js → chunk-U56QTM46.js} +3 -3
- package/dist/{chunk-XBKSS6DM.js → chunk-VFA7QMCZ.js} +5 -3
- package/dist/{chunk-VAUJSSD3.js → chunk-XQUHC3JZ.js} +1 -1
- package/dist/cli/index.js +96 -33
- package/dist/{client-RTNALK7W.js → client-LNZTDQSA.js} +6 -7
- package/dist/{get-my-gifts-TPVUGUWT.js → get-my-gifts-OMGKOEPM.js} +1 -1
- package/dist/index.js +15 -17
- package/dist/{memory-JQZ6MTRU.js → memory-AS7WKGTW.js} +7 -8
- package/dist/{migrate-GS5ACQDA.js → migrate-POHWYEIW.js} +7 -8
- package/dist/{multipart-parser-S3YC6NRJ.js → multipart-parser-UFQLJOV2.js} +2 -2
- package/dist/{paths-TMNTEDDD.js → paths-XA2RJH4S.js} +1 -1
- package/dist/{server-TCJOBV3D.js → server-H3QA252W.js} +39 -12
- package/dist/{setup-server-YHYJLAMA.js → setup-server-QXED3D2L.js} +24 -12
- package/dist/store-GAFULOOX.js +34 -0
- package/dist/{task-dependency-resolver-WKZWJLLM.js → task-dependency-resolver-3FIKQ7Z6.js} +3 -3
- package/dist/{task-executor-PD3H4MLO.js → task-executor-RUTFG6VG.js} +2 -2
- package/dist/{tasks-QSCWSMPS.js → tasks-BEZ4QRI2.js} +1 -1
- package/dist/{tool-adapter-Y3TCEQOC.js → tool-adapter-IH5VGBOO.js} +1 -1
- package/dist/{tool-index-6HBRVXVG.js → tool-index-H3SHOJC3.js} +6 -6
- package/dist/{transcript-UDJZP6NK.js → transcript-IMNE6KU3.js} +2 -2
- package/dist/web/assets/index-BrVqauzj.css +1 -0
- package/dist/web/assets/index-DYeEkvJ6.js +72 -0
- package/dist/web/assets/{index.es-CqZHj0tz.js → index.es-DkU1GvWU.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +2 -2
- package/dist/BigInteger-DQ33LTTE.js +0 -5
- package/dist/chunk-JQDLW7IE.js +0 -107
- package/dist/chunk-QGM4M3NI.js +0 -37
- package/dist/chunk-RMLQS3X6.js +0 -161
- package/dist/chunk-TSKJCWQQ.js +0 -1263
- package/dist/chunk-UCN6TI25.js +0 -143
- package/dist/chunk-YFG2QHLA.js +0 -3585
- package/dist/web/assets/index-B6M9knfJ.css +0 -1
- package/dist/web/assets/index-DAGeQfVZ.js +0 -72
- package/scripts/patch-gramjs.sh +0 -46
- package/scripts/postinstall.mjs +0 -16
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getClaudeCodeApiKey,
|
|
3
|
+
getProviderMetadata,
|
|
3
4
|
refreshClaudeCodeApiKey
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
getProviderMetadata
|
|
7
|
-
} from "./chunk-RMLQS3X6.js";
|
|
5
|
+
} from "./chunk-PHSAHTK4.js";
|
|
8
6
|
import {
|
|
9
7
|
appendToTranscript,
|
|
10
8
|
readTranscript
|
|
11
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-P36I6OIV.js";
|
|
12
10
|
import {
|
|
13
11
|
fetchWithTimeout
|
|
14
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XQUHC3JZ.js";
|
|
15
13
|
import {
|
|
16
14
|
createLogger
|
|
17
15
|
} from "./chunk-RCMD3U65.js";
|
|
@@ -185,31 +183,8 @@ async function registerLocalModels(baseUrl) {
|
|
|
185
183
|
return [];
|
|
186
184
|
}
|
|
187
185
|
}
|
|
188
|
-
var
|
|
189
|
-
"kimi-k2.5":
|
|
190
|
-
id: "kimi-k2.5",
|
|
191
|
-
name: "Kimi K2.5",
|
|
192
|
-
api: "openai-completions",
|
|
193
|
-
provider: "moonshot",
|
|
194
|
-
baseUrl: "https://api.moonshot.ai/v1",
|
|
195
|
-
reasoning: false,
|
|
196
|
-
input: ["text", "image"],
|
|
197
|
-
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
198
|
-
contextWindow: 256e3,
|
|
199
|
-
maxTokens: 8192
|
|
200
|
-
},
|
|
201
|
-
"kimi-k2-thinking": {
|
|
202
|
-
id: "kimi-k2-thinking",
|
|
203
|
-
name: "Kimi K2 Thinking",
|
|
204
|
-
api: "openai-completions",
|
|
205
|
-
provider: "moonshot",
|
|
206
|
-
baseUrl: "https://api.moonshot.ai/v1",
|
|
207
|
-
reasoning: true,
|
|
208
|
-
input: ["text"],
|
|
209
|
-
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
210
|
-
contextWindow: 256e3,
|
|
211
|
-
maxTokens: 8192
|
|
212
|
-
}
|
|
186
|
+
var MOONSHOT_MODEL_ALIASES = {
|
|
187
|
+
"kimi-k2.5": "k2p5"
|
|
213
188
|
};
|
|
214
189
|
function getProviderModel(provider, modelId) {
|
|
215
190
|
const cacheKey = `${provider}:${modelId}`;
|
|
@@ -240,12 +215,8 @@ function getProviderModel(provider, modelId) {
|
|
|
240
215
|
}
|
|
241
216
|
throw new Error("No local models available. Is the LLM server running?");
|
|
242
217
|
}
|
|
243
|
-
if (
|
|
244
|
-
|
|
245
|
-
if (model) {
|
|
246
|
-
modelCache.set(cacheKey, model);
|
|
247
|
-
return model;
|
|
248
|
-
}
|
|
218
|
+
if (provider === "moonshot" && MOONSHOT_MODEL_ALIASES[modelId]) {
|
|
219
|
+
modelId = MOONSHOT_MODEL_ALIASES[modelId];
|
|
249
220
|
}
|
|
250
221
|
try {
|
|
251
222
|
const model = getModel(meta.piAiProvider, modelId);
|
|
@@ -291,7 +262,7 @@ async function chatWithContext(config, options) {
|
|
|
291
262
|
systemPrompt = "/no_think\n" + systemPrompt;
|
|
292
263
|
if (tools && tools.length > 0) {
|
|
293
264
|
cocoonAllowedTools = new Set(tools.map((t) => t.name));
|
|
294
|
-
const { injectToolsIntoSystemPrompt } = await import("./tool-adapter-
|
|
265
|
+
const { injectToolsIntoSystemPrompt } = await import("./tool-adapter-IH5VGBOO.js");
|
|
295
266
|
systemPrompt = injectToolsIntoSystemPrompt(systemPrompt, tools);
|
|
296
267
|
tools = void 0;
|
|
297
268
|
}
|
|
@@ -301,15 +272,16 @@ async function chatWithContext(config, options) {
|
|
|
301
272
|
systemPrompt,
|
|
302
273
|
tools
|
|
303
274
|
};
|
|
304
|
-
const temperature =
|
|
275
|
+
const temperature = options.temperature ?? config.temperature;
|
|
305
276
|
const completeOptions = {
|
|
306
277
|
apiKey: getEffectiveApiKey(provider, config.api_key),
|
|
307
278
|
maxTokens: options.maxTokens ?? config.max_tokens,
|
|
308
279
|
temperature,
|
|
309
|
-
sessionId: options.sessionId
|
|
280
|
+
sessionId: options.sessionId,
|
|
281
|
+
cacheRetention: "long"
|
|
310
282
|
};
|
|
311
283
|
if (isCocoon) {
|
|
312
|
-
const { stripCocoonPayload } = await import("./tool-adapter-
|
|
284
|
+
const { stripCocoonPayload } = await import("./tool-adapter-IH5VGBOO.js");
|
|
313
285
|
completeOptions.onPayload = stripCocoonPayload;
|
|
314
286
|
}
|
|
315
287
|
let response = await complete(model, context, completeOptions);
|
|
@@ -324,7 +296,7 @@ async function chatWithContext(config, options) {
|
|
|
324
296
|
if (isCocoon) {
|
|
325
297
|
const textBlock = response.content.find((b) => b.type === "text");
|
|
326
298
|
if (textBlock?.type === "text" && textBlock.text.includes("<tool_call>")) {
|
|
327
|
-
const { parseToolCallsFromText, extractPlainText } = await import("./tool-adapter-
|
|
299
|
+
const { parseToolCallsFromText, extractPlainText } = await import("./tool-adapter-IH5VGBOO.js");
|
|
328
300
|
const syntheticCalls = parseToolCallsFromText(textBlock.text, cocoonAllowedTools);
|
|
329
301
|
if (syntheticCalls.length > 0) {
|
|
330
302
|
const plainText = extractPlainText(textBlock.text);
|
|
@@ -10,8 +10,10 @@ var RETRY_BLOCKCHAIN_BASE_DELAY_MS = 2e3;
|
|
|
10
10
|
var RETRY_BLOCKCHAIN_MAX_DELAY_MS = 15e3;
|
|
11
11
|
var RETRY_BLOCKCHAIN_TIMEOUT_MS = 3e4;
|
|
12
12
|
var GRAMJS_RETRY_DELAY_MS = 1e3;
|
|
13
|
+
var GRAMJS_CONNECT_RETRY_DELAY_MS = 3e3;
|
|
13
14
|
var TOOL_EXECUTION_TIMEOUT_MS = 9e4;
|
|
14
15
|
var SHUTDOWN_TIMEOUT_MS = 1e4;
|
|
16
|
+
var TYPING_REFRESH_MS = 4e3;
|
|
15
17
|
|
|
16
18
|
export {
|
|
17
19
|
TTS_TIMEOUT_MS,
|
|
@@ -25,6 +27,8 @@ export {
|
|
|
25
27
|
RETRY_BLOCKCHAIN_MAX_DELAY_MS,
|
|
26
28
|
RETRY_BLOCKCHAIN_TIMEOUT_MS,
|
|
27
29
|
GRAMJS_RETRY_DELAY_MS,
|
|
30
|
+
GRAMJS_CONNECT_RETRY_DELAY_MS,
|
|
28
31
|
TOOL_EXECUTION_TIMEOUT_MS,
|
|
29
|
-
SHUTDOWN_TIMEOUT_MS
|
|
32
|
+
SHUTDOWN_TIMEOUT_MS,
|
|
33
|
+
TYPING_REFRESH_MS
|
|
30
34
|
};
|