@xopcai/xopc 0.0.356 → 0.0.358
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/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-Bj0GuUUk.js → activity-store-CnmHVy1D.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-i0dJX4Ag.js → agent-avatar-dicebear-DEs_xwQi.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-C-gsYOIi.js → agent-defaults-settings-panel-B23VK3UU.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-D00xRE50.js → agent-plugin-dialog-BuKJ-Ybo.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-Bg90PJpR.js → agents-DxH-UFs7.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-CYqmO7gb.js → agents-admin-api-BtnYiq7O.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-LGezxe7p.js → app-management-settings-panel-BqyvMQXO.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-By7sj-tH.js → appearance-settings-Cn9qgXLw.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DRX7wRpG.js → apps-page-ChPOmrPa.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-BZHSbFiu.js → archive-plugin-DZCN9m71.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-B5ZRVvra.js → automations-page-OUapkL2D.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-CQmwjCm5.js → automations-workspace-DMqpfefB.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-x2-RmzUs.js → binary-plugins-U63xxRgh.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-C8eM0IQi.js → block-editor-_-QK0EnY.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automation-inputs-uQ2AGFFU.js → browser-automation-inputs-CnLQ649y.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-DonJaYJ7.js → browser-automations-page-DZlWdikj.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-Cku_iTDi.js → browser-settings-page-CEF_LSjz.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-Btku0cS3.js → capabilities-BXG_5wIg.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-Cl1RErL_.js → capabilities-Bigu28Z6.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-gUGN48Ob.js → capabilities-page-KUggKcIq.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-C3pM7xZ1.js → capabilities-settings-panel-CD5K7e1B.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-header-actions-aXDBY-4S.js → capability-header-actions-CA_XNTSW.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-BSbO91V4.js → channels-CG_xCUnf.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Bn_O5W2o.js → chat-terminal-dock-DRV-4qeP.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-CqzDwqcT.js → computer-settings-page-CqY40STw.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-BYq8YaSp.js → connector-service-page-BKAt0jvO.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-CXVlZmoT.js → connectors-page-Cn14oruE.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-dIJ4tP-C.js → date-picker-B4jSGi8k.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-ktHB4hRk.js → dependency-picker-D0RWVtBt.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-BqXL3Ivw.js → desktop-pet-9B1PIjsV.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BspF0vWW.js → desktop-pet-settings-cq5n59Pr.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CnADxQU1.js → device-pairing-wizard-DKO8iqDJ.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-CyR-4zZC.js → directory-picker-path-field-C40-GlX1.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DPc3vTw0.js → extension-debug-page-BodxNAys.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CWqtFuVa.js → extension-page-BshgQ_pO.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-D-0AeFhE.js → extension-provider-aigS3RJu.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-92wO2TEf.js → extension-settings-page-DAJZVzIQ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-Da3Oob_s.js → gateway-config-swr-EZxaKXdC.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BDh3i8n7.js → gateway-realtime-DBRa17u3.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-7glMlD2l.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-settings-CO_50TOx.js → gateway-settings-DAQu7q_Q.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-BEj_bcbm.js → gateway-startup-retry-Wtxq_y2f.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-Ba20kfpf.js → home-page-BHS2713D.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-8jfU8AlD.js → image-generation-api-Bnl0CH4n.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-ciLLYJao.js → imports-page-Bsn8Qted.js} +1 -1
- package/dist/gateway/static/root/assets/{index-XgbDpmNc.js → index-BcTY7RBG.js} +6 -6
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-7429mJN3.js → keyboard-shortcuts-settings-DjuXyBbC.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-CQyP9KBM.js → local-app-workbench-page-D77r2CKa.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-Cht3NkYu.js → local-apps-page-GsohMT3J.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-jOqfUlwj.js → local-session-drafts-CeHhcudO.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DodizOrj.js → locale-store-ChN_vjs2.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-Bye3bESN.js → logs-page-DeBeNPb4.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-BG2yeKtz.js → management-settings-Di9r7yBX.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-Bb6ohqHz.js → markdown-view-DKlJx4eo.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DIhqKSK5.js → media-plugins-JWzrPQwt.js} +1 -1
- package/dist/gateway/static/root/assets/messages-CnM6Qfr7.js +3 -0
- package/dist/gateway/static/root/assets/models-hub-cache-DnIOzcvn.js +1 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-DA_6YKSN.js → note-detail-panel-CLq8afeQ.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-api-DYfvIxWh.js → notes-api-D8nvWMMC.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-kc3CMA5c.js → notes-page-FORwlFnt.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-gSu-iTk5.js → oauth-api-BXn1a9qx.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-r0vf-oBH.js → page-context-capture-button-C9H1dHg2.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-BpTFGG44.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-BdedC52J.js → product-open-page-pW662VEC.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-3_Bqq0OV.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-DCA7oEdB.js → projects-page-D85PDbCM.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-D0eYNizR.js → registry-api-BM_81rLe.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DeK3ATTQ.js → remote-access-hub-CzzTxbhr.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BqD6oWU5.js → runtime-tools-settings-panel-BUgsyhm_.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-Ds6trhfL.js → scenes-page-Bds4V34P.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-D-cjcRAn.js → schema-form-BQz6ezGe.js} +1 -1
- package/dist/gateway/static/root/assets/{send-session-input-DstpmO44.js → send-session-input-OaBPDJ9E.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-qy4gMa5t.js → session-api-UkGomZfv.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-CFqOuGy-.js → session-manager-BK5IvdGz.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-DltxWUQd.js → sessions-page-DkXKhSWK.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-C7ww6VRj.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-BVfsQrWS.js → settings-page-CKmMkdPu.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-DqkS3DKy.js → setup-status-panel-Cjv6CDgq.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-B3Io5mOY.js → share-link-dialog-QAjExHAL.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-BpZqXsgR.js → share-preview-page-M_rAQR60.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-BNNaREyB.js → shares-api-DwqLga5H.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-CEaRXDeL.js → shares-settings-DXpj-oOC.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-1Hp370EM.js → skill-api-BO1b2oYj.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-Dm6GgUYK.js → skill-reload-api-C1hzIawD.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-Cgze-HZy.js → skills-page-cwXzLyU0.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CFSQ3Qjr.js → system-settings-panel-CIDRPUj4.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-ZmkA0E9f.js +1 -0
- package/dist/gateway/static/root/assets/tasks-CH6KoBeY.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-AXut7b8R.js → theme-store-DTYk7Gll.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-WcqOMVcQ.js → tunnel-api-BkgD61qc.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-C6cnfavb.js → usage-page-BjgYDab4.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-BT3l-ETP.js → use-autosave-R3hEHQQq.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-zfL8zvRu.js → use-composer-attachments-qK3z-EGz.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-C4bBXf4j.js → use-file-preview-expanded-D809I8ur.js} +2 -2
- package/dist/gateway/static/root/assets/{user-model-page-C6_GMD0W.js → user-model-page-DpPGpkkg.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-BF9hOZ_1.js → voice-api-key-field-C-AF-IcO.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-D8G4fALX.js → voice-config-api-CxGsCDoW.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DVvqH1d-.js → work-discovery-overlay-Ce3PKQvh.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-MDkhjfGm.js → workflow-run-setup-panel-Dv6xUycS.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-Bhu13vVb.js → workflows-page-CgJlVdec.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-C4q2GwGV.js → workspace-api-BtXzxf_w.js} +2 -2
- package/dist/gateway/static/root/index.html +28 -28
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/task-lifecycle.js +3 -1
- package/dist/src/personal-agent/onboarding.d.ts +1 -1
- package/dist/src/personal-agent/service.d.ts +10 -4
- package/dist/src/projects/project-loop.d.ts +2 -1
- package/dist/src/projects/project-loop.js +1 -1
- package/dist/src/session/client-history.js +2 -0
- package/dist/src/tasks/capabilities/relations.d.ts +4 -0
- package/dist/src/tasks/capabilities/write.d.ts +4 -0
- package/dist/src/tasks/task-origin-repository.d.ts +2 -0
- package/dist/src/tasks/task-origin-repository.js +13 -6
- package/dist/src/tasks/task-read-model-projector.js +3 -1
- package/dist/src/tui/tui-commands.js +2 -2
- package/dist/src/tui/tui-oauth-login.js +1 -1
- package/dist/src/voice/realtime/agentEngine.js +30 -11
- package/package.json +5 -5
- package/dist/gateway/static/root/assets/gateway-realtime-store-B5Oq6VCQ.js +0 -1
- package/dist/gateway/static/root/assets/messages-D8PmAUB-.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-CaYi043g.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-CmZzN99O.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-b23nMTcO.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Bqg7glTa.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-DEDh0FPJ.js +0 -1
- package/dist/gateway/static/root/assets/tasks-Buv1mgPF.js +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TaskOperationalState } from '@xopcai/gateway-contract';
|
|
1
2
|
import type { KnowledgeItem } from '../knowledge-memory/index.js';
|
|
2
3
|
import type { ProjectWithDetails } from './types.js';
|
|
3
4
|
export type ProjectWorkflowRunBrief = {
|
|
@@ -29,7 +30,7 @@ export type ProjectTask = {
|
|
|
29
30
|
id: string;
|
|
30
31
|
title: string;
|
|
31
32
|
phase: 'backlog' | 'ready' | 'active' | 'review' | 'closed';
|
|
32
|
-
operationalState:
|
|
33
|
+
operationalState: TaskOperationalState;
|
|
33
34
|
priority: 'low' | 'normal' | 'high' | 'critical';
|
|
34
35
|
attention?: string[];
|
|
35
36
|
updatedAt: number;
|
|
@@ -12,7 +12,7 @@ function buildProjectLoopOverview(input) {
|
|
|
12
12
|
const staleCutoff = (input.nowMs ?? Date.now()) - (input.staleAfterMs ?? DEFAULT_STALE_AFTER_MS);
|
|
13
13
|
const projectTasks = [...input.tasks].sort(taskUpdatedAtDesc);
|
|
14
14
|
const activeTasks = projectTasks.filter((task) => task.phase !== "closed").slice(0, 6);
|
|
15
|
-
const blockedTasks = projectTasks.filter((task) => task.operationalState === "blocked" || task.operationalState === "waiting").slice(0, 4);
|
|
15
|
+
const blockedTasks = projectTasks.filter((task) => task.operationalState === "blocked" || task.operationalState === "failed" || task.operationalState === "waiting").slice(0, 4);
|
|
16
16
|
const staleTasks = projectTasks.filter((task) => task.phase !== "closed" && task.updatedAt < staleCutoff).slice(0, 5);
|
|
17
17
|
const nextActions = activeTasks.filter((task) => task.attention?.[0]?.trim()).slice(0, 5).map((task) => ({
|
|
18
18
|
taskId: task.id,
|
|
@@ -197,6 +197,7 @@ function messagesToClientHistory(messages, opts) {
|
|
|
197
197
|
...typeof m.turnId === "string" ? { turnId: m.turnId } : {},
|
|
198
198
|
...typeof m.turnId === "string" && hiddenTurnIds.has(m.turnId) ? { startsNewBubble: true } : {},
|
|
199
199
|
content: text,
|
|
200
|
+
...m.media?.length ? { media: m.media } : {},
|
|
200
201
|
timestamp: parseTimestamp(m.timestamp),
|
|
201
202
|
toolCalls
|
|
202
203
|
});
|
|
@@ -542,6 +543,7 @@ function transcriptRowsToClientHistory(rows, opts) {
|
|
|
542
543
|
role: "assistant",
|
|
543
544
|
kind: "message",
|
|
544
545
|
content: flattenMessageContent(messageRow.content ?? ""),
|
|
546
|
+
...messageRow.media?.length ? { media: messageRow.media } : {},
|
|
545
547
|
...rawContent ? { rawContent } : {},
|
|
546
548
|
...displayIndex !== void 0 ? { displayIndex } : {},
|
|
547
549
|
timestamp: parseTimestampValue(messageRow.timestamp),
|
|
@@ -87,7 +87,9 @@ export declare const TaskDependenciesOutputSchema: z.ZodObject<{
|
|
|
87
87
|
wont_do: "wont_do";
|
|
88
88
|
}>>;
|
|
89
89
|
operationalState: z.ZodEnum<{
|
|
90
|
+
failed: "failed";
|
|
90
91
|
waiting: "waiting";
|
|
92
|
+
cancelled: "cancelled";
|
|
91
93
|
idle: "idle";
|
|
92
94
|
queued: "queued";
|
|
93
95
|
running: "running";
|
|
@@ -112,7 +114,9 @@ export declare const TaskDependenciesOutputSchema: z.ZodObject<{
|
|
|
112
114
|
wont_do: "wont_do";
|
|
113
115
|
}>>;
|
|
114
116
|
operationalState: z.ZodEnum<{
|
|
117
|
+
failed: "failed";
|
|
115
118
|
waiting: "waiting";
|
|
119
|
+
cancelled: "cancelled";
|
|
116
120
|
idle: "idle";
|
|
117
121
|
queued: "queued";
|
|
118
122
|
running: "running";
|
|
@@ -87,7 +87,9 @@ export declare const TaskMutationOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
87
87
|
sourceId: z.ZodOptional<z.ZodString>;
|
|
88
88
|
}, z.core.$strip>>;
|
|
89
89
|
operationalState: z.ZodEnum<{
|
|
90
|
+
failed: "failed";
|
|
90
91
|
waiting: "waiting";
|
|
92
|
+
cancelled: "cancelled";
|
|
91
93
|
idle: "idle";
|
|
92
94
|
queued: "queued";
|
|
93
95
|
running: "running";
|
|
@@ -188,7 +190,9 @@ export declare const TaskMutationOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
188
190
|
sourceId: z.ZodOptional<z.ZodString>;
|
|
189
191
|
}, z.core.$strip>>;
|
|
190
192
|
operationalState: z.ZodEnum<{
|
|
193
|
+
failed: "failed";
|
|
191
194
|
waiting: "waiting";
|
|
195
|
+
cancelled: "cancelled";
|
|
192
196
|
idle: "idle";
|
|
193
197
|
queued: "queued";
|
|
194
198
|
running: "running";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
|
+
import { TaskReadModelProjector } from "./task-read-model-projector.js";
|
|
2
3
|
//#region src/tasks/task-origin-repository.ts
|
|
3
4
|
init_transaction();
|
|
4
5
|
var TaskOriginRepository = class {
|
|
@@ -8,18 +9,24 @@ var TaskOriginRepository = class {
|
|
|
8
9
|
}
|
|
9
10
|
list(conversationId, limit = 20, options = {}) {
|
|
10
11
|
const db = getSqliteDatabase();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const total = db.prepare(`SELECT count(*) AS count FROM task_origin_links
|
|
13
|
+
WHERE conversation_id = ?`).get(conversationId).count;
|
|
14
|
+
const rows = db.prepare(`SELECT task.task_id AS id, task.title, task.phase,
|
|
15
|
+
MAX(task.updated_at, COALESCE((SELECT COALESCE(run.completed_at, run.started_at, run.queued_at)
|
|
16
|
+
FROM task_runs run WHERE run.task_id = task.task_id AND run.parent_run_id IS NULL
|
|
17
|
+
ORDER BY run.queued_at DESC LIMIT 1), task.updated_at)) AS updatedAt,
|
|
16
18
|
(SELECT run.status FROM task_runs run WHERE run.task_id = task.task_id
|
|
17
19
|
AND run.parent_run_id IS NULL ORDER BY run.queued_at DESC LIMIT 1) AS runStatus
|
|
18
20
|
FROM task_origin_links origin JOIN tasks task ON task.task_id = origin.task_id
|
|
19
21
|
WHERE origin.conversation_id = ?
|
|
20
22
|
ORDER BY ${options.order === "recent" ? "" : "CASE WHEN task.phase = 'closed' THEN 1 ELSE 0 END,"}
|
|
21
|
-
|
|
23
|
+
updatedAt DESC, task.task_id DESC LIMIT ? OFFSET ?`).all(conversationId, Math.max(1, Math.min(100, Math.floor(limit))), Math.max(0, Math.floor(options.offset ?? 0)));
|
|
24
|
+
const projector = new TaskReadModelProjector();
|
|
25
|
+
return {
|
|
26
|
+
total,
|
|
27
|
+
items: rows.map(({ runStatus, ...row }) => ({
|
|
22
28
|
...row,
|
|
29
|
+
operationalState: projector.get(row.id)?.operationalState ?? "idle",
|
|
23
30
|
...runStatus ? { runStatus } : {}
|
|
24
31
|
}))
|
|
25
32
|
};
|
|
@@ -73,9 +73,11 @@ var TaskReadModelProjector = class {
|
|
|
73
73
|
if (input.activeRun?.status === "running") return "running";
|
|
74
74
|
if (input.activeRun?.status === "verifying") return "verifying";
|
|
75
75
|
if (input.activeRun?.status === "queued") return "queued";
|
|
76
|
+
if (input.activeRun?.status === "waiting") return "waiting";
|
|
76
77
|
if (input.waits.some((wait) => wait.kind !== "dependency")) return "waiting";
|
|
77
78
|
if (input.waits.some((wait) => wait.kind === "dependency")) return "blocked";
|
|
78
|
-
if (input.latestRun?.status === "failed") return "
|
|
79
|
+
if (input.latestRun?.status === "failed") return "failed";
|
|
80
|
+
if (input.latestRun?.status === "cancelled") return "cancelled";
|
|
79
81
|
if (input.hasIncompleteDependency) return "blocked";
|
|
80
82
|
return "idle";
|
|
81
83
|
}
|
|
@@ -15,13 +15,13 @@ import { isValidProjectAgentId, normalizeProjectAgentId } from "../projects/proj
|
|
|
15
15
|
import { inferSuggestedProjectDefaultAgentId } from "../projects/project-agent-suggestion.js";
|
|
16
16
|
import "../projects/index.js";
|
|
17
17
|
import "../tasks/index.js";
|
|
18
|
-
import { getAuthStorePath, listAllProfiles, listProfilesForProvider, removeAuthProfile } from "../auth/profiles/profiles.js";
|
|
19
|
-
import "../auth/profiles/index.js";
|
|
20
18
|
import { theme } from "./theme.js";
|
|
21
19
|
import { getTuiKeybindingsPath } from "./tui-keybindings-file.js";
|
|
22
20
|
import { formatKeyIds, formatXopcTuiHotkeys } from "./format-tui-hotkeys.js";
|
|
23
21
|
import { formatTuiConfigInfo, formatTuiContextInfo, formatTuiLoginInfo, formatTuiModelsInfo, formatTuiSessionInfo, formatTuiSessionListInfo, formatTuiSessionTreeInfo, formatTuiStoredAuthProfilesInfo, formatTuiTranscriptTreeInfo, formatTuiTrustInfo, formatTuiUsageInfo, formatTuiWorkflowDetail, formatTuiWorkflowsInfo, loadTuiChangelogInfo, nextVerboseLevel, parseTuiExportRequest, parseTuiImportRequest, parseTuiShareRequest, writeTuiDebugInfo } from "./tui-command-formatters.js";
|
|
24
22
|
import { buildTuiTimelineTurns, findNearestTimelineTurnByDisplayIndex, findTimelineTurnByNumber } from "./tui-timeline.js";
|
|
23
|
+
import { getAuthStorePath, listAllProfiles, listProfilesForProvider, removeAuthProfile } from "../auth/profiles/profiles.js";
|
|
24
|
+
import "../auth/profiles/index.js";
|
|
25
25
|
import { rewriteUnknownSlashAsWorkflow } from "./tui-workflow-slash.js";
|
|
26
26
|
import { formatTuiStartupText } from "./tui-startup-text.js";
|
|
27
27
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,9 +3,9 @@ import { init_logger } from "../utils/logger.js";
|
|
|
3
3
|
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
4
4
|
import { getProviderDisplayName, init_providers } from "../providers/index.js";
|
|
5
5
|
import { getXopcCloudCatalogCoordinator } from "../providers/xopc-cloud-catalog-coordinator.js";
|
|
6
|
-
import { getOAuthProvider, getSupportedOAuthProviders } from "../cli/utils/oauth-providers.js";
|
|
7
6
|
import { selectListTheme, theme } from "./theme.js";
|
|
8
7
|
import { formatKeyIds } from "./format-tui-hotkeys.js";
|
|
8
|
+
import { getOAuthProvider, getSupportedOAuthProviders } from "../cli/utils/oauth-providers.js";
|
|
9
9
|
import { ExtensionInputDialog } from "./components/extension-dialog.js";
|
|
10
10
|
import { spawn } from "node:child_process";
|
|
11
11
|
import { Container, SelectList, Spacer, Text } from "@earendil-works/pi-tui";
|
|
@@ -59,12 +59,16 @@ function createAgentVoiceEngine(options) {
|
|
|
59
59
|
});
|
|
60
60
|
send("turn.committed", { turnId });
|
|
61
61
|
if (queuedTurns >= 8) {
|
|
62
|
+
log.warn({
|
|
63
|
+
sessionId: claim.sessionId,
|
|
64
|
+
queuedTurns,
|
|
65
|
+
turnId
|
|
66
|
+
}, "Realtime voice turn dropped because the input queue is full");
|
|
62
67
|
send("session.error", {
|
|
63
68
|
code: "INPUT_BACKPRESSURE",
|
|
64
|
-
message: "Too many queued voice turns",
|
|
65
|
-
recoverable:
|
|
69
|
+
message: "Too many queued voice turns; please repeat the last request",
|
|
70
|
+
recoverable: true
|
|
66
71
|
});
|
|
67
|
-
options.onClose("input_backpressure", true);
|
|
68
72
|
return;
|
|
69
73
|
}
|
|
70
74
|
queuedTurns += 1;
|
|
@@ -247,6 +251,7 @@ function createAgentVoiceEngine(options) {
|
|
|
247
251
|
startedAt: Date.now(),
|
|
248
252
|
firstTextSeen: false,
|
|
249
253
|
awaitingClarification: false,
|
|
254
|
+
taskDone: false,
|
|
250
255
|
pcm: new PcmFrameBuffer()
|
|
251
256
|
};
|
|
252
257
|
const taskUpdateExposed = () => Boolean(updateClientMessageId && response.text.trim());
|
|
@@ -304,10 +309,13 @@ function createAgentVoiceEngine(options) {
|
|
|
304
309
|
});
|
|
305
310
|
if (event.type === "run_end" || event.type === "stream_end") {
|
|
306
311
|
const status = event.payload?.status;
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
312
|
+
if (!response.taskDone) {
|
|
313
|
+
response.taskDone = true;
|
|
314
|
+
send("task.done", {
|
|
315
|
+
taskId: task.taskId,
|
|
316
|
+
status: status === "cancelled" ? "cancelled" : status === "suspended" ? "suspended" : status === "error" ? "failed" : "completed"
|
|
317
|
+
});
|
|
318
|
+
}
|
|
311
319
|
}
|
|
312
320
|
if (event.type === "clarify_request" && typeof event.payload?.requestId === "string" && typeof event.payload?.question === "string") {
|
|
313
321
|
response.awaitingClarification = true;
|
|
@@ -364,6 +372,13 @@ function createAgentVoiceEngine(options) {
|
|
|
364
372
|
message: "Voice response failed",
|
|
365
373
|
recoverable: true
|
|
366
374
|
});
|
|
375
|
+
if (response.taskId && !response.taskDone) {
|
|
376
|
+
response.taskDone = true;
|
|
377
|
+
send("task.done", {
|
|
378
|
+
taskId: response.taskId,
|
|
379
|
+
status: "failed"
|
|
380
|
+
});
|
|
381
|
+
}
|
|
367
382
|
if (response.audioStarted) send("response.audio.done", { responseId: response.id });
|
|
368
383
|
send("response.done", {
|
|
369
384
|
responseId: response.id,
|
|
@@ -405,13 +420,17 @@ function createAgentVoiceEngine(options) {
|
|
|
405
420
|
function bufferFinal(utteranceId, text) {
|
|
406
421
|
try {
|
|
407
422
|
turn.final(utteranceId, text);
|
|
408
|
-
} catch {
|
|
423
|
+
} catch (error) {
|
|
424
|
+
log.warn({
|
|
425
|
+
err: error,
|
|
426
|
+
sessionId: claim.sessionId,
|
|
427
|
+
utteranceId
|
|
428
|
+
}, "Realtime voice turn exceeded the input limit");
|
|
409
429
|
send("session.error", {
|
|
410
430
|
code: "INPUT_BACKPRESSURE",
|
|
411
|
-
message: "Voice turn input limit reached",
|
|
412
|
-
recoverable:
|
|
431
|
+
message: "Voice turn input limit reached; please repeat the request",
|
|
432
|
+
recoverable: true
|
|
413
433
|
});
|
|
414
|
-
options.onClose("input_backpressure", true);
|
|
415
434
|
}
|
|
416
435
|
}
|
|
417
436
|
function onSttEvent(event) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.358",
|
|
4
4
|
"description": "Local-first personal AI for the one-person company, with durable context, tasks, workflows, automations, and local or cloud models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@grammyjs/runner": "^2.0.3",
|
|
74
74
|
"@hono/node-server": "^2.0.4",
|
|
75
75
|
"@inquirer/prompts": "^8.5.0",
|
|
76
|
-
"@modelcontextprotocol/sdk": "1.
|
|
76
|
+
"@modelcontextprotocol/sdk": "1.32.1",
|
|
77
77
|
"@mozilla/readability": "^0.6.0",
|
|
78
78
|
"@sinclair/typebox": "^0.34.49",
|
|
79
79
|
"@trycua/cua-driver": "0.28.2",
|
|
@@ -101,11 +101,11 @@
|
|
|
101
101
|
"pino-pretty": "^13.1.3",
|
|
102
102
|
"proper-lockfile": "^4.1.2",
|
|
103
103
|
"semver": "^7.8.1",
|
|
104
|
-
"sharp": "0.35.
|
|
104
|
+
"sharp": "0.35.5",
|
|
105
105
|
"silk-wasm": "^3.7.1",
|
|
106
106
|
"smol-toml": "^1.8.0",
|
|
107
107
|
"thread-stream": "^4.2.0",
|
|
108
|
-
"undici": "^8.
|
|
108
|
+
"undici": "^8.10.2",
|
|
109
109
|
"uuid": "^14.0.0",
|
|
110
110
|
"web-push": "^3.6.7",
|
|
111
111
|
"ws": "^8.21.0",
|
|
@@ -160,10 +160,10 @@
|
|
|
160
160
|
"vue": "^3.5.35",
|
|
161
161
|
"@xopcai/browser-control-contract": "0.1.0",
|
|
162
162
|
"@xopcai/computer-control-contract": "0.1.0",
|
|
163
|
+
"@xopcai/endpoint-tools-client": "0.0.0",
|
|
163
164
|
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
164
165
|
"@xopcai/gateway-contract": "0.0.0",
|
|
165
166
|
"@xopcai/realtime-client": "0.0.0",
|
|
166
|
-
"@xopcai/endpoint-tools-client": "0.0.0",
|
|
167
167
|
"@xopcai/realtime-protocol": "0.0.0"
|
|
168
168
|
},
|
|
169
169
|
"scripts": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e}from"./locale-store-DodizOrj.js";var t=e(()=>({connectionState:`idle`,error:null}));function n(e){t.setState(e)}export{t as n,n as t};
|