@pixelbyte-software/pixcode 1.53.4 → 1.53.6
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/assets/{index-DlwfTw9d.js → index-DP7jnMyc.js} +155 -155
- package/dist/index.html +1 -1
- package/dist-server/server/database/db.js +28 -0
- package/dist-server/server/database/db.js.map +1 -1
- package/dist-server/server/openai-codex.js +5 -0
- package/dist-server/server/openai-codex.js.map +1 -1
- package/dist-server/server/routes/agent.js +17 -7
- package/dist-server/server/routes/agent.js.map +1 -1
- package/dist-server/server/routes/telegram.js +16 -2
- package/dist-server/server/routes/telegram.js.map +1 -1
- package/dist-server/server/services/telegram/bot.js +9 -4
- package/dist-server/server/services/telegram/bot.js.map +1 -1
- package/dist-server/server/services/telegram/control-center.js +914 -98
- package/dist-server/server/services/telegram/control-center.js.map +1 -1
- package/dist-server/server/services/telegram/telegram-gateway.js +286 -0
- package/dist-server/server/services/telegram/telegram-gateway.js.map +1 -0
- package/dist-server/server/services/telegram/telegram-http-client.js +10 -8
- package/dist-server/server/services/telegram/telegram-http-client.js.map +1 -1
- package/dist-server/server/services/telegram/translations.js +72 -0
- package/dist-server/server/services/telegram/translations.js.map +1 -1
- package/package.json +1 -1
- package/scripts/smoke/telegram-control.mjs +50 -2
- package/server/database/db.js +28 -0
- package/server/openai-codex.js +5 -0
- package/server/routes/agent.js +17 -7
- package/server/routes/telegram.js +25 -2
- package/server/services/telegram/bot.js +8 -4
- package/server/services/telegram/control-center.js +927 -98
- package/server/services/telegram/telegram-gateway.js +314 -0
- package/server/services/telegram/telegram-http-client.js +7 -5
- package/server/services/telegram/translations.js +72 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
import { telegramLinksDb } from '../../database/db.js';
|
|
4
|
+
|
|
5
|
+
export const TELEGRAM_CONTROL_SCOPES = [
|
|
6
|
+
'admin',
|
|
7
|
+
'telegram:read',
|
|
8
|
+
'telegram:write',
|
|
9
|
+
'providers:read',
|
|
10
|
+
'providers:write',
|
|
11
|
+
'orchestration:read',
|
|
12
|
+
'orchestration:write',
|
|
13
|
+
'projects:read',
|
|
14
|
+
'sessions:read',
|
|
15
|
+
'webhooks:read',
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
export const TELEGRAM_PROVIDERS = ['claude', 'cursor', 'codex', 'gemini', 'qwen', 'opencode'];
|
|
19
|
+
|
|
20
|
+
export const TELEGRAM_PROGRESS_MODES = ['final', 'steps', 'all', 'errors'];
|
|
21
|
+
|
|
22
|
+
const MAX_TELEGRAM_TEXT = 3600;
|
|
23
|
+
const CONFIRMATION_TTL_MS = 5 * 60 * 1000;
|
|
24
|
+
const DEFAULT_ACTION_TIMEOUT_MS = 10 * 60 * 1000;
|
|
25
|
+
const chatQueues = new Map();
|
|
26
|
+
|
|
27
|
+
export const TELEGRAM_AI_INTENT_ACTIONS = [
|
|
28
|
+
'agent_prompt',
|
|
29
|
+
'show_menu',
|
|
30
|
+
'show_projects',
|
|
31
|
+
'select_project',
|
|
32
|
+
'show_provider_menu',
|
|
33
|
+
'select_provider',
|
|
34
|
+
'show_model_menu',
|
|
35
|
+
'select_model',
|
|
36
|
+
'show_runs',
|
|
37
|
+
'show_approvals',
|
|
38
|
+
'show_workflows',
|
|
39
|
+
'run_workflow',
|
|
40
|
+
'show_sessions',
|
|
41
|
+
'new_chat',
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
45
|
+
|
|
46
|
+
export function splitTelegramText(text, max = MAX_TELEGRAM_TEXT) {
|
|
47
|
+
const value = String(text || '').trim();
|
|
48
|
+
if (!value) return [''];
|
|
49
|
+
if (value.length <= max) return [value];
|
|
50
|
+
|
|
51
|
+
const chunks = [];
|
|
52
|
+
let remaining = value;
|
|
53
|
+
while (remaining.length > max) {
|
|
54
|
+
let cut = remaining.lastIndexOf('\n', max);
|
|
55
|
+
if (cut < Math.floor(max * 0.55)) cut = remaining.lastIndexOf(' ', max);
|
|
56
|
+
if (cut < Math.floor(max * 0.55)) cut = max;
|
|
57
|
+
chunks.push(remaining.slice(0, cut).trim());
|
|
58
|
+
remaining = remaining.slice(cut).trim();
|
|
59
|
+
}
|
|
60
|
+
if (remaining) chunks.push(remaining);
|
|
61
|
+
return chunks;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function normalizeTelegramToolResult(result = {}) {
|
|
65
|
+
if (result?.ok === false) {
|
|
66
|
+
return {
|
|
67
|
+
ok: false,
|
|
68
|
+
message: String(result.message || result.error || 'Action failed.'),
|
|
69
|
+
data: result.data ?? null,
|
|
70
|
+
requiresConfirmation: Boolean(result.requiresConfirmation),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
ok: true,
|
|
75
|
+
message: String(result.message || 'OK'),
|
|
76
|
+
data: result.data ?? result,
|
|
77
|
+
requiresConfirmation: Boolean(result.requiresConfirmation),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function withTimeout(promiseFactory, timeoutMs = DEFAULT_ACTION_TIMEOUT_MS) {
|
|
82
|
+
let timeoutId;
|
|
83
|
+
const timeout = new Promise((_, reject) => {
|
|
84
|
+
timeoutId = setTimeout(() => {
|
|
85
|
+
const error = new Error(`Telegram action timed out after ${timeoutMs}ms`);
|
|
86
|
+
error.code = 'TELEGRAM_ACTION_TIMEOUT';
|
|
87
|
+
reject(error);
|
|
88
|
+
}, timeoutMs);
|
|
89
|
+
});
|
|
90
|
+
return Promise.race([Promise.resolve().then(promiseFactory), timeout])
|
|
91
|
+
.finally(() => clearTimeout(timeoutId));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function isRetryableError(error) {
|
|
95
|
+
const status = error?.status || error?.statusCode || error?.response?.status || error?.response?.statusCode;
|
|
96
|
+
if ([408, 409, 425, 429, 500, 502, 503, 504].includes(Number(status))) return true;
|
|
97
|
+
const message = String(error?.message || '');
|
|
98
|
+
return /ECONNRESET|ETIMEDOUT|EAI_AGAIN|fetch failed|network/i.test(message);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export async function retryWithBackoff(action, {
|
|
102
|
+
retries = 2,
|
|
103
|
+
baseDelayMs = 500,
|
|
104
|
+
maxDelayMs = 4000,
|
|
105
|
+
shouldRetry = isRetryableError,
|
|
106
|
+
} = {}) {
|
|
107
|
+
let lastError;
|
|
108
|
+
for (let attempt = 0; attempt <= retries; attempt += 1) {
|
|
109
|
+
try {
|
|
110
|
+
return await action(attempt);
|
|
111
|
+
} catch (error) {
|
|
112
|
+
lastError = error;
|
|
113
|
+
if (attempt >= retries || !shouldRetry(error)) break;
|
|
114
|
+
const delay = Math.min(maxDelayMs, baseDelayMs * 2 ** attempt);
|
|
115
|
+
await sleep(delay);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
throw lastError;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function enqueueTelegramJob(chatId, job, { timeoutMs = DEFAULT_ACTION_TIMEOUT_MS } = {}) {
|
|
122
|
+
const key = String(chatId);
|
|
123
|
+
const previous = chatQueues.get(key) || Promise.resolve();
|
|
124
|
+
const current = previous
|
|
125
|
+
.catch(() => {})
|
|
126
|
+
.then(() => withTimeout(job, timeoutMs));
|
|
127
|
+
let queued;
|
|
128
|
+
queued = current.finally(() => {
|
|
129
|
+
if (chatQueues.get(key) === queued) chatQueues.delete(key);
|
|
130
|
+
}).catch(() => {});
|
|
131
|
+
chatQueues.set(key, queued);
|
|
132
|
+
return current;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export async function runTelegramTool({
|
|
136
|
+
userId,
|
|
137
|
+
action,
|
|
138
|
+
execute,
|
|
139
|
+
remoteControlRequired = true,
|
|
140
|
+
timeoutMs = DEFAULT_ACTION_TIMEOUT_MS,
|
|
141
|
+
retries = 1,
|
|
142
|
+
}) {
|
|
143
|
+
const state = telegramLinksDb.getControlState(userId);
|
|
144
|
+
if (remoteControlRequired && state.remoteControlEnabled === false) {
|
|
145
|
+
return normalizeTelegramToolResult({
|
|
146
|
+
ok: false,
|
|
147
|
+
message: 'REMOTE_CONTROL_DISABLED',
|
|
148
|
+
data: { action },
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const data = await retryWithBackoff(
|
|
153
|
+
() => withTimeout(execute, timeoutMs),
|
|
154
|
+
{ retries },
|
|
155
|
+
);
|
|
156
|
+
return normalizeTelegramToolResult({ ok: true, message: 'OK', data });
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function createTelegramConfirmation(userId, action, payload = {}) {
|
|
160
|
+
const pending = {
|
|
161
|
+
id: crypto.randomBytes(8).toString('hex'),
|
|
162
|
+
action,
|
|
163
|
+
payload,
|
|
164
|
+
expiresAt: new Date(Date.now() + CONFIRMATION_TTL_MS).toISOString(),
|
|
165
|
+
};
|
|
166
|
+
telegramLinksDb.updateControlState(userId, { pendingConfirmation: pending });
|
|
167
|
+
return pending;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function consumeTelegramConfirmation(userId, id) {
|
|
171
|
+
const state = telegramLinksDb.getControlState(userId);
|
|
172
|
+
const pending = state.pendingConfirmation;
|
|
173
|
+
if (!pending || pending.id !== id) return { ok: false, reason: 'missing' };
|
|
174
|
+
if (Date.parse(pending.expiresAt) <= Date.now()) {
|
|
175
|
+
telegramLinksDb.updateControlState(userId, { pendingConfirmation: null });
|
|
176
|
+
return { ok: false, reason: 'expired' };
|
|
177
|
+
}
|
|
178
|
+
telegramLinksDb.updateControlState(userId, { pendingConfirmation: null });
|
|
179
|
+
return { ok: true, confirmation: pending };
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function clearTelegramConfirmation(userId, id = null) {
|
|
183
|
+
const state = telegramLinksDb.getControlState(userId);
|
|
184
|
+
if (id && state.pendingConfirmation?.id !== id) return false;
|
|
185
|
+
telegramLinksDb.updateControlState(userId, { pendingConfirmation: null });
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function resolveTelegramProvider(state = {}) {
|
|
190
|
+
const provider = TELEGRAM_PROVIDERS.includes(state.routerProvider)
|
|
191
|
+
? state.routerProvider
|
|
192
|
+
: state.selectedProvider;
|
|
193
|
+
return TELEGRAM_PROVIDERS.includes(provider) ? provider : 'opencode';
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function resolveTelegramModel(state = {}) {
|
|
197
|
+
return typeof state.routerModel === 'string' && state.routerModel.trim()
|
|
198
|
+
? state.routerModel.trim()
|
|
199
|
+
: state.selectedModel;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export function buildTelegramAgentPrompt(prompt, state = {}) {
|
|
203
|
+
const provider = resolveTelegramProvider(state);
|
|
204
|
+
const model = resolveTelegramModel(state);
|
|
205
|
+
const project = state.selectedProjectName || state.selectedProjectPath || 'not selected';
|
|
206
|
+
return [
|
|
207
|
+
'Source: Telegram.',
|
|
208
|
+
`Selected project: ${project}.`,
|
|
209
|
+
`Selected provider: ${provider}${model ? ` / ${model}` : ''}.`,
|
|
210
|
+
'Return a Telegram-friendly final summary with status, relevant IDs, concise output, and any diff/test summary.',
|
|
211
|
+
'Keep the final answer brief unless the user explicitly asks for detail.',
|
|
212
|
+
'',
|
|
213
|
+
'User request:',
|
|
214
|
+
String(prompt || '').trim(),
|
|
215
|
+
].join('\n');
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function readJsonObjectFromText(text) {
|
|
219
|
+
const value = String(text || '').trim();
|
|
220
|
+
if (!value) return null;
|
|
221
|
+
try {
|
|
222
|
+
const parsed = JSON.parse(value);
|
|
223
|
+
return parsed && typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : null;
|
|
224
|
+
} catch {
|
|
225
|
+
const start = value.indexOf('{');
|
|
226
|
+
const end = value.lastIndexOf('}');
|
|
227
|
+
if (start === -1 || end <= start) return null;
|
|
228
|
+
try {
|
|
229
|
+
const parsed = JSON.parse(value.slice(start, end + 1));
|
|
230
|
+
return parsed && typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : null;
|
|
231
|
+
} catch {
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
function readOptionalString(value) {
|
|
238
|
+
return typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function readConfidence(value) {
|
|
242
|
+
const numeric = Number(value);
|
|
243
|
+
if (!Number.isFinite(numeric)) return 0;
|
|
244
|
+
return Math.max(0, Math.min(1, numeric));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export function normalizeTelegramAiIntent(rawIntent, fallbackPrompt = '') {
|
|
248
|
+
const intent = rawIntent && typeof rawIntent === 'object' && !Array.isArray(rawIntent)
|
|
249
|
+
? rawIntent
|
|
250
|
+
: {};
|
|
251
|
+
const action = TELEGRAM_AI_INTENT_ACTIONS.includes(intent.action)
|
|
252
|
+
? intent.action
|
|
253
|
+
: 'agent_prompt';
|
|
254
|
+
const confidence = readConfidence(intent.confidence);
|
|
255
|
+
const safeAction = confidence >= 0.72 ? action : 'agent_prompt';
|
|
256
|
+
const prompt = readOptionalString(intent.prompt) || String(fallbackPrompt || '').trim();
|
|
257
|
+
|
|
258
|
+
return {
|
|
259
|
+
action: safeAction,
|
|
260
|
+
confidence,
|
|
261
|
+
provider: TELEGRAM_PROVIDERS.includes(intent.provider) ? intent.provider : null,
|
|
262
|
+
projectQuery: readOptionalString(intent.projectQuery),
|
|
263
|
+
model: readOptionalString(intent.model),
|
|
264
|
+
workflowInput: readOptionalString(intent.workflowInput) || prompt,
|
|
265
|
+
prompt,
|
|
266
|
+
reply: readOptionalString(intent.reply),
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function parseTelegramAiIntentResponse(text, fallbackPrompt = '') {
|
|
271
|
+
return normalizeTelegramAiIntent(readJsonObjectFromText(text), fallbackPrompt);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export function buildTelegramIntentPrompt(userText, state = {}, context = {}) {
|
|
275
|
+
const provider = resolveTelegramProvider(state);
|
|
276
|
+
const model = resolveTelegramModel(state);
|
|
277
|
+
const project = state.selectedProjectName || state.selectedProjectPath || 'not selected';
|
|
278
|
+
const projects = Array.isArray(context.projects) ? context.projects.slice(0, 12) : [];
|
|
279
|
+
const workflows = Array.isArray(context.workflows) ? context.workflows.slice(0, 12) : [];
|
|
280
|
+
|
|
281
|
+
return [
|
|
282
|
+
'You are the Telegram intent router for Pixcode.',
|
|
283
|
+
'Decide the user intent by meaning, not by matching keywords.',
|
|
284
|
+
'Do not use or describe regex, substring rules, or word-trigger rules.',
|
|
285
|
+
'If the message is casual, ambiguous, asks a broad project/status question, or could be a normal coding request, choose agent_prompt.',
|
|
286
|
+
'Only choose a control action when the user clearly asks to open/change a Pixcode control surface.',
|
|
287
|
+
'Return JSON only. Do not run tools. Do not inspect files. Do not add Markdown.',
|
|
288
|
+
'',
|
|
289
|
+
'Allowed JSON shape:',
|
|
290
|
+
'{"action":"agent_prompt|show_menu|show_projects|select_project|show_provider_menu|select_provider|show_model_menu|select_model|show_runs|show_approvals|show_workflows|run_workflow|show_sessions|new_chat","confidence":0.0,"provider":null,"projectQuery":null,"model":null,"workflowInput":null,"prompt":null,"reply":null}',
|
|
291
|
+
'',
|
|
292
|
+
'Routing policy:',
|
|
293
|
+
'- agent_prompt: default for normal chat, coding work, analysis, debugging, status questions about the repo/server, or unclear text.',
|
|
294
|
+
'- select_provider: only when a provider is explicitly requested as the Telegram provider. provider must be one of the listed providers.',
|
|
295
|
+
'- select_model: only when a concrete model id/name is explicitly requested. model must contain the model id/name.',
|
|
296
|
+
'- select_project: only when a project choice is explicit. projectQuery should be the project name/path the user meant.',
|
|
297
|
+
'- run_workflow: only when the user clearly wants the selected workflow/orchestration to run.',
|
|
298
|
+
'- show_runs/show_approvals/show_workflows/show_projects/show_provider_menu/show_model_menu/show_sessions/show_menu/new_chat: only for clear UI/navigation requests.',
|
|
299
|
+
'- If confidence is below 0.72, set action to agent_prompt.',
|
|
300
|
+
'',
|
|
301
|
+
`Current Telegram provider: ${provider}${model ? ` / ${model}` : ''}.`,
|
|
302
|
+
`Current project: ${project}.`,
|
|
303
|
+
`Available providers: ${TELEGRAM_PROVIDERS.join(', ')}.`,
|
|
304
|
+
projects.length
|
|
305
|
+
? `Known projects: ${projects.map((item) => item.displayName || item.name || item.path).filter(Boolean).join(' | ')}.`
|
|
306
|
+
: 'Known projects: none loaded.',
|
|
307
|
+
workflows.length
|
|
308
|
+
? `Known workflows: ${workflows.map((item) => item.name || item.id).filter(Boolean).join(' | ')}.`
|
|
309
|
+
: 'Known workflows: none loaded.',
|
|
310
|
+
'',
|
|
311
|
+
'User message:',
|
|
312
|
+
String(userText || '').trim(),
|
|
313
|
+
].join('\n');
|
|
314
|
+
}
|
|
@@ -64,6 +64,7 @@ export class TelegramHttpBot extends EventEmitter {
|
|
|
64
64
|
this._polling = false;
|
|
65
65
|
this._abortController = null;
|
|
66
66
|
this._pollingLoop = null;
|
|
67
|
+
this._pollingErrorCount = 0;
|
|
67
68
|
if (polling) this.startPolling();
|
|
68
69
|
}
|
|
69
70
|
|
|
@@ -184,15 +185,16 @@ export class TelegramHttpBot extends EventEmitter {
|
|
|
184
185
|
await this._emitSerial('callback_query', update.callback_query);
|
|
185
186
|
}
|
|
186
187
|
}
|
|
188
|
+
this._pollingErrorCount = 0;
|
|
187
189
|
} catch (err) {
|
|
188
190
|
// AbortError is the expected path when stopPolling() is called.
|
|
189
191
|
if (err?.name === 'AbortError' || !this._polling) break;
|
|
190
192
|
this.emit('polling_error', err);
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
await new Promise((r) => setTimeout(r,
|
|
193
|
+
const status = err?.response?.statusCode || err?.code;
|
|
194
|
+
const baseDelay = status === 409 ? 2000 : 1000;
|
|
195
|
+
const delay = Math.min(60_000, baseDelay * 2 ** this._pollingErrorCount);
|
|
196
|
+
this._pollingErrorCount = Math.min(this._pollingErrorCount + 1, 6);
|
|
197
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
196
198
|
}
|
|
197
199
|
}
|
|
198
200
|
}
|
|
@@ -55,8 +55,11 @@ const EN = {
|
|
|
55
55
|
'control.button.refresh': 'Refresh',
|
|
56
56
|
'control.button.approve': 'Approve',
|
|
57
57
|
'control.button.deny': 'Deny',
|
|
58
|
+
'control.button.confirm': 'Confirm',
|
|
59
|
+
'control.button.cancel': 'Cancel',
|
|
58
60
|
'control.noProjects': 'No Pixcode projects were found yet. Add/open a project in Pixcode first.',
|
|
59
61
|
'control.pickProject': 'Pick the project Telegram should control:',
|
|
62
|
+
'control.projectNotFound': 'No project matched "{{query}}". Pick one from the list.',
|
|
60
63
|
'control.pickProvider': 'Pick the CLI provider Telegram should use:',
|
|
61
64
|
'control.modelsFor': 'Models for {{provider}}:',
|
|
62
65
|
'control.pickWorkflow': 'Pick an orchestration workflow:',
|
|
@@ -83,6 +86,12 @@ const EN = {
|
|
|
83
86
|
'control.authMenu': 'Pick a provider for OAuth/login instructions:',
|
|
84
87
|
'control.manualInstall': 'Manual install for {{provider}}:\n{{manual}}',
|
|
85
88
|
'control.installStarted': 'Install started for {{provider}}.\nJob: {{jobId}}\nCommand: {{command}}',
|
|
89
|
+
'control.confirmationRequired': 'This action needs confirmation before it can run.',
|
|
90
|
+
'control.confirmInstall': 'Confirm CLI install/repair for {{provider}}?',
|
|
91
|
+
'control.confirmCancelRun': 'Confirm cancel for workflow run {{runId}}?',
|
|
92
|
+
'control.confirmationExpired': 'That confirmation expired. Start the action again.',
|
|
93
|
+
'control.confirmationMissing': 'No matching confirmation is pending. Start the action again.',
|
|
94
|
+
'control.confirmationCanceled': 'Action canceled.',
|
|
86
95
|
'control.settingsTitle': 'Telegram settings',
|
|
87
96
|
'control.pickLanguage': 'Pick Telegram language:',
|
|
88
97
|
'control.menuExpired': 'This menu expired. Send /menu.',
|
|
@@ -102,6 +111,33 @@ const EN = {
|
|
|
102
111
|
'control.cancelUsage': 'Use /cancel <runId>.',
|
|
103
112
|
'control.runStatus': 'Run {{runId}} status: {{status}}',
|
|
104
113
|
'control.providerAuthFallback': 'Open Pixcode Settings → Agents and connect this provider.',
|
|
114
|
+
'control.activity.agentTitle': 'Agent activity',
|
|
115
|
+
'control.activity.workflowTitle': 'Workflow activity',
|
|
116
|
+
'control.activity.routerTitle': 'Telegram AI router',
|
|
117
|
+
'control.activity.provider': 'Provider',
|
|
118
|
+
'control.activity.project': 'Project',
|
|
119
|
+
'control.activity.session': 'Session',
|
|
120
|
+
'control.activity.run': 'Run',
|
|
121
|
+
'control.activity.workflow': 'Workflow',
|
|
122
|
+
'control.activity.elapsed': 'Elapsed',
|
|
123
|
+
'control.activity.status': 'Status',
|
|
124
|
+
'control.activity.work': 'Work',
|
|
125
|
+
'control.activity.output': 'Output',
|
|
126
|
+
'control.activity.starting': 'Starting',
|
|
127
|
+
'control.activity.interpreting': 'Understanding the request with the selected provider',
|
|
128
|
+
'control.activity.routerFallback': 'Router fallback: sending this as an agent prompt',
|
|
129
|
+
'control.activity.startingProvider': 'Starting {{provider}}',
|
|
130
|
+
'control.activity.startingWorkflow': 'Starting workflow',
|
|
131
|
+
'control.activity.workflowRunning': 'Workflow running',
|
|
132
|
+
'control.activity.thinking': 'Thinking',
|
|
133
|
+
'control.activity.responding': 'Writing the response',
|
|
134
|
+
'control.activity.working': 'Running tools',
|
|
135
|
+
'control.activity.done': 'Done',
|
|
136
|
+
'control.activity.failed': 'Failed',
|
|
137
|
+
'control.activity.sessionStarted': 'Session started',
|
|
138
|
+
'control.activity.toolDone': 'Tool completed',
|
|
139
|
+
'control.activity.toolFailed': 'Tool failed',
|
|
140
|
+
'control.activity.tokens': 'Tokens',
|
|
105
141
|
'notification.taskDone': '✅ {{title}} — task completed.',
|
|
106
142
|
'notification.taskFailed': '⚠️ {{title}} — task failed: {{error}}',
|
|
107
143
|
'notification.actionRequired': '❗ {{title}} — action required.',
|
|
@@ -157,8 +193,11 @@ const TR = {
|
|
|
157
193
|
'control.button.refresh': 'Yenile',
|
|
158
194
|
'control.button.approve': 'Onayla',
|
|
159
195
|
'control.button.deny': 'Reddet',
|
|
196
|
+
'control.button.confirm': 'Onayla',
|
|
197
|
+
'control.button.cancel': 'Vazgeç',
|
|
160
198
|
'control.noProjects': 'Henüz Pixcode projesi bulunamadı. Önce Pixcode içinde proje ekle/aç.',
|
|
161
199
|
'control.pickProject': 'Telegramın kontrol edeceği projeyi seç:',
|
|
200
|
+
'control.projectNotFound': '"{{query}}" ile eşleşen proje bulunamadı. Listeden birini seç.',
|
|
162
201
|
'control.pickProvider': 'Telegramın kullanacağı CLI sağlayıcısını seç:',
|
|
163
202
|
'control.modelsFor': '{{provider}} modelleri:',
|
|
164
203
|
'control.pickWorkflow': 'Bir orkestrasyon iş akışı seç:',
|
|
@@ -185,6 +224,12 @@ const TR = {
|
|
|
185
224
|
'control.authMenu': 'OAuth/giriş yönergeleri için sağlayıcı seç:',
|
|
186
225
|
'control.manualInstall': '{{provider}} manuel kurulum:\n{{manual}}',
|
|
187
226
|
'control.installStarted': '{{provider}} kurulumu başladı.\nİş: {{jobId}}\nKomut: {{command}}',
|
|
227
|
+
'control.confirmationRequired': 'Bu işlem çalışmadan önce onay gerektiriyor.',
|
|
228
|
+
'control.confirmInstall': '{{provider}} için CLI kurulum/onarım işlemini onaylıyor musun?',
|
|
229
|
+
'control.confirmCancelRun': '{{runId}} workflow çalışmasını iptal etmeyi onaylıyor musun?',
|
|
230
|
+
'control.confirmationExpired': 'Bu onayın süresi doldu. İşlemi yeniden başlat.',
|
|
231
|
+
'control.confirmationMissing': 'Bekleyen eşleşen bir onay yok. İşlemi yeniden başlat.',
|
|
232
|
+
'control.confirmationCanceled': 'İşlem iptal edildi.',
|
|
188
233
|
'control.settingsTitle': 'Telegram ayarları',
|
|
189
234
|
'control.pickLanguage': 'Telegram dilini seç:',
|
|
190
235
|
'control.menuExpired': 'Bu menünün süresi doldu. /menu gönder.',
|
|
@@ -204,6 +249,33 @@ const TR = {
|
|
|
204
249
|
'control.cancelUsage': '/cancel <runId> kullan.',
|
|
205
250
|
'control.runStatus': '{{runId}} durumu: {{status}}',
|
|
206
251
|
'control.providerAuthFallback': 'Pixcode Ayarlar → Ajanlar içinden bu sağlayıcıyı bağla.',
|
|
252
|
+
'control.activity.agentTitle': 'Ajan aktivitesi',
|
|
253
|
+
'control.activity.workflowTitle': 'Workflow aktivitesi',
|
|
254
|
+
'control.activity.routerTitle': 'Telegram AI router',
|
|
255
|
+
'control.activity.provider': 'Sağlayıcı',
|
|
256
|
+
'control.activity.project': 'Proje',
|
|
257
|
+
'control.activity.session': 'Oturum',
|
|
258
|
+
'control.activity.run': 'Çalışma',
|
|
259
|
+
'control.activity.workflow': 'İş akışı',
|
|
260
|
+
'control.activity.elapsed': 'Geçen süre',
|
|
261
|
+
'control.activity.status': 'Durum',
|
|
262
|
+
'control.activity.work': 'Yapılan işler',
|
|
263
|
+
'control.activity.output': 'Çıktı',
|
|
264
|
+
'control.activity.starting': 'Başlatılıyor',
|
|
265
|
+
'control.activity.interpreting': 'İstek seçili provider ile anlamlandırılıyor',
|
|
266
|
+
'control.activity.routerFallback': 'Router fallback: istek ajan promptu olarak gönderiliyor',
|
|
267
|
+
'control.activity.startingProvider': '{{provider}} başlatılıyor',
|
|
268
|
+
'control.activity.startingWorkflow': 'Workflow başlatılıyor',
|
|
269
|
+
'control.activity.workflowRunning': 'Workflow çalışıyor',
|
|
270
|
+
'control.activity.thinking': 'Düşünüyor',
|
|
271
|
+
'control.activity.responding': 'Yanıt yazılıyor',
|
|
272
|
+
'control.activity.working': 'Tool çalıştırılıyor',
|
|
273
|
+
'control.activity.done': 'Tamamlandı',
|
|
274
|
+
'control.activity.failed': 'Başarısız',
|
|
275
|
+
'control.activity.sessionStarted': 'Oturum başladı',
|
|
276
|
+
'control.activity.toolDone': 'Tool tamamlandı',
|
|
277
|
+
'control.activity.toolFailed': 'Tool başarısız',
|
|
278
|
+
'control.activity.tokens': 'Token',
|
|
207
279
|
'notification.taskDone': '✅ {{title}} — görev tamamlandı.',
|
|
208
280
|
'notification.taskFailed': '⚠️ {{title}} — görev başarısız: {{error}}',
|
|
209
281
|
'notification.actionRequired': '❗ {{title}} — işlem gerekli.',
|