@xopcai/xopc 0.0.157 → 0.0.159
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/dashscope/src/image-generation-provider.js +1 -1
- package/dist/extensions/fal/src/image-generation-provider.js +1 -1
- package/dist/extensions/google/src/image-generation-provider.js +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{action-boundary-settings-panel-zQ_w0sPl.js → action-boundary-settings-panel-CaRK2vIy.js} +1 -1
- package/dist/gateway/static/root/assets/{activity-store-CddlQHam.js → activity-store-C-57rvkX.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DOfTopIk.js → agent-avatar-dicebear-BeVf03hx.js} +1 -1
- package/dist/gateway/static/root/assets/agents-P05C4A-3.js +2 -0
- package/dist/gateway/static/root/assets/{api-NUlcaaV9.js → api-BjcBIV2O.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-J0-z_uc1.js → app-management-settings-panel-BG2ulMYw.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CMaQOx2C.js → appearance-settings-0Kjenr2T.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-DANGrBpN.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BVwE70GV.js → archive-plugin-ChiNnH1e.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-aj5U56K9.js → attachment-load-pbBlQR-g.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-suggestion-card-CKz8rxAb.js → automation-suggestion-card-CTZDOyDy.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-BXfGL_cm.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-Ie6owbEw.js → binary-plugins-BeZGzpGF.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BaDrd5GJ.js → block-editor-BnDmhN5Z.js} +3 -3
- package/dist/gateway/static/root/assets/browser-settings-page-534luV0B.js +8 -0
- package/dist/gateway/static/root/assets/{capability-presets-api-BjO4YD-O.js → capability-presets-api-Ii36j_7v.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-presets-settings-panel-bwezWQpF.js → capability-presets-settings-panel-Cl3dw4yh.js} +2 -2
- package/dist/gateway/static/root/assets/{channel-recipient-api-BisDU_DH.js → channel-recipient-api-CFqrSi5K.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-M91zFJVi.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-vooEF4lG.js +1 -0
- package/dist/gateway/static/root/assets/{connector-logo-DGjjzBIH.js → connector-logo-CiLxuZ8S.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-CV5UulW6.js +2 -0
- package/dist/gateway/static/root/assets/{desktop-pet-CoQ4Edck.js → desktop-pet-Cil2eSpW.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings--sjUYeNX.js → desktop-pet-settings-DwsC6l5F.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-CpmfFDx3.js → directory-picker-path-field-CC2VL5Mc.js} +1 -1
- package/dist/gateway/static/root/assets/{dreaming-settings-D7rRROE7.js → dreaming-settings-KY7ZfVsy.js} +3 -3
- package/dist/gateway/static/root/assets/{extension-debug-page-BzqW3ssG.js → extension-debug-page-C8KBeucs.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CKDbBzVR.js → extension-page-CV-5Kcyk.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-DjNMSdRz.js → extension-settings-page-DvUtDrAu.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-CUEAZEld.js → gateway-config-api-DXfVeJLc.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-BpJ0v56l.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CbMPgpHX.js → gateway-startup-retry-cxQ94qMm.js} +1 -1
- package/dist/gateway/static/root/assets/goal-create-dialog-lMHD-2CX.js +1 -0
- package/dist/gateway/static/root/assets/goal-detail-page-yPmF-G7b.js +4 -0
- package/dist/gateway/static/root/assets/{goals-config-api-C-Vq8VR9.js → goals-config-api-P8VhLqYF.js} +1 -1
- package/dist/gateway/static/root/assets/goals-page-BHTCKobG.js +2 -0
- package/dist/gateway/static/root/assets/{goals-settings-DVrTDWYS.js → goals-settings-DHXyaH_O.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-Dv8qA4E7.js → heartbeat-settings-CNckP_Dv.js} +1 -1
- package/dist/gateway/static/root/assets/index-BgZhEOkN.css +1 -0
- package/dist/gateway/static/root/assets/{index-DHRxn7Sy.js → index-BuqGh2SW.js} +65 -65
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DEKtMZbg.js → keyboard-shortcuts-settings-jXmv1RVX.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-zpp_wciE.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-DQT2lZk7.js → local-apps-page-Cs5LKjtc.js} +1 -1
- package/dist/gateway/static/root/assets/locale-store-C_M71MK9.js +1 -0
- package/dist/gateway/static/root/assets/logs-page-B4CRYqYR.js +7 -0
- package/dist/gateway/static/root/assets/{markdown-split-Cp6NxQJr.js → markdown-split-BFqeSNte.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Dv1cQK2J.js → media-plugins-Cc8379gq.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-Bwu1tG3T.js → messages-BuT0SR1R.js} +4 -4
- package/dist/gateway/static/root/assets/models-hub-panel-1hdoAoB_.js +2 -0
- package/dist/gateway/static/root/assets/{notes-page-CePZ2we1.js → notes-page-DlGU4ipo.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-DQEAZTA5.js +4 -0
- package/dist/gateway/static/root/assets/{page-tabs-C1jBfKTZ.js → page-tabs-kFOswGlG.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Cl9anbg0.js → preview-open-alternatives-CvjuvABg.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-Bp9bC7A6.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-RNorFXTw.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-BqRTcM_6.js +1 -0
- package/dist/gateway/static/root/assets/{save-bar-controls-CWu_o1ta.js → save-bar-controls-DwrD7ODx.js} +1 -1
- package/dist/gateway/static/root/assets/{schedule-field-DuZbqL7X.js → schedule-field-Ba4WzTmE.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-Bixut-2d.js → schema-form-DvydL8eF.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-B2EfW1cm.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CklL85T4.js +1 -0
- package/dist/gateway/static/root/assets/{settings-collapsible-section-C_7lCtCp.js → settings-collapsible-section-LaQqGGej.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-form-section-D0DPTbO0.js → settings-form-section-DruI__qO.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-tN-9u8dj.js → settings-loading-skeleton-UvA-eDhF.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-C2L9g3kd.js → settings-page-5oCGSebm.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-CBUOPmx_.js → settings-page-layout-DG-XMIPu.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-D3my1HgB.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-BiSh0nLu.js → share-preview-page-FLVeTrRt.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-DVxgjrsP.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-Bcu58ZaF.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-CDd-84FE.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-h7uqbQ-n.js → system-settings-panel-CeK93xVi.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-DjYRaF0J.js → theme-store-C8ohIHhw.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-BkqBD32C.js → typed-models-lib-D1Lr2gG0.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-DiWtF12K.js → use-channel-catalog-BWzou5ar.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-1OyJnTyR.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-C4770AsA.js → voice-api-key-field-B2ncRwHS.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-page-BZlY4PZL.js +1 -0
- package/dist/gateway/static/root/assets/work-item-detail-page-DPXMrneY.js +1 -0
- package/dist/gateway/static/root/assets/work-page-CTERoqyv.js +1 -0
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-Bynqe4kV.js +3 -0
- package/dist/gateway/static/root/assets/workflows-page-CLgsnqFQ.js +11 -0
- package/dist/gateway/static/root/index.html +7 -7
- package/dist/package.js +1 -1
- package/dist/src/agent/embedded/session-tool-result-guard.js +14 -0
- package/dist/src/agent/image/generation/openai-compatible-image-provider.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +10 -3
- package/dist/src/agent/tools/send-media.js +20 -70
- package/dist/src/agent/tools/tool-media.d.ts +9 -0
- package/dist/src/agent/tools/tool-media.js +58 -0
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/connectors/catalog.js +2 -3
- package/dist/src/connectors/composio-catalog.d.ts +11 -1
- package/dist/src/connectors/composio-catalog.js +37 -7
- package/dist/src/connectors/composio.js +2 -1
- package/dist/src/gateway/agent-run-relay.d.ts +2 -0
- package/dist/src/gateway/agent-run-relay.js +114 -14
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/chat-stream/mapper.d.ts +1 -1
- package/dist/src/gateway/chat-stream/mapper.js +27 -42
- package/dist/src/gateway/chat-stream/thinking-delta-coalescer.d.ts +7 -0
- package/dist/src/gateway/chat-stream/thinking-delta-coalescer.js +103 -0
- package/dist/src/gateway/hono/routes/connectors.js +10 -22
- package/dist/src/gateway/hono/sse.d.ts +1 -1
- package/dist/src/gateway/hono/sse.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.js +5 -1
- package/dist/src/media/session-references.js +9 -6
- package/dist/src/session/client-history.d.ts +1 -0
- package/dist/src/session/client-history.js +56 -12
- package/dist/src/session/types.d.ts +1 -0
- package/dist/src/storage/sqlite/connector-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/connector-repository.js +12 -1
- package/dist/src/storage/sqlite/index.d.ts +1 -1
- package/dist/src/storage/sqlite/index.js +2 -2
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agents-RZNd9xMI.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-BOeTZgdL.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-wYN1N-Il.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-DD3djQtX.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-Bohv9YRy.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-h3VHD5Uq.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-LIAkMlN-.js +0 -2
- package/dist/gateway/static/root/assets/gateway-settings-h1wWBrxD.js +0 -1
- package/dist/gateway/static/root/assets/goal-create-dialog-xfO0R5Bx.js +0 -1
- package/dist/gateway/static/root/assets/goal-detail-page-CVVKF2hY.js +0 -4
- package/dist/gateway/static/root/assets/goals-page-W666NFIU.js +0 -2
- package/dist/gateway/static/root/assets/index-gpwk8Nro.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-y5WmNSyZ.js +0 -2
- package/dist/gateway/static/root/assets/locale-store-d9Cylz62.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-DMQaC4Jn.js +0 -7
- package/dist/gateway/static/root/assets/models-hub-panel-CoYDJvX_.js +0 -2
- package/dist/gateway/static/root/assets/notes-workbench-C9B-7EsK.js +0 -4
- package/dist/gateway/static/root/assets/project-detail-page-DG_P8S7e.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-C1pro-bG.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DDj6t0SQ.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-C1aZFTTX.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CwRP1Nsl.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DFjG5i48.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-Bh2T05Hp.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-ppRtNzpM.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-Dnw1xKKm.js +0 -2
- package/dist/gateway/static/root/assets/user-context-page-09T5O8lO.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-D__GQy1R.js +0 -1
- package/dist/gateway/static/root/assets/work-item-detail-page-CAIgG4im.js +0 -1
- package/dist/gateway/static/root/assets/work-page-CkZvIUpT.js +0 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-qqixrSRL.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-THxdPWzb.js +0 -11
- package/dist/src/connectors/registries/modelscope.d.ts +0 -2
- package/dist/src/connectors/registries/modelscope.js +0 -228
- package/dist/src/connectors/registries/official-mcp.d.ts +0 -2
- package/dist/src/connectors/registries/official-mcp.js +0 -140
- package/dist/src/connectors/registries/search.d.ts +0 -12
- package/dist/src/connectors/registries/search.js +0 -87
- package/dist/src/connectors/registries/smithery.d.ts +0 -2
- package/dist/src/connectors/registries/smithery.js +0 -97
- package/dist/src/connectors/registries/types.d.ts +0 -20
- package/dist/src/connectors/registries/types.js +0 -1
|
@@ -4,7 +4,6 @@ var ChatStreamMapper = class {
|
|
|
4
4
|
assistantIndex = 0;
|
|
5
5
|
currentAssistantMessageId;
|
|
6
6
|
lastAssistantMessageId;
|
|
7
|
-
currentAssistantText = "";
|
|
8
7
|
currentAssistantReviewEmitted = false;
|
|
9
8
|
toolCallToMessageId = /* @__PURE__ */ new Map();
|
|
10
9
|
turnDiffs = [];
|
|
@@ -23,6 +22,7 @@ var ChatStreamMapper = class {
|
|
|
23
22
|
case "agent_end": return [];
|
|
24
23
|
case "message_start": return this.mapMessageStart(event.message);
|
|
25
24
|
case "message_update": return this.mapMessageUpdate(event);
|
|
25
|
+
case "assistant_snapshot": return this.mapAssistantSnapshot(event.message);
|
|
26
26
|
case "message_end": return this.mapMessageEnd(event.message);
|
|
27
27
|
case "tool_execution_start": return this.mapToolStart(event);
|
|
28
28
|
case "tool_execution_update": return this.mapToolUpdate(event);
|
|
@@ -44,7 +44,7 @@ var ChatStreamMapper = class {
|
|
|
44
44
|
status: event.status === "error" ? "error" : "complete",
|
|
45
45
|
...typeof event.message === "string" && event.message ? { message: event.message } : {}
|
|
46
46
|
})];
|
|
47
|
-
case "user_message": return [this.make("user_message", { message:
|
|
47
|
+
case "user_message": return [this.make("user_message", { message: userMessageFromEvent(event) })];
|
|
48
48
|
case "user_transcript": return [this.make("user_transcript", {
|
|
49
49
|
text: String(event.text ?? ""),
|
|
50
50
|
media: event.media
|
|
@@ -147,7 +147,6 @@ var ChatStreamMapper = class {
|
|
|
147
147
|
if (raw?.role !== "assistant") return [];
|
|
148
148
|
const messageId = this.nextAssistantMessageId();
|
|
149
149
|
this.currentAssistantMessageId = messageId;
|
|
150
|
-
this.currentAssistantText = "";
|
|
151
150
|
this.currentAssistantReviewEmitted = false;
|
|
152
151
|
return [this.make("assistant_message_start", { messageId })];
|
|
153
152
|
}
|
|
@@ -155,39 +154,42 @@ var ChatStreamMapper = class {
|
|
|
155
154
|
const message = event.message;
|
|
156
155
|
if (message?.role !== "assistant") return [];
|
|
157
156
|
const messageId = this.ensureAssistantMessageId();
|
|
157
|
+
const events = [];
|
|
158
158
|
const review = extractReview(message);
|
|
159
159
|
if (review && !this.currentAssistantReviewEmitted) {
|
|
160
160
|
this.currentAssistantReviewEmitted = true;
|
|
161
|
-
|
|
161
|
+
events.push(this.make("review", {
|
|
162
162
|
messageId,
|
|
163
163
|
review
|
|
164
|
-
})
|
|
164
|
+
}));
|
|
165
165
|
}
|
|
166
166
|
const delta = event.assistantMessageEvent;
|
|
167
|
-
if (delta?.type === "text_delta" && typeof delta.delta === "string" && delta.delta) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
167
|
+
if (delta?.type === "text_delta" && typeof delta.delta === "string" && delta.delta) events.push(this.make("assistant_delta", {
|
|
168
|
+
messageId,
|
|
169
|
+
delta: delta.delta
|
|
170
|
+
}));
|
|
171
|
+
if (delta?.type === "thinking_delta" && typeof delta.delta === "string" && delta.delta) events.push(this.make("thinking_delta", {
|
|
172
|
+
messageId,
|
|
173
|
+
delta: delta.delta
|
|
174
|
+
}));
|
|
175
|
+
return events;
|
|
176
|
+
}
|
|
177
|
+
mapAssistantSnapshot(raw) {
|
|
178
|
+
const message = raw;
|
|
179
|
+
if (message?.role !== "assistant") return [];
|
|
180
|
+
const messageId = this.ensureAssistantMessageId();
|
|
181
|
+
const review = extractReview(message);
|
|
182
|
+
if (review && !this.currentAssistantReviewEmitted) {
|
|
183
|
+
this.currentAssistantReviewEmitted = true;
|
|
184
|
+
return [this.make("review", {
|
|
177
185
|
messageId,
|
|
178
|
-
|
|
186
|
+
review
|
|
179
187
|
})];
|
|
180
188
|
}
|
|
181
|
-
if (delta?.type === "thinking_delta" && typeof delta.delta === "string" && delta.delta) return [this.make("thinking_delta", {
|
|
182
|
-
messageId,
|
|
183
|
-
delta: delta.delta
|
|
184
|
-
})];
|
|
185
189
|
const text = extractTextFromMessage(message);
|
|
186
|
-
|
|
187
|
-
this.currentAssistantText = text || this.currentAssistantText;
|
|
188
|
-
return suffix ? [this.make("assistant_delta", {
|
|
190
|
+
return text ? [this.make("assistant_delta", {
|
|
189
191
|
messageId,
|
|
190
|
-
delta:
|
|
192
|
+
delta: text
|
|
191
193
|
})] : [];
|
|
192
194
|
}
|
|
193
195
|
mapMessageEnd(raw) {
|
|
@@ -203,13 +205,6 @@ var ChatStreamMapper = class {
|
|
|
203
205
|
review
|
|
204
206
|
}));
|
|
205
207
|
}
|
|
206
|
-
const text = extractTextFromMessage(message);
|
|
207
|
-
const suffix = appendSuffix(this.currentAssistantText, text);
|
|
208
|
-
if (suffix) events.push(this.make("assistant_delta", {
|
|
209
|
-
messageId,
|
|
210
|
-
delta: suffix
|
|
211
|
-
}));
|
|
212
|
-
this.currentAssistantText = text || this.currentAssistantText;
|
|
213
208
|
events.push(this.make("thinking_end", { messageId }));
|
|
214
209
|
if (this.turnDiffs.length > 0) {
|
|
215
210
|
events.push(this.make("turn_diff", {
|
|
@@ -230,7 +225,6 @@ var ChatStreamMapper = class {
|
|
|
230
225
|
}));
|
|
231
226
|
this.lastAssistantMessageId = messageId;
|
|
232
227
|
this.currentAssistantMessageId = void 0;
|
|
233
|
-
this.currentAssistantText = "";
|
|
234
228
|
this.currentAssistantReviewEmitted = false;
|
|
235
229
|
return events;
|
|
236
230
|
}
|
|
@@ -368,7 +362,7 @@ var ChatStreamMapper = class {
|
|
|
368
362
|
}
|
|
369
363
|
}
|
|
370
364
|
};
|
|
371
|
-
function
|
|
365
|
+
function userMessageFromEvent(event) {
|
|
372
366
|
return {
|
|
373
367
|
role: "user",
|
|
374
368
|
content: event.content ?? [],
|
|
@@ -400,15 +394,6 @@ function extractText(value) {
|
|
|
400
394
|
return rec.type === "text" && typeof rec.text === "string" ? rec.text : "";
|
|
401
395
|
}).join("") || void 0;
|
|
402
396
|
}
|
|
403
|
-
function appendSuffix(base, next) {
|
|
404
|
-
if (!next) return "";
|
|
405
|
-
if (!base) return next;
|
|
406
|
-
if (next === base || base.endsWith(next)) return "";
|
|
407
|
-
if (next.startsWith(base)) return next.slice(base.length);
|
|
408
|
-
const max = Math.min(base.length, next.length, 512);
|
|
409
|
-
for (let overlap = max; overlap > 0; overlap--) if (base.slice(-overlap) === next.slice(0, overlap)) return next.slice(overlap);
|
|
410
|
-
return next;
|
|
411
|
-
}
|
|
412
397
|
function extractUsage(message) {
|
|
413
398
|
const usage = message.usage;
|
|
414
399
|
if (!usage || typeof usage !== "object") return void 0;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChatStreamEvent } from './protocol.js';
|
|
2
|
+
type CoalescerOptions = {
|
|
3
|
+
windowMs?: number;
|
|
4
|
+
maxChars?: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function coalesceThinkingDeltas(source: AsyncIterable<ChatStreamEvent>, options?: CoalescerOptions): AsyncGenerator<ChatStreamEvent>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
//#region src/gateway/chat-stream/thinking-delta-coalescer.ts
|
|
2
|
+
const DEFAULT_WINDOW_MS = 24;
|
|
3
|
+
const DEFAULT_MAX_CHARS = 256;
|
|
4
|
+
function isThinkingDelta(event) {
|
|
5
|
+
return event.type === "thinking_delta";
|
|
6
|
+
}
|
|
7
|
+
function belongsToSameThinkingStream(left, right) {
|
|
8
|
+
return left.runId === right.runId && left.sessionKey === right.sessionKey && left.payload.messageId === right.payload.messageId;
|
|
9
|
+
}
|
|
10
|
+
function mergeThinkingDelta(left, right) {
|
|
11
|
+
return {
|
|
12
|
+
...left,
|
|
13
|
+
payload: {
|
|
14
|
+
...left.payload,
|
|
15
|
+
delta: left.payload.delta + right.payload.delta
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
async function nextBeforeDeadline(next, deadlineAt) {
|
|
20
|
+
let timer;
|
|
21
|
+
try {
|
|
22
|
+
return await Promise.race([next.then((result) => ({
|
|
23
|
+
kind: "next",
|
|
24
|
+
result
|
|
25
|
+
})), new Promise((resolve) => {
|
|
26
|
+
timer = setTimeout(() => resolve({ kind: "timeout" }), Math.max(0, deadlineAt - Date.now()));
|
|
27
|
+
})]);
|
|
28
|
+
} finally {
|
|
29
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async function* coalesceThinkingDeltas(source, options = {}) {
|
|
33
|
+
const windowMs = options.windowMs ?? DEFAULT_WINDOW_MS;
|
|
34
|
+
const maxChars = options.maxChars ?? DEFAULT_MAX_CHARS;
|
|
35
|
+
if (!Number.isFinite(windowMs) || windowMs <= 0) throw new Error("thinking delta coalescer windowMs must be greater than zero");
|
|
36
|
+
if (!Number.isInteger(maxChars) || maxChars <= 0) throw new Error("thinking delta coalescer maxChars must be a positive integer");
|
|
37
|
+
const iterator = source[Symbol.asyncIterator]();
|
|
38
|
+
let next = iterator.next();
|
|
39
|
+
let pending;
|
|
40
|
+
let deadlineAt = 0;
|
|
41
|
+
try {
|
|
42
|
+
while (true) {
|
|
43
|
+
if (!pending) {
|
|
44
|
+
const result = await next;
|
|
45
|
+
if (result.done) break;
|
|
46
|
+
next = iterator.next();
|
|
47
|
+
if (!isThinkingDelta(result.value)) {
|
|
48
|
+
yield result.value;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
pending = result.value;
|
|
52
|
+
deadlineAt = Date.now() + windowMs;
|
|
53
|
+
if (pending.payload.delta.length >= maxChars) {
|
|
54
|
+
yield pending;
|
|
55
|
+
pending = void 0;
|
|
56
|
+
}
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
const outcome = await nextBeforeDeadline(next, deadlineAt);
|
|
60
|
+
if (outcome.kind === "timeout") {
|
|
61
|
+
yield pending;
|
|
62
|
+
pending = void 0;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const result = outcome.result;
|
|
66
|
+
if (result.done) {
|
|
67
|
+
yield pending;
|
|
68
|
+
pending = void 0;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
next = iterator.next();
|
|
72
|
+
const event = result.value;
|
|
73
|
+
if (!isThinkingDelta(event) || !belongsToSameThinkingStream(pending, event)) {
|
|
74
|
+
yield pending;
|
|
75
|
+
pending = void 0;
|
|
76
|
+
if (isThinkingDelta(event)) {
|
|
77
|
+
pending = event;
|
|
78
|
+
deadlineAt = Date.now() + windowMs;
|
|
79
|
+
if (pending.payload.delta.length >= maxChars) {
|
|
80
|
+
yield pending;
|
|
81
|
+
pending = void 0;
|
|
82
|
+
}
|
|
83
|
+
} else yield event;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
pending = mergeThinkingDelta(pending, event);
|
|
87
|
+
if (pending.payload.delta.length >= maxChars) {
|
|
88
|
+
yield pending;
|
|
89
|
+
pending = void 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
} catch (error) {
|
|
93
|
+
if (pending) {
|
|
94
|
+
yield pending;
|
|
95
|
+
pending = void 0;
|
|
96
|
+
}
|
|
97
|
+
throw error;
|
|
98
|
+
} finally {
|
|
99
|
+
await iterator.return?.();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
export { coalesceThinkingDeltas };
|
|
@@ -20,7 +20,6 @@ import { previewConnectorDefinition, testConnectorInstance } from "../../../conn
|
|
|
20
20
|
import { setConnectorEnabled } from "../../../connectors/lifecycle.js";
|
|
21
21
|
import { getComposioMemorySyncProfile, updateComposioMemorySyncProfile } from "../../../connectors/memory-sync-profile.js";
|
|
22
22
|
import { projectComposioRuntimeStatus } from "../../../connectors/runtime-status.js";
|
|
23
|
-
import { isConnectorRegistrySource, listConnectorRegistries, searchConnectorRegistries } from "../../../connectors/registries/search.js";
|
|
24
23
|
//#region src/gateway/hono/routes/connectors.ts
|
|
25
24
|
init_agent_scope();
|
|
26
25
|
function errorMessage(error) {
|
|
@@ -36,8 +35,7 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
36
35
|
providers: listConnectorProviders().map((provider) => ({
|
|
37
36
|
id: provider.id,
|
|
38
37
|
displayName: provider.displayName
|
|
39
|
-
}))
|
|
40
|
-
registries: listConnectorRegistries()
|
|
38
|
+
}))
|
|
41
39
|
}
|
|
42
40
|
});
|
|
43
41
|
});
|
|
@@ -82,24 +80,6 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
82
80
|
payload: { instances: projectComposioRuntimeStatus(instances, connections, probes) }
|
|
83
81
|
});
|
|
84
82
|
});
|
|
85
|
-
authenticated.get("/api/connectors/registry/search", async (c) => {
|
|
86
|
-
const query = c.req.query("q") ?? c.req.query("query") ?? "";
|
|
87
|
-
const sourceParam = c.req.query("source") ?? "all";
|
|
88
|
-
const results = await searchConnectorRegistries({
|
|
89
|
-
query,
|
|
90
|
-
source: sourceParam !== "all" && isConnectorRegistrySource(sourceParam) ? sourceParam : "all",
|
|
91
|
-
page: Number(c.req.query("page") ?? "1"),
|
|
92
|
-
pageSize: Number(c.req.query("pageSize") ?? "24"),
|
|
93
|
-
browse: c.req.query("browse") === "1" || c.req.query("browse") === "true"
|
|
94
|
-
});
|
|
95
|
-
return c.json({
|
|
96
|
-
ok: true,
|
|
97
|
-
payload: {
|
|
98
|
-
results,
|
|
99
|
-
connectors: results.flatMap((result) => result.connectors)
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
83
|
authenticated.post("/api/connectors/setup/request-secret", strictRateLimitMiddleware, async (c) => {
|
|
104
84
|
const body = await c.req.json().catch(() => ({}));
|
|
105
85
|
const key = body && typeof body === "object" && !Array.isArray(body) && typeof body.key === "string" ? body.key.trim() : "";
|
|
@@ -188,9 +168,17 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
188
168
|
authenticated.get("/api/connectors/composio/catalog", async (c) => {
|
|
189
169
|
try {
|
|
190
170
|
const refresh = c.req.query("refresh") === "1" || c.req.query("refresh") === "true";
|
|
171
|
+
const verificationParam = c.req.query("verification");
|
|
172
|
+
const verification = verificationParam === "verified" || verificationParam === "experimental" ? verificationParam : "all";
|
|
191
173
|
return c.json({
|
|
192
174
|
ok: true,
|
|
193
|
-
payload: await listComposioConnectorCatalog({
|
|
175
|
+
payload: await listComposioConnectorCatalog({
|
|
176
|
+
refresh,
|
|
177
|
+
verification,
|
|
178
|
+
query: c.req.query("q") ?? "",
|
|
179
|
+
page: Number(c.req.query("page") ?? "1"),
|
|
180
|
+
pageSize: Number(c.req.query("pageSize") ?? "24")
|
|
181
|
+
})
|
|
194
182
|
});
|
|
195
183
|
} catch (error) {
|
|
196
184
|
return c.json({
|
|
@@ -23,7 +23,7 @@ export declare function createAgentSSEHandler(config: SSEHandlerConfig): (c: Con
|
|
|
23
23
|
* POST /api/agent/resume — Re-attach to an in-progress agent run via SSE.
|
|
24
24
|
*
|
|
25
25
|
* Request body: { runId, sessionKey }
|
|
26
|
-
* The relay replays
|
|
26
|
+
* The relay replays retained buffered events from the beginning and then live-tails
|
|
27
27
|
* until the run completes.
|
|
28
28
|
*
|
|
29
29
|
* SSE events are identical to those from POST /api/agent.
|
|
@@ -168,7 +168,7 @@ function createAgentSSEHandler(config) {
|
|
|
168
168
|
* POST /api/agent/resume — Re-attach to an in-progress agent run via SSE.
|
|
169
169
|
*
|
|
170
170
|
* Request body: { runId, sessionKey }
|
|
171
|
-
* The relay replays
|
|
171
|
+
* The relay replays retained buffered events from the beginning and then live-tails
|
|
172
172
|
* until the run completes.
|
|
173
173
|
*
|
|
174
174
|
* SSE events are identical to those from POST /api/agent.
|
|
@@ -7,6 +7,7 @@ import { shouldSkipWebchatInboundByAbortCutoff } from "../../session/abort-cutof
|
|
|
7
7
|
import "../chat-limits.js";
|
|
8
8
|
import { resolveWebchatSessionKey } from "../resolve-webchat-session-key.js";
|
|
9
9
|
import { ChatStreamMapper } from "../chat-stream/mapper.js";
|
|
10
|
+
import { coalesceThinkingDeltas } from "../chat-stream/thinking-delta-coalescer.js";
|
|
10
11
|
import crypto from "crypto";
|
|
11
12
|
//#region src/gateway/service/run-gateway-agent.ts
|
|
12
13
|
init_logger();
|
|
@@ -90,7 +91,10 @@ async function* runGatewayAgent(deps, message, channel, chatId, attachments, thi
|
|
|
90
91
|
signal: mergedSignal,
|
|
91
92
|
runId
|
|
92
93
|
});
|
|
93
|
-
|
|
94
|
+
const mappedEvents = (async function* () {
|
|
95
|
+
for await (const event of eventStream) yield* mapper.map(event);
|
|
96
|
+
})();
|
|
97
|
+
for await (const event of coalesceThinkingDeltas(mappedEvents)) yield* emitAndYield([event]);
|
|
94
98
|
const endStatus = mergedSignal.aborted ? "cancelled" : "success";
|
|
95
99
|
const endSummary = mergedSignal.aborted ? "Interrupted" : "Message processed successfully";
|
|
96
100
|
yield* emitAndYield(mapper.end(endStatus, endSummary));
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import { tryParseMediaUri } from "./uri.js";
|
|
2
2
|
import { deleteMediaBuffer } from "./store.js";
|
|
3
3
|
//#region src/media/session-references.ts
|
|
4
|
-
function collectFromValue(value, out) {
|
|
4
|
+
function collectFromValue(value, out, seen) {
|
|
5
5
|
if (!value) return;
|
|
6
6
|
if (typeof value === "string") {
|
|
7
7
|
if (value.startsWith("media://")) out.add(value.trim());
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
10
|
if (Array.isArray(value)) {
|
|
11
|
-
|
|
11
|
+
if (seen.has(value)) return;
|
|
12
|
+
seen.add(value);
|
|
13
|
+
for (const item of value) collectFromValue(item, out, seen);
|
|
12
14
|
return;
|
|
13
15
|
}
|
|
14
16
|
if (typeof value !== "object") return;
|
|
17
|
+
if (seen.has(value)) return;
|
|
18
|
+
seen.add(value);
|
|
15
19
|
const record = value;
|
|
16
|
-
|
|
17
|
-
if (Array.isArray(record.media)) collectFromValue(record.media, out);
|
|
18
|
-
if (Array.isArray(record.attachments)) collectFromValue(record.attachments, out);
|
|
20
|
+
for (const nested of Object.values(record)) collectFromValue(nested, out, seen);
|
|
19
21
|
}
|
|
20
22
|
function collectMediaUrisFromMessages(messages) {
|
|
21
23
|
const out = /* @__PURE__ */ new Set();
|
|
22
|
-
|
|
24
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
25
|
+
for (const message of messages) collectFromValue(message, out, seen);
|
|
23
26
|
return out;
|
|
24
27
|
}
|
|
25
28
|
function messagesReferenceMediaUri(messages, uri) {
|
|
@@ -33,22 +33,65 @@ function collectToolResults(messages) {
|
|
|
33
33
|
if (!id || typeof id !== "string") continue;
|
|
34
34
|
map.set(id, {
|
|
35
35
|
text: flattenMessageContent(m.content),
|
|
36
|
-
isError: m.isError
|
|
36
|
+
isError: m.isError,
|
|
37
|
+
details: m.details
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
40
|
return map;
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
-
if (!tool_calls?.length) return void 0;
|
|
42
|
+
function collectMessageToolCalls(content, openAiToolCalls, rawToolCalls) {
|
|
43
43
|
const out = [];
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
const seen = /* @__PURE__ */ new Set();
|
|
45
|
+
const add = (call) => {
|
|
46
|
+
const key = call.id ? `id:${call.id}` : `position:${out.length}`;
|
|
47
|
+
if (seen.has(key)) return;
|
|
48
|
+
seen.add(key);
|
|
49
|
+
out.push(call);
|
|
50
|
+
};
|
|
51
|
+
for (const call of openAiToolCalls ?? []) add({
|
|
52
|
+
id: call.id,
|
|
53
|
+
name: call.function.name,
|
|
54
|
+
args: safeJsonParseArguments(call.function.arguments)
|
|
55
|
+
});
|
|
56
|
+
for (const item of Array.isArray(rawToolCalls) ? rawToolCalls : []) {
|
|
57
|
+
if (!item || typeof item !== "object") continue;
|
|
58
|
+
const call = item;
|
|
59
|
+
const name = typeof call.name === "string" ? call.name : void 0;
|
|
60
|
+
if (!name) continue;
|
|
61
|
+
add({
|
|
62
|
+
id: typeof call.id === "string" ? call.id : void 0,
|
|
63
|
+
name,
|
|
64
|
+
args: call.args ?? call.arguments ?? call.input
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
for (const item of Array.isArray(content) ? content : []) {
|
|
68
|
+
if (!item || typeof item !== "object") continue;
|
|
69
|
+
const call = item;
|
|
70
|
+
if (call.type !== "toolCall" && call.type !== "tool_use" && call.type !== "tool_call") continue;
|
|
71
|
+
const fn = call.function && typeof call.function === "object" ? call.function : void 0;
|
|
72
|
+
const name = typeof call.name === "string" ? call.name : typeof fn?.name === "string" ? fn.name : void 0;
|
|
73
|
+
if (!name) continue;
|
|
74
|
+
const rawArgs = call.arguments ?? call.args ?? call.input ?? fn?.arguments;
|
|
75
|
+
add({
|
|
76
|
+
id: typeof call.id === "string" ? call.id : void 0,
|
|
77
|
+
name,
|
|
78
|
+
args: typeof rawArgs === "string" ? safeJsonParseArguments(rawArgs) : rawArgs
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return out.length ? out : void 0;
|
|
82
|
+
}
|
|
83
|
+
function toolCallsWithResults(toolCalls, results) {
|
|
84
|
+
if (!toolCalls?.length) return void 0;
|
|
85
|
+
const out = [];
|
|
86
|
+
for (const call of toolCalls) {
|
|
87
|
+
const res = call.id ? results.get(call.id) : void 0;
|
|
46
88
|
out.push({
|
|
47
|
-
id:
|
|
48
|
-
name:
|
|
49
|
-
args:
|
|
89
|
+
id: call.id,
|
|
90
|
+
name: call.name,
|
|
91
|
+
args: call.args,
|
|
50
92
|
result: res?.text,
|
|
51
|
-
isError: res?.isError
|
|
93
|
+
isError: res?.isError,
|
|
94
|
+
details: res?.details
|
|
52
95
|
});
|
|
53
96
|
}
|
|
54
97
|
return out.length ? out : void 0;
|
|
@@ -74,7 +117,7 @@ function messagesToClientHistory(messages, opts) {
|
|
|
74
117
|
}
|
|
75
118
|
if (m.role === "assistant") {
|
|
76
119
|
const text = flattenMessageContent(m.content);
|
|
77
|
-
const toolCalls = toolCallsWithResults(m.tool_calls, results);
|
|
120
|
+
const toolCalls = toolCallsWithResults(collectMessageToolCalls(m.content, m.tool_calls), results);
|
|
78
121
|
out.push({
|
|
79
122
|
role: "assistant",
|
|
80
123
|
content: text,
|
|
@@ -108,7 +151,8 @@ function collectHistoryToolResults(messages) {
|
|
|
108
151
|
if (!id || typeof id !== "string") continue;
|
|
109
152
|
map.set(id, {
|
|
110
153
|
text: flattenMessageContent(m.content ?? ""),
|
|
111
|
-
isError: m.isError
|
|
154
|
+
isError: m.isError,
|
|
155
|
+
details: m.details
|
|
112
156
|
});
|
|
113
157
|
}
|
|
114
158
|
return map;
|
|
@@ -380,7 +424,7 @@ function transcriptRowsToClientHistory(rows, opts) {
|
|
|
380
424
|
...rawContent ? { rawContent } : {},
|
|
381
425
|
...displayIndex !== void 0 ? { displayIndex } : {},
|
|
382
426
|
timestamp: parseTimestampValue(messageRow.timestamp),
|
|
383
|
-
toolCalls: toolCallsWithResults(messageRow.tool_calls
|
|
427
|
+
toolCalls: toolCallsWithResults(collectMessageToolCalls(messageRow.content, messageRow.tool_calls, messageRow.toolCalls), results)
|
|
384
428
|
});
|
|
385
429
|
}
|
|
386
430
|
return out;
|
|
@@ -17,6 +17,7 @@ export declare function listConnectorApprovals(options?: {
|
|
|
17
17
|
export declare function decideConnectorApproval(id: string, decision: 'approved' | 'denied', now?: Date): ConnectorApprovalRecord | undefined;
|
|
18
18
|
export declare function consumeConnectorApproval(id: string, argumentsHash: string, now?: Date): ConnectorApprovalRecord | undefined;
|
|
19
19
|
export declare function upsertConnectorCatalogEntry(input: CachedConnectorCatalogEntry): CachedConnectorCatalogEntry;
|
|
20
|
+
export declare function replaceConnectorCatalogEntries(provider: string, entries: CachedConnectorCatalogEntry[]): CachedConnectorCatalogEntry[];
|
|
20
21
|
export declare function getCachedConnectorCatalogEntry(connectorId: string): CachedConnectorCatalogEntry | undefined;
|
|
21
22
|
export declare function listCachedConnectorCatalogEntries(provider?: string): CachedConnectorCatalogEntry[];
|
|
22
23
|
export declare function upsertConnectorInstallation(input: Omit<ConnectorInstallationPolicy, 'createdAt' | 'updatedAt'> & Partial<Pick<ConnectorInstallationPolicy, 'createdAt' | 'updatedAt'>>): ConnectorInstallationPolicy;
|
|
@@ -194,6 +194,17 @@ function upsertConnectorCatalogEntry(input) {
|
|
|
194
194
|
});
|
|
195
195
|
return input;
|
|
196
196
|
}
|
|
197
|
+
function replaceConnectorCatalogEntries(provider, entries) {
|
|
198
|
+
runSqliteWriteTransaction((db) => {
|
|
199
|
+
db.prepare("DELETE FROM connector_catalog_entries WHERE provider = ?").run(provider);
|
|
200
|
+
const insert = db.prepare(`
|
|
201
|
+
INSERT INTO connector_catalog_entries (connector_id, provider, definition_json, fetched_at, expires_at)
|
|
202
|
+
VALUES (?, ?, ?, ?, ?)
|
|
203
|
+
`);
|
|
204
|
+
for (const entry of entries) insert.run(entry.connectorId, provider, JSON.stringify(entry.definition), entry.fetchedAt, entry.expiresAt ?? null);
|
|
205
|
+
});
|
|
206
|
+
return entries;
|
|
207
|
+
}
|
|
197
208
|
function getCachedConnectorCatalogEntry(connectorId) {
|
|
198
209
|
const row = getSqliteDatabase().prepare("SELECT * FROM connector_catalog_entries WHERE connector_id = ?").get(connectorId);
|
|
199
210
|
return row ? catalogFromRow(row) : void 0;
|
|
@@ -380,4 +391,4 @@ function releaseConnectorWebhookDelivery(id, error) {
|
|
|
380
391
|
});
|
|
381
392
|
}
|
|
382
393
|
//#endregion
|
|
383
|
-
export { appendConnectorExecutionAudit, claimConnectorWebhookDelivery, completeConnectorWebhookDelivery, consumeConnectorApproval, createConnectorApproval, decideConnectorApproval, deleteConnectorConnection, deleteConnectorInstallation, getCachedConnectorCatalogEntry, getConnectorApproval, getConnectorConnection, getConnectorInstallation, listCachedConnectorCatalogEntries, listConnectorActionMetadata, listConnectorApprovals, listConnectorConnections, listConnectorExecutionAudit, listConnectorInstallations, releaseConnectorWebhookDelivery, upsertConnectorActionMetadata, upsertConnectorCatalogEntry, upsertConnectorConnection, upsertConnectorInstallation };
|
|
394
|
+
export { appendConnectorExecutionAudit, claimConnectorWebhookDelivery, completeConnectorWebhookDelivery, consumeConnectorApproval, createConnectorApproval, decideConnectorApproval, deleteConnectorConnection, deleteConnectorInstallation, getCachedConnectorCatalogEntry, getConnectorApproval, getConnectorConnection, getConnectorInstallation, listCachedConnectorCatalogEntries, listConnectorActionMetadata, listConnectorApprovals, listConnectorConnections, listConnectorExecutionAudit, listConnectorInstallations, releaseConnectorWebhookDelivery, replaceConnectorCatalogEntries, upsertConnectorActionMetadata, upsertConnectorCatalogEntry, upsertConnectorConnection, upsertConnectorInstallation };
|
|
@@ -16,7 +16,7 @@ export { appendMemorySignal, appendMemoryTraceEvent, deleteMemoryRecord, findLat
|
|
|
16
16
|
export { attachMemoryEvidence, claimKnowledgeSourceItems, completeKnowledgeSourceItemSynthesis, deleteMemoryEvidenceForRecord, finishKnowledgeSyncRun, getKnowledgeConsumerWatermark, getKnowledgeSourceCursor, getKnowledgeSourceItem, listKnowledgeSourceItems, listKnowledgeSourceChanges, listKnowledgeSyncRuns, listMemoryEvidence, setKnowledgeSourceItemSynthesisStatus, setKnowledgeConsumerWatermark, setKnowledgeSourceCursor, startKnowledgeSyncRun, upsertKnowledgeSourceItems, } from './knowledge-repository.js';
|
|
17
17
|
export { deleteSessionConfig, getSessionConfig, hasSessionConfig, setSessionConfig, updateSessionConfig, } from './config-repository.js';
|
|
18
18
|
export { createObjectLinkRecord, getActivityEventRecord, listActivityRecords, listObjectActivityRecords, listObjectLinkRecords, listProjectActivityRecords, recordActivityEvent, } from './activity-repository.js';
|
|
19
|
-
export { appendConnectorExecutionAudit, claimConnectorWebhookDelivery, completeConnectorWebhookDelivery, consumeConnectorApproval, createConnectorApproval, decideConnectorApproval, deleteConnectorConnection, deleteConnectorInstallation, getConnectorConnection, getConnectorApproval, getConnectorInstallation, getCachedConnectorCatalogEntry, listCachedConnectorCatalogEntries, listConnectorActionMetadata, listConnectorApprovals, listConnectorConnections, listConnectorExecutionAudit, listConnectorInstallations, releaseConnectorWebhookDelivery, upsertConnectorActionMetadata, upsertConnectorCatalogEntry, upsertConnectorConnection, upsertConnectorInstallation, type CachedConnectorCatalogEntry, } from './connector-repository.js';
|
|
19
|
+
export { appendConnectorExecutionAudit, claimConnectorWebhookDelivery, completeConnectorWebhookDelivery, consumeConnectorApproval, createConnectorApproval, decideConnectorApproval, deleteConnectorConnection, deleteConnectorInstallation, getConnectorConnection, getConnectorApproval, getConnectorInstallation, getCachedConnectorCatalogEntry, listCachedConnectorCatalogEntries, listConnectorActionMetadata, listConnectorApprovals, listConnectorConnections, listConnectorExecutionAudit, listConnectorInstallations, releaseConnectorWebhookDelivery, replaceConnectorCatalogEntries, upsertConnectorActionMetadata, upsertConnectorCatalogEntry, upsertConnectorConnection, upsertConnectorInstallation, type CachedConnectorCatalogEntry, } from './connector-repository.js';
|
|
20
20
|
export { getUserTrustPolicy, setUserTrustPolicy, } from './user-trust-repository.js';
|
|
21
21
|
export { consumeMemoryReferenceConsent, decideMemoryReferenceConsent, ensureMemoryReferenceConsentRequest, hasMemoryReferenceConsent, listMemoryReferenceConsents, revokeMemoryReferenceConsent, type MemoryReferenceConsent, type MemoryReferenceGrantScope, } from './memory-reference-consent-repository.js';
|
|
22
22
|
export { getUserProfilePromptState, setUserProfilePromptState, } from './user-profile-setup-repository.js';
|
|
@@ -17,8 +17,8 @@ import { USER_UNDERSTANDING_REMEDIATION_POLICY, appendMemorySignal, appendMemory
|
|
|
17
17
|
import { attachMemoryEvidence, claimKnowledgeSourceItems, completeKnowledgeSourceItemSynthesis, deleteMemoryEvidenceForRecord, finishKnowledgeSyncRun, getKnowledgeConsumerWatermark, getKnowledgeSourceCursor, getKnowledgeSourceItem, listKnowledgeSourceChanges, listKnowledgeSourceItems, listKnowledgeSyncRuns, listMemoryEvidence, setKnowledgeConsumerWatermark, setKnowledgeSourceCursor, setKnowledgeSourceItemSynthesisStatus, startKnowledgeSyncRun, upsertKnowledgeSourceItems } from "./knowledge-repository.js";
|
|
18
18
|
import { deleteSessionConfig, getSessionConfig, hasSessionConfig, setSessionConfig, updateSessionConfig } from "./config-repository.js";
|
|
19
19
|
import { createObjectLinkRecord, getActivityEventRecord, listActivityRecords, listObjectActivityRecords, listObjectLinkRecords, listProjectActivityRecords, recordActivityEvent } from "./activity-repository.js";
|
|
20
|
-
import { appendConnectorExecutionAudit, claimConnectorWebhookDelivery, completeConnectorWebhookDelivery, consumeConnectorApproval, createConnectorApproval, decideConnectorApproval, deleteConnectorConnection, deleteConnectorInstallation, getCachedConnectorCatalogEntry, getConnectorApproval, getConnectorConnection, getConnectorInstallation, listCachedConnectorCatalogEntries, listConnectorActionMetadata, listConnectorApprovals, listConnectorConnections, listConnectorExecutionAudit, listConnectorInstallations, releaseConnectorWebhookDelivery, upsertConnectorActionMetadata, upsertConnectorCatalogEntry, upsertConnectorConnection, upsertConnectorInstallation } from "./connector-repository.js";
|
|
20
|
+
import { appendConnectorExecutionAudit, claimConnectorWebhookDelivery, completeConnectorWebhookDelivery, consumeConnectorApproval, createConnectorApproval, decideConnectorApproval, deleteConnectorConnection, deleteConnectorInstallation, getCachedConnectorCatalogEntry, getConnectorApproval, getConnectorConnection, getConnectorInstallation, listCachedConnectorCatalogEntries, listConnectorActionMetadata, listConnectorApprovals, listConnectorConnections, listConnectorExecutionAudit, listConnectorInstallations, releaseConnectorWebhookDelivery, replaceConnectorCatalogEntries, upsertConnectorActionMetadata, upsertConnectorCatalogEntry, upsertConnectorConnection, upsertConnectorInstallation } from "./connector-repository.js";
|
|
21
21
|
import { getUserTrustPolicy, setUserTrustPolicy } from "./user-trust-repository.js";
|
|
22
22
|
import { consumeMemoryReferenceConsent, decideMemoryReferenceConsent, ensureMemoryReferenceConsentRequest, hasMemoryReferenceConsent, listMemoryReferenceConsents, revokeMemoryReferenceConsent } from "./memory-reference-consent-repository.js";
|
|
23
23
|
import { getUserProfilePromptState, setUserProfilePromptState } from "./user-profile-setup-repository.js";
|
|
24
|
-
export { DatabaseSchemaMigrationGapError, DatabaseSchemaTooNewError, SCHEMA_META_SCHEMA_VERSION_KEY, USER_UNDERSTANDING_REMEDIATION_POLICY, XOPC_DB_BASELINE_SCHEMA_VERSION, XOPC_DB_FILENAME, XOPC_DB_SCHEMA_VERSION, appendConnectorExecutionAudit, appendMemorySignal, appendMemoryTraceEvent, appendTranscriptEntry, applyPendingMigrations, attachMemoryEvidence, buildDefaultSessionMetadata, buildGlobalSessionStats, captureCompactionCheckpoint, claimConnectorWebhookDelivery, claimKnowledgeSourceItems, classifyStoredRow, closeXopcDatabase, completeConnectorWebhookDelivery, completeKnowledgeSourceItemSynthesis, consumeConnectorApproval, consumeMemoryReferenceConsent, createConnectorApproval, createObjectLinkRecord, decideConnectorApproval, decideMemoryReferenceConsent, deleteConnectorConnection, deleteConnectorInstallation, deleteMemoryEvidenceForRecord, deleteMemoryRecord, deleteNoteAgentContextRecord, deleteNoteRecord, deleteSessionConfig, deleteSessionRecord, discoverSqlMigrations, ensureMemoryReferenceConsentRequest, ensureSessionRecord, ensureXopcDatabaseSchema, estimateTokensFromMessages, extractFtsContent, findLatestMemoryInjectTrace, findSessionKeyBySessionId, finishKnowledgeSyncRun, getActivityEventRecord, getCachedConnectorCatalogEntry, getCompactionCheckpointDetail, getConnectorApproval, getConnectorConnection, getConnectorInstallation, getCurrentSessionId, getGlobalSessionStats, getKnowledgeConsumerWatermark, getKnowledgeSourceCursor, getKnowledgeSourceItem, getMemoryProviderState, getMemoryRecord, getNoteAgentContextRecord, getNoteRecord, getSessionConfig, getSessionMetadata, getSessionPersistedLevels, getSqliteDatabase, getUserProfilePromptState, getUserTrustPolicy, getXopcDatabase, hasMemoryReferenceConsent, hasSessionConfig, hasUnresolvedMemoryConflict, incrementSessionStatsOnAppend, inspectSchemaMigrationStatus, isXopcDatabaseOpen, listActivityRecords, listCachedConnectorCatalogEntries, listCompactionCheckpoints, listConnectorActionMetadata, listConnectorApprovals, listConnectorConnections, listConnectorExecutionAudit, listConnectorInstallations, listKnowledgeSourceChanges, listKnowledgeSourceItems, listKnowledgeSyncRuns, listMemoryEvidence, listMemoryRecords, listMemoryReferenceConsents, listMemorySignals, listMemoryTraceEvents, listNoteRecords, listObjectActivityRecords, listObjectLinkRecords, listProjectActivityRecords, listRegisteredMigrationTargets, listSessionMetadata, listSessionsByAgent, loadCheckpointRows, loadLlmMessagesForSession, loadTranscriptRows, loadTranscriptRowsForSession, markMemoryRecordsConflicted, metadataToSessionInsert, openXopcDatabase, paginateTranscriptMessages, patchSessionMetadata, readSchemaVersion, readSchemaVersionForTest, recordActivityEvent, releaseConnectorWebhookDelivery, replaceTranscriptRows, requireXopcDatabase, resetSessionRecord, resetXopcDatabaseSingletonForTest, resolveMigrationsDir, resolveSessionAgentId, resolveXopcDatabasePath, restoreCompactionCheckpoint, revokeMemoryReferenceConsent, runSqliteWriteTransaction, searchMemoryIndex, searchMemoryRecords, sessionConfigRowToConfig, sessionRowToMetadata, setKnowledgeConsumerWatermark, setKnowledgeSourceCursor, setKnowledgeSourceItemSynthesisStatus, setLatestMemoryInjectFeedback, setMemoryProviderState, setMemoryTraceFeedback, setSessionConfig, setUserProfilePromptState, setUserTrustPolicy, startKnowledgeSyncRun, summarizeMemoryRecallFeedback, summarizeUserUnderstandingQuality, syncMemoryIndex, transcriptEntryRowToStoredRow, updateSessionConfig, updateSessionStats, upsertConnectorActionMetadata, upsertConnectorCatalogEntry, upsertConnectorConnection, upsertConnectorInstallation, upsertKnowledgeSourceItems, upsertMemoryRecord, upsertNoteAgentContextRecord, upsertNoteRecord };
|
|
24
|
+
export { DatabaseSchemaMigrationGapError, DatabaseSchemaTooNewError, SCHEMA_META_SCHEMA_VERSION_KEY, USER_UNDERSTANDING_REMEDIATION_POLICY, XOPC_DB_BASELINE_SCHEMA_VERSION, XOPC_DB_FILENAME, XOPC_DB_SCHEMA_VERSION, appendConnectorExecutionAudit, appendMemorySignal, appendMemoryTraceEvent, appendTranscriptEntry, applyPendingMigrations, attachMemoryEvidence, buildDefaultSessionMetadata, buildGlobalSessionStats, captureCompactionCheckpoint, claimConnectorWebhookDelivery, claimKnowledgeSourceItems, classifyStoredRow, closeXopcDatabase, completeConnectorWebhookDelivery, completeKnowledgeSourceItemSynthesis, consumeConnectorApproval, consumeMemoryReferenceConsent, createConnectorApproval, createObjectLinkRecord, decideConnectorApproval, decideMemoryReferenceConsent, deleteConnectorConnection, deleteConnectorInstallation, deleteMemoryEvidenceForRecord, deleteMemoryRecord, deleteNoteAgentContextRecord, deleteNoteRecord, deleteSessionConfig, deleteSessionRecord, discoverSqlMigrations, ensureMemoryReferenceConsentRequest, ensureSessionRecord, ensureXopcDatabaseSchema, estimateTokensFromMessages, extractFtsContent, findLatestMemoryInjectTrace, findSessionKeyBySessionId, finishKnowledgeSyncRun, getActivityEventRecord, getCachedConnectorCatalogEntry, getCompactionCheckpointDetail, getConnectorApproval, getConnectorConnection, getConnectorInstallation, getCurrentSessionId, getGlobalSessionStats, getKnowledgeConsumerWatermark, getKnowledgeSourceCursor, getKnowledgeSourceItem, getMemoryProviderState, getMemoryRecord, getNoteAgentContextRecord, getNoteRecord, getSessionConfig, getSessionMetadata, getSessionPersistedLevels, getSqliteDatabase, getUserProfilePromptState, getUserTrustPolicy, getXopcDatabase, hasMemoryReferenceConsent, hasSessionConfig, hasUnresolvedMemoryConflict, incrementSessionStatsOnAppend, inspectSchemaMigrationStatus, isXopcDatabaseOpen, listActivityRecords, listCachedConnectorCatalogEntries, listCompactionCheckpoints, listConnectorActionMetadata, listConnectorApprovals, listConnectorConnections, listConnectorExecutionAudit, listConnectorInstallations, listKnowledgeSourceChanges, listKnowledgeSourceItems, listKnowledgeSyncRuns, listMemoryEvidence, listMemoryRecords, listMemoryReferenceConsents, listMemorySignals, listMemoryTraceEvents, listNoteRecords, listObjectActivityRecords, listObjectLinkRecords, listProjectActivityRecords, listRegisteredMigrationTargets, listSessionMetadata, listSessionsByAgent, loadCheckpointRows, loadLlmMessagesForSession, loadTranscriptRows, loadTranscriptRowsForSession, markMemoryRecordsConflicted, metadataToSessionInsert, openXopcDatabase, paginateTranscriptMessages, patchSessionMetadata, readSchemaVersion, readSchemaVersionForTest, recordActivityEvent, releaseConnectorWebhookDelivery, replaceConnectorCatalogEntries, replaceTranscriptRows, requireXopcDatabase, resetSessionRecord, resetXopcDatabaseSingletonForTest, resolveMigrationsDir, resolveSessionAgentId, resolveXopcDatabasePath, restoreCompactionCheckpoint, revokeMemoryReferenceConsent, runSqliteWriteTransaction, searchMemoryIndex, searchMemoryRecords, sessionConfigRowToConfig, sessionRowToMetadata, setKnowledgeConsumerWatermark, setKnowledgeSourceCursor, setKnowledgeSourceItemSynthesisStatus, setLatestMemoryInjectFeedback, setMemoryProviderState, setMemoryTraceFeedback, setSessionConfig, setUserProfilePromptState, setUserTrustPolicy, startKnowledgeSyncRun, summarizeMemoryRecallFeedback, summarizeUserUnderstandingQuality, syncMemoryIndex, transcriptEntryRowToStoredRow, updateSessionConfig, updateSessionStats, upsertConnectorActionMetadata, upsertConnectorCatalogEntry, upsertConnectorConnection, upsertConnectorInstallation, upsertKnowledgeSourceItems, upsertMemoryRecord, upsertNoteAgentContextRecord, upsertNoteRecord };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.159",
|
|
4
4
|
"description": "Local-first AI system that remembers context, coordinates AI, and sustains long-term progress.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"zod": "^4.4.3"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
|
-
"@composio/core": "0.14.
|
|
109
|
+
"@composio/core": "0.14.1",
|
|
110
110
|
"@composio/experimental": "0.2.0",
|
|
111
111
|
"@huggingface/transformers": "3.8.1",
|
|
112
112
|
"@larksuiteoapi/node-sdk": "^1.66.0",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
|
-
"@composio/core": "0.14.
|
|
137
|
+
"@composio/core": "0.14.1",
|
|
138
138
|
"@composio/experimental": "0.2.0",
|
|
139
139
|
"@huggingface/transformers": "3.8.1",
|
|
140
140
|
"@larksuiteoapi/node-sdk": "^1.66.0",
|