@xopcai/xopc 0.0.171 → 0.0.172
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-BLz30jWq.js → activity-store-C3Y-bESI.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BKZO0EFn.js → agent-avatar-dicebear-CPyev9P7.js} +1 -1
- package/dist/gateway/static/root/assets/agents-Bf_kK2Ay.js +2 -0
- package/dist/gateway/static/root/assets/{api-N2qKY-WI.js → api-B7qEr_Rw.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CNZkpXCD.js → app-management-settings-panel-Br_9-7fs.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-Drf5a563.js → appearance-settings-uyLcRPai.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-DXFCP5-1.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-ChVwOXE5.js → archive-plugin-B19REnR5.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-BVK3Y2d9.js → attachment-load-DLWCC4Yi.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-suggestion-card-DH4N0SYR.js → automation-suggestion-card-ky5S5lly.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-D8pT1o2O.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CeHY6VVP.js → binary-plugins-CtPEzLlo.js} +1 -1
- package/dist/gateway/static/root/assets/block-editor-CQVR4Xij.js +184 -0
- package/dist/gateway/static/root/assets/browser-settings-page-Bav_skKN.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-femCtfpo.js → browser-workflow-inputs-CimCGbhq.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-o0GVE_aF.js → browser-workflows-page-DewuCw3p.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BHaYYo9E.js +7 -0
- package/dist/gateway/static/root/assets/{capability-presets-api-Bx-JJC0R.js → capability-presets-api-B5RTs-Az.js} +1 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-BgchTh81.js +1 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-CTw3ibx4.js → channel-recipient-api-Czu0YzIZ.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-BP0e62wt.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-DBWKfeGe.js +1 -0
- package/dist/gateway/static/root/assets/connector-logo-Di3gnR_D.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-CC5kh0de.js +2 -0
- package/dist/gateway/static/root/assets/desktop-pet-D-ZUNHhn.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CIeH4VyP.js → desktop-pet-settings-C3L6AI8_.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-Ddgt6c3K.js → directory-picker-path-field-Dvq4iG6P.js} +1 -1
- package/dist/gateway/static/root/assets/dreaming-settings-D9i54kWO.js +3 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-CJGwUaQX.js → extension-debug-page-BecQjU0J.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-B3zHKJAB.js → extension-page-BeVkPSm-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-Cj9rrSr1.js → extension-settings-page-DMoo2mKx.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-BdmtlJRP.js → gateway-config-api-Bthb3_6v.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-C2RwKIsl.js → gateway-settings-Bh8nPvJQ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-mcMq_uu_.js → gateway-startup-retry-D3USVm9D.js} +1 -1
- package/dist/gateway/static/root/assets/{goal-create-dialog-5Ryd_rx4.js → goal-create-dialog-Dp0AyDHI.js} +1 -1
- package/dist/gateway/static/root/assets/goal-detail-page-CNt7nrdS.js +4 -0
- package/dist/gateway/static/root/assets/{goals-config-api-CAO1J4jn.js → goals-config-api-C_2QWBtb.js} +1 -1
- package/dist/gateway/static/root/assets/goals-page-Bm_NZFiZ.js +2 -0
- package/dist/gateway/static/root/assets/{goals-settings-Boj2izKZ.js → goals-settings-DhL643tc.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-DbPC9a_y.js → heartbeat-settings-COVFwp7C.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-DrLCLTXn.js → image-generation-api-BNQlnwpU.js} +1 -1
- package/dist/gateway/static/root/assets/index-C_XSKOH6.css +1 -0
- package/dist/gateway/static/root/assets/{index-vHb2z7VS.js → index-DUasAutC.js} +67 -67
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BrxfptgY.js → keyboard-shortcuts-settings-DfdJRJVy.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-BP0_Ih0e.js → local-app-workbench-page-DZwkD1co.js} +2 -2
- package/dist/gateway/static/root/assets/{local-apps-page-DNCRlfFs.js → local-apps-page-BvCPOgoi.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CzIfXqm8.js → locale-store-BP0vD37A.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-dNL0Y1dA.js +7 -0
- package/dist/gateway/static/root/assets/{markdown-split-CIUH9Lor.js → markdown-split-YO1rDk9m.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DX4AgkCs.js → media-plugins-CU_RRf-q.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-CKZuaOeG.js → messages-BWtP5TFz.js} +2 -2
- package/dist/gateway/static/root/assets/{notes-page-D1KprtxL.js → notes-page-CeFiOK3S.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-B8MKxpZb.js +4 -0
- package/dist/gateway/static/root/assets/{page-tabs-DjZPJGf6.js → page-tabs-tiHmRJUA.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-DNiJTpwZ.js → preview-open-alternatives-CU6XgaCz.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-CNfR17-g.js → product-open-page-Dn4_qor4.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-CWBuuX-S.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-BJSsLsXH.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-DXJDb8vB.js +1 -0
- package/dist/gateway/static/root/assets/{save-bar-controls-BGZFVO9S.js → save-bar-controls-edDUIbXo.js} +1 -1
- package/dist/gateway/static/root/assets/{schedule-field-BAZiHtds.js → schedule-field-DqJO_5Yb.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-CesBcwJH.js → schema-form-CMh0jzy5.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-DeHpWgxM.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cf-TEYUd.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-Bxc54BLj.js → settings-form-section-Bb0Bc3nJ.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-CYrho7Db.js → settings-loading-skeleton-DQhADvz1.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-C03X5fkh.js → settings-page-b0M5HukN.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-CZAJbv4E.js → settings-page-layout-hvjtIjvh.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-Jv8_bcOD.js → setup-status-panel-BFyfed_g.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-DSC7tKKG.js → share-preview-page-rbeaOpTg.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-CYnH9sTt.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-Cr8_m-jS.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-Chtc1xDO.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-BO89zw5H.js → system-settings-panel-BHo_hgnL.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-1OkdVC8l.js → theme-store-C3KnnjcU.js} +1 -1
- package/dist/gateway/static/root/assets/time-picker-D-G-uwVJ.js +1 -0
- package/dist/gateway/static/root/assets/{typed-models-lib-D-_vct_y.js → typed-models-lib-DtRnG-YI.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-VlFtjlET.js → use-channel-catalog-CWWItX2g.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-D7qMR26X.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BhDk-UV_.js → voice-api-key-field-BTnltQHZ.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-page-CpqFZze9.js +1 -0
- package/dist/gateway/static/root/assets/work-item-detail-page-t4dXpGC0.js +1 -0
- package/dist/gateway/static/root/assets/work-page-BXwDKiMZ.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-uVw4Yoej.js → workflow-run-setup-panel-D7vKChFZ.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-Bos9HyqT.js +11 -0
- package/dist/gateway/static/root/index.html +7 -7
- package/dist/package.js +1 -1
- package/dist/src/agent/memory/builtin-provider.js +4 -4
- package/dist/src/agent/memory/manager.d.ts +4 -1
- package/dist/src/agent/memory/manager.js +8 -3
- package/dist/src/agent/memory/understanding/service.d.ts +2 -0
- package/dist/src/agent/memory/understanding/service.js +11 -9
- package/dist/src/agent/service.d.ts +1 -0
- package/dist/src/agent/service.js +3 -0
- package/dist/src/automations/domain/validation.d.ts +8 -8
- package/dist/src/automations/draft/automation-draft-validator.d.ts +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/connectors/composio-sessions.d.ts +1 -0
- package/dist/src/connectors/composio-sessions.js +14 -5
- package/dist/src/connectors/composio-triggers.d.ts +1 -1
- package/dist/src/connectors/composio-triggers.js +4 -3
- package/dist/src/connectors/composio.js +1 -0
- package/dist/src/connectors/{connector-memory-sync.d.ts → connected-source-ingestion.d.ts} +11 -4
- package/dist/src/connectors/{connector-memory-sync.js → connected-source-ingestion.js} +49 -101
- package/dist/src/connectors/connected-source-normalizers.d.ts +15 -0
- package/dist/src/connectors/connected-source-normalizers.js +186 -0
- package/dist/src/connectors/connector-identity.d.ts +2 -0
- package/dist/src/connectors/connector-identity.js +29 -0
- package/dist/src/connectors/learning-coordinator.d.ts +25 -0
- package/dist/src/connectors/learning-coordinator.js +214 -0
- package/dist/src/connectors/learning-recipes.d.ts +22 -0
- package/dist/src/connectors/learning-recipes.js +121 -0
- package/dist/src/connectors/runtime-status.d.ts +1 -8
- package/dist/src/connectors/runtime-status.js +4 -29
- package/dist/src/gateway/hono/routes/connectors.js +76 -118
- package/dist/src/gateway/hono/routes/models.js +24 -0
- package/dist/src/gateway/hono/routes/public-gateway.js +3 -2
- package/dist/src/gateway/hono/routes/you.js +86 -5
- package/dist/src/gateway/service.d.ts +5 -2
- package/dist/src/gateway/service.js +16 -11
- package/dist/src/knowledge/connected-understanding-pipeline.d.ts +19 -0
- package/dist/src/knowledge/connected-understanding-pipeline.js +268 -0
- package/dist/src/knowledge/index.d.ts +1 -0
- package/dist/src/knowledge/index.js +2 -1
- package/dist/src/knowledge/ingestion-service.d.ts +6 -4
- package/dist/src/knowledge/ingestion-service.js +13 -10
- package/dist/src/knowledge/local-folder-adapter.js +1 -0
- package/dist/src/knowledge/people-graph.js +43 -110
- package/dist/src/knowledge/types.d.ts +3 -0
- package/dist/src/providers/xopc-cloud-account-service.d.ts +40 -0
- package/dist/src/providers/xopc-cloud-account-service.js +65 -0
- package/dist/src/storage/sqlite/connector-learning-repository.d.ts +47 -0
- package/dist/src/storage/sqlite/connector-learning-repository.js +110 -0
- package/dist/src/storage/sqlite/index.d.ts +3 -1
- package/dist/src/storage/sqlite/index.js +4 -2
- package/dist/src/storage/sqlite/knowledge-repository.d.ts +4 -2
- package/dist/src/storage/sqlite/knowledge-repository.js +24 -13
- package/dist/src/storage/sqlite/migrations/062_connector_learning_jobs.sql +27 -0
- package/dist/src/storage/sqlite/migrations/063_knowledge_collection_scopes.sql +14 -0
- package/dist/src/storage/sqlite/migrations/064_user_claims.sql +60 -0
- package/dist/src/storage/sqlite/migrations/065_knowledge_item_scope_identity.sql +116 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/user-claims-repository.d.ts +101 -0
- package/dist/src/storage/sqlite/user-claims-repository.js +241 -0
- package/dist/src/user-context/projection.d.ts +36 -1
- package/dist/src/user-context/projection.js +84 -6
- package/dist/src/work-discovery/service.js +1 -0
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/agents-ZCIC8mhO.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-DJmgBaAm.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-Ddot8-Md.js +0 -6
- package/dist/gateway/static/root/assets/block-editor-D3GIllO3.js +0 -184
- package/dist/gateway/static/root/assets/browser-settings-page-DvETvRcg.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-ChXIYbys.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-CUekXsJy.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-CkhveNsQ.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-DRTb8DBk.js +0 -1
- package/dist/gateway/static/root/assets/connector-logo-CQznQcd4.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DkSGIxWP.js +0 -2
- package/dist/gateway/static/root/assets/desktop-pet-BtP-xUQ9.js +0 -1
- package/dist/gateway/static/root/assets/dreaming-settings-gd9W6SLj.js +0 -3
- package/dist/gateway/static/root/assets/goal-detail-page-DizZ6Cpl.js +0 -4
- package/dist/gateway/static/root/assets/goals-page-Dqry_hi2.js +0 -2
- package/dist/gateway/static/root/assets/index-DEdyUjxM.css +0 -1
- package/dist/gateway/static/root/assets/logs-page-mT48mcF4.js +0 -7
- package/dist/gateway/static/root/assets/notes-workbench-wgt2Osyk.js +0 -4
- package/dist/gateway/static/root/assets/project-detail-page-CDjHvxJm.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-kJZwQXfC.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-MJdI9ek_.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-BqC7GDC_.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CYwz8MfF.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-h8tGDkA3.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-D2DGvRUn.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-vqhjSMhZ.js +0 -2
- package/dist/gateway/static/root/assets/time-picker-mtD64kFB.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-BgF0WxjM.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-CP0Daig-.js +0 -1
- package/dist/gateway/static/root/assets/work-item-detail-page-NEWZPKB_.js +0 -1
- package/dist/gateway/static/root/assets/work-page-BkWntcQh.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-DRvhNQGe.js +0 -11
- package/dist/src/connectors/memory-sync-coordinator.d.ts +0 -28
- package/dist/src/connectors/memory-sync-coordinator.js +0 -162
- package/dist/src/connectors/memory-sync-profile.d.ts +0 -13
- package/dist/src/connectors/memory-sync-profile.js +0 -73
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260713-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260713-1" />
|
|
13
13
|
<title>XOPC — Turn goals into loops. Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-DUasAutC.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/circle-alert-BEjgurr2.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/middleware-Pd0e8Igk.js">
|
|
27
|
-
<link rel="modulepreload" crossorigin href="/assets/messages-
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/locale-store-
|
|
27
|
+
<link rel="modulepreload" crossorigin href="/assets/messages-BWtP5TFz.js">
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-BP0vD37A.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/cn-JdwAhgNB.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/schemas-DgQq6Z5S.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/product-delivery-BTRT9kCS.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/config-reload-event-Bjh2zoKp.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
34
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-
|
|
36
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-
|
|
37
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
34
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-D3USVm9D.js">
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-store-C3Y-bESI.js">
|
|
36
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-C3KnnjcU.js">
|
|
37
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C_XSKOH6.css">
|
|
38
38
|
</head>
|
|
39
39
|
<body>
|
|
40
40
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -170,8 +170,8 @@ var BuiltinMemoryProvider = class {
|
|
|
170
170
|
projectId: request.scope?.projectId,
|
|
171
171
|
content: request.content,
|
|
172
172
|
source: {
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
provider: this.id,
|
|
174
|
+
...request.source ?? {}
|
|
175
175
|
},
|
|
176
176
|
confidence: request.confidence,
|
|
177
177
|
tags: request.tags,
|
|
@@ -208,9 +208,9 @@ var BuiltinMemoryProvider = class {
|
|
|
208
208
|
sessionKey: request.scope?.sessionKey,
|
|
209
209
|
content: request.content,
|
|
210
210
|
source: {
|
|
211
|
-
...request.source ?? {},
|
|
212
211
|
provider: this.id,
|
|
213
|
-
path: sourcePathForTarget(target)
|
|
212
|
+
path: sourcePathForTarget(target),
|
|
213
|
+
...request.source ?? {}
|
|
214
214
|
},
|
|
215
215
|
tags: request.tags,
|
|
216
216
|
canonicalKey: request.canonicalKey,
|
|
@@ -53,9 +53,12 @@ export declare class MemoryManager {
|
|
|
53
53
|
applyUnderstandingCandidates(candidates: UnderstandingCandidate[], context?: {
|
|
54
54
|
agentId?: string;
|
|
55
55
|
sessionKey?: string;
|
|
56
|
+
sourceItemId?: string;
|
|
57
|
+
sourceItemIds?: string[];
|
|
56
58
|
sourceText?: string;
|
|
59
|
+
source?: MemoryRecord['source'];
|
|
57
60
|
reviewSource?: 'turn' | 'background';
|
|
58
|
-
}): Promise<
|
|
61
|
+
}): Promise<import('./understanding/types.js').UnderstandingReviewResult>;
|
|
59
62
|
getAdditionalTools(): AgentTool[];
|
|
60
63
|
handleToolCall(toolName: string, args: Record<string, unknown>): Promise<string>;
|
|
61
64
|
search(request: MemorySearchRequest): Promise<MemorySearchResult[]>;
|
|
@@ -130,13 +130,18 @@ var MemoryManager = class {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
async applyUnderstandingCandidates(candidates, context = {}) {
|
|
133
|
-
const sourceItemId = context.sessionKey ? this.lastTurnSourceItem.get(context.sessionKey) : void 0;
|
|
134
|
-
await this.understanding.applyCandidates(candidates, {
|
|
133
|
+
const sourceItemId = context.sourceItemId ?? (context.sessionKey ? this.lastTurnSourceItem.get(context.sessionKey) : void 0);
|
|
134
|
+
const result = await this.understanding.applyCandidates(candidates, {
|
|
135
135
|
...context,
|
|
136
136
|
agentId: context.agentId ?? this.understandingAgentId,
|
|
137
137
|
sourceItemId
|
|
138
138
|
});
|
|
139
|
-
|
|
139
|
+
const sourceItemIds = [...new Set([...sourceItemId ? [sourceItemId] : [], ...context.sourceItemIds ?? []])];
|
|
140
|
+
if (sourceItemIds.length) setKnowledgeSourceItemSynthesisStatus(sourceItemIds, "completed");
|
|
141
|
+
return {
|
|
142
|
+
...result,
|
|
143
|
+
...sourceItemId ? { sourceItemId } : {}
|
|
144
|
+
};
|
|
140
145
|
}
|
|
141
146
|
getAdditionalTools() {
|
|
142
147
|
const out = [];
|
|
@@ -19,7 +19,9 @@ export declare class UserUnderstandingService {
|
|
|
19
19
|
agentId?: string;
|
|
20
20
|
sessionKey?: string;
|
|
21
21
|
sourceItemId?: string;
|
|
22
|
+
sourceItemIds?: string[];
|
|
22
23
|
sourceText?: string;
|
|
24
|
+
source?: MemoryRecord['source'];
|
|
23
25
|
reviewSource?: 'turn' | 'background';
|
|
24
26
|
supersedesRecordIds?: string[];
|
|
25
27
|
}): Promise<Omit<UnderstandingReviewResult, 'sourceItemId'>>;
|
|
@@ -92,6 +92,7 @@ var UserUnderstandingService = class {
|
|
|
92
92
|
const contentHash = createHash("sha256").update(sourceText).digest("hex");
|
|
93
93
|
const sourceItemId = upsertKnowledgeSourceItems([{
|
|
94
94
|
sourceInstanceId: params.sessionKey ? `session:${params.sessionKey}` : "session:unknown",
|
|
95
|
+
collectionScope: "conversation",
|
|
95
96
|
externalId: contentHash,
|
|
96
97
|
itemType: "conversation_turn",
|
|
97
98
|
authorRole: "user",
|
|
@@ -136,20 +137,21 @@ var UserUnderstandingService = class {
|
|
|
136
137
|
const key = candidate.canonicalKey ?? canonicalKey(candidate.kind, content);
|
|
137
138
|
const supersedesRecordId = correctionTargets.length === 1 ? correctionTargets[0] : void 0;
|
|
138
139
|
const existing = await this.options.list(key);
|
|
139
|
-
const
|
|
140
|
-
|
|
140
|
+
const sourceItemIds = [...new Set([...context.sourceItemId ? [context.sourceItemId] : [], ...context.sourceItemIds ?? []])];
|
|
141
|
+
const evidence = (sourceItemIds.length ? sourceItemIds : [void 0]).map((sourceItemId) => ({
|
|
142
|
+
...sourceItemId ? { sourceItemId } : {},
|
|
141
143
|
relation: "supports",
|
|
142
144
|
...context.sessionKey ? { sessionKey: context.sessionKey } : {},
|
|
143
145
|
...evidenceText ? { sourceText: evidenceText } : {},
|
|
144
146
|
observedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
145
147
|
confidence: candidate.confidence
|
|
146
|
-
};
|
|
148
|
+
}));
|
|
147
149
|
if (existing[0]) {
|
|
148
150
|
deduplicated += 1;
|
|
149
151
|
recordIds.push(existing[0].id);
|
|
150
|
-
|
|
152
|
+
for (const sourceItemId of sourceItemIds) attachMemoryEvidence({
|
|
151
153
|
recordId: existing[0].id,
|
|
152
|
-
sourceItemId
|
|
154
|
+
sourceItemId,
|
|
153
155
|
relation: "supports",
|
|
154
156
|
excerpt: evidenceText,
|
|
155
157
|
confidence: candidate.confidence
|
|
@@ -166,7 +168,7 @@ var UserUnderstandingService = class {
|
|
|
166
168
|
} : void 0,
|
|
167
169
|
target: candidate.kind === "preference" ? "user" : "memory",
|
|
168
170
|
tags: [...new Set(["user-understanding", ...candidate.tags ?? []])],
|
|
169
|
-
source: { provider: "user-understanding" },
|
|
171
|
+
source: context.source ?? { provider: "user-understanding" },
|
|
170
172
|
confidence: candidate.confidence,
|
|
171
173
|
status: "candidate",
|
|
172
174
|
sensitivity,
|
|
@@ -174,7 +176,7 @@ var UserUnderstandingService = class {
|
|
|
174
176
|
durability: candidate.durability,
|
|
175
177
|
importance: candidate.importance,
|
|
176
178
|
disclosurePolicy: candidate.disclosurePolicy,
|
|
177
|
-
evidence
|
|
179
|
+
evidence,
|
|
178
180
|
validFrom: candidate.validFrom,
|
|
179
181
|
validTo: candidate.validTo,
|
|
180
182
|
reviewAfter: nextMemoryReviewAt({
|
|
@@ -194,9 +196,9 @@ var UserUnderstandingService = class {
|
|
|
194
196
|
kind: write.record.kind
|
|
195
197
|
});
|
|
196
198
|
}
|
|
197
|
-
|
|
199
|
+
for (const sourceItemId of write.record ? sourceItemIds : []) attachMemoryEvidence({
|
|
198
200
|
recordId: write.record.id,
|
|
199
|
-
sourceItemId
|
|
201
|
+
sourceItemId,
|
|
200
202
|
relation: "supports",
|
|
201
203
|
excerpt: evidenceText,
|
|
202
204
|
confidence: candidate.confidence
|
|
@@ -117,6 +117,7 @@ export declare class AgentService {
|
|
|
117
117
|
refreshSkillsAfterSkillConfigChange(): void;
|
|
118
118
|
refreshActionTrustPolicy(): void;
|
|
119
119
|
refreshUserProfileContext(): void;
|
|
120
|
+
getMemoryManager(): import("./memory/manager.js").MemoryManager;
|
|
120
121
|
getModelForSession(sessionKey: string): string;
|
|
121
122
|
switchModelForSession(sessionKey: string, modelId: string): Promise<boolean>;
|
|
122
123
|
/**
|
|
@@ -556,6 +556,9 @@ var AgentService = class {
|
|
|
556
556
|
refreshUserProfileContext() {
|
|
557
557
|
this.agentManager.refreshUserProfileContext();
|
|
558
558
|
}
|
|
559
|
+
getMemoryManager() {
|
|
560
|
+
return this.agentManager.getMemoryManager();
|
|
561
|
+
}
|
|
559
562
|
getModelForSession(sessionKey) {
|
|
560
563
|
return this.modelManager.getModelForSession(sessionKey);
|
|
561
564
|
}
|
|
@@ -90,12 +90,12 @@ export declare const AutomationStateSchema: z.ZodObject<{
|
|
|
90
90
|
runningRunId: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
91
91
|
lastRunAtMs: z.ZodOptional<z.ZodNumber>;
|
|
92
92
|
lastRunStatus: z.ZodOptional<z.ZodEnum<{
|
|
93
|
+
queued: "queued";
|
|
94
|
+
running: "running";
|
|
93
95
|
failed: "failed";
|
|
94
96
|
cancelled: "cancelled";
|
|
95
97
|
timeout: "timeout";
|
|
96
98
|
succeeded: "succeeded";
|
|
97
|
-
running: "running";
|
|
98
|
-
queued: "queued";
|
|
99
99
|
}>>;
|
|
100
100
|
lastError: z.ZodOptional<z.ZodString>;
|
|
101
101
|
consecutiveFailures: z.ZodOptional<z.ZodNumber>;
|
|
@@ -185,12 +185,12 @@ export declare const AutomationSchema: z.ZodObject<{
|
|
|
185
185
|
runningRunId: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
186
186
|
lastRunAtMs: z.ZodOptional<z.ZodNumber>;
|
|
187
187
|
lastRunStatus: z.ZodOptional<z.ZodEnum<{
|
|
188
|
+
queued: "queued";
|
|
189
|
+
running: "running";
|
|
188
190
|
failed: "failed";
|
|
189
191
|
cancelled: "cancelled";
|
|
190
192
|
timeout: "timeout";
|
|
191
193
|
succeeded: "succeeded";
|
|
192
|
-
running: "running";
|
|
193
|
-
queued: "queued";
|
|
194
194
|
}>>;
|
|
195
195
|
lastError: z.ZodOptional<z.ZodString>;
|
|
196
196
|
consecutiveFailures: z.ZodOptional<z.ZodNumber>;
|
|
@@ -283,12 +283,12 @@ export declare const CreateAutomationSchema: z.ZodObject<{
|
|
|
283
283
|
runningRunId: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
284
284
|
lastRunAtMs: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
285
285
|
lastRunStatus: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
286
|
+
queued: "queued";
|
|
287
|
+
running: "running";
|
|
286
288
|
failed: "failed";
|
|
287
289
|
cancelled: "cancelled";
|
|
288
290
|
timeout: "timeout";
|
|
289
291
|
succeeded: "succeeded";
|
|
290
|
-
running: "running";
|
|
291
|
-
queued: "queued";
|
|
292
292
|
}>>>;
|
|
293
293
|
lastError: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
294
294
|
consecutiveFailures: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -331,12 +331,12 @@ export declare const UpdateAutomationSchema: z.ZodObject<{
|
|
|
331
331
|
runningRunId: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
332
332
|
lastRunAtMs: z.ZodOptional<z.ZodNumber>;
|
|
333
333
|
lastRunStatus: z.ZodOptional<z.ZodEnum<{
|
|
334
|
+
queued: "queued";
|
|
335
|
+
running: "running";
|
|
334
336
|
failed: "failed";
|
|
335
337
|
cancelled: "cancelled";
|
|
336
338
|
timeout: "timeout";
|
|
337
339
|
succeeded: "succeeded";
|
|
338
|
-
running: "running";
|
|
339
|
-
queued: "queued";
|
|
340
340
|
}>>;
|
|
341
341
|
lastError: z.ZodOptional<z.ZodString>;
|
|
342
342
|
consecutiveFailures: z.ZodOptional<z.ZodNumber>;
|
|
@@ -89,7 +89,7 @@ export declare function buildAutomationDraftResponse(draft: GeneratedAutomationD
|
|
|
89
89
|
nextRunAtMs?: number;
|
|
90
90
|
runningRunId?: string;
|
|
91
91
|
lastRunAtMs?: number;
|
|
92
|
-
lastRunStatus?: "
|
|
92
|
+
lastRunStatus?: "queued" | "running" | "failed" | "cancelled" | "timeout" | "succeeded";
|
|
93
93
|
lastError?: string;
|
|
94
94
|
consecutiveFailures?: number;
|
|
95
95
|
};
|
|
@@ -52,7 +52,7 @@ async function checkDatabaseSchema(ctx) {
|
|
|
52
52
|
id: "database-schema",
|
|
53
53
|
label: "Database schema",
|
|
54
54
|
status: "pass",
|
|
55
|
-
message: `SQLite schema v${status.dbVersion} (current release
|
|
55
|
+
message: `SQLite schema v${status.dbVersion} (current release v65).`,
|
|
56
56
|
hints: []
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -73,6 +73,7 @@ export type ComposioSessionsClient = {
|
|
|
73
73
|
export type ComposioSessionContext = {
|
|
74
74
|
principalId: string;
|
|
75
75
|
installationScope?: string;
|
|
76
|
+
providerPrincipalId?: string;
|
|
76
77
|
toolkits?: string[];
|
|
77
78
|
connectedAccounts?: Record<string, string[]>;
|
|
78
79
|
callbackUrl?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { init_paths_state, resolveStateDir } from "../config/paths-state.js";
|
|
1
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../utils/logger.js";
|
|
3
4
|
import { appendConnectorExecutionAudit, getConnectorInstallation, listConnectorConnections, upsertConnectorConnection } from "../storage/sqlite/connector-repository.js";
|
|
@@ -7,6 +8,7 @@ import { resolve } from "node:path";
|
|
|
7
8
|
import { createHash } from "node:crypto";
|
|
8
9
|
//#region src/connectors/composio-sessions.ts
|
|
9
10
|
init_credentials();
|
|
11
|
+
init_paths_state();
|
|
10
12
|
init_logger();
|
|
11
13
|
const log = createLogger("Connectors:ComposioSessions");
|
|
12
14
|
const COMPOSIO_API_KEY_PROVIDER = "connector-composio-api-key";
|
|
@@ -22,8 +24,7 @@ function stableHash(value) {
|
|
|
22
24
|
return createHash("sha256").update(value).digest("hex").slice(0, 24);
|
|
23
25
|
}
|
|
24
26
|
function defaultInstallationScope() {
|
|
25
|
-
|
|
26
|
-
return configured ? resolve(configured) : resolve(process.cwd());
|
|
27
|
+
return resolve(resolveStateDir());
|
|
27
28
|
}
|
|
28
29
|
/** Convert local identities to stable opaque Composio user IDs without disclosing user data. */
|
|
29
30
|
function createComposioPrincipalId(principalId, installationScope = defaultInstallationScope()) {
|
|
@@ -105,7 +106,7 @@ var ComposioSessionsAdapter = class {
|
|
|
105
106
|
...context.toolkits?.length ? { toolkits: { enable: context.toolkits } } : {},
|
|
106
107
|
...context.connectedAccounts && Object.keys(context.connectedAccounts).length > 0 ? { connectedAccounts: context.connectedAccounts } : {}
|
|
107
108
|
};
|
|
108
|
-
return client.sessions.create(createComposioPrincipalId(context.principalId, context.installationScope), config);
|
|
109
|
+
return client.sessions.create(context.providerPrincipalId ?? createComposioPrincipalId(context.principalId, context.installationScope), config);
|
|
109
110
|
}
|
|
110
111
|
async listToolkitCatalog(context) {
|
|
111
112
|
const session = await this.createSession(context);
|
|
@@ -130,8 +131,10 @@ var ComposioSessionsAdapter = class {
|
|
|
130
131
|
return items;
|
|
131
132
|
}
|
|
132
133
|
async authorize(context) {
|
|
134
|
+
const providerPrincipalId = createComposioPrincipalId(context.principalId, context.installationScope);
|
|
133
135
|
const request = await (await this.createSession({
|
|
134
136
|
...context,
|
|
137
|
+
providerPrincipalId,
|
|
135
138
|
toolkits: [context.toolkit]
|
|
136
139
|
})).authorize(context.toolkit, {
|
|
137
140
|
callbackUrl: context.callbackUrl,
|
|
@@ -152,7 +155,10 @@ var ComposioSessionsAdapter = class {
|
|
|
152
155
|
principalId: context.principalId,
|
|
153
156
|
connectorId
|
|
154
157
|
}).length === 0,
|
|
155
|
-
metadata: {
|
|
158
|
+
metadata: {
|
|
159
|
+
toolkit: context.toolkit,
|
|
160
|
+
providerPrincipalId
|
|
161
|
+
}
|
|
156
162
|
});
|
|
157
163
|
return {
|
|
158
164
|
toolkit: context.toolkit,
|
|
@@ -249,9 +255,12 @@ var ComposioSessionsAdapter = class {
|
|
|
249
255
|
try {
|
|
250
256
|
const toolkit = input.action.toolkit;
|
|
251
257
|
const connectedAccounts = toolkit && input.connection ? { [toolkit]: [input.connection.providerConnectionId] } : input.context.connectedAccounts;
|
|
258
|
+
const providerPrincipalId = input.connection?.metadata.providerPrincipalId;
|
|
259
|
+
if (input.connection && (typeof providerPrincipalId !== "string" || !providerPrincipalId.trim())) throw new Error("Connected account is missing its provider identity. Reconnect the account and try again.");
|
|
252
260
|
const result = await (await this.createSession({
|
|
253
261
|
...input.context,
|
|
254
|
-
connectedAccounts
|
|
262
|
+
connectedAccounts,
|
|
263
|
+
...typeof providerPrincipalId === "string" ? { providerPrincipalId } : {}
|
|
255
264
|
})).execute(input.action.actionId, input.args ?? {}, input.connection ? { account: input.connection.providerConnectionId } : void 0);
|
|
256
265
|
appendConnectorExecutionAudit({
|
|
257
266
|
installationId: input.installation.id,
|
|
@@ -22,6 +22,6 @@ export declare function normalizeComposioTriggerPayload(payload: unknown, webhoo
|
|
|
22
22
|
trigger?: string;
|
|
23
23
|
data: Record<string, unknown>;
|
|
24
24
|
};
|
|
25
|
-
export declare function applyComposioConnectionLifecycleEvent(payload: unknown):
|
|
25
|
+
export declare function applyComposioConnectionLifecycleEvent(payload: unknown): string | undefined;
|
|
26
26
|
export declare function appendComposioTriggerEvent(config: Config, payload: unknown): Promise<ComposioTriggerArchiveEntry>;
|
|
27
27
|
export declare function listComposioTriggerEvents(config: Config, limit?: number): Promise<ComposioTriggerArchiveEntry[]>;
|
|
@@ -37,17 +37,18 @@ function normalizeComposioTriggerPayload(payload, webhookId) {
|
|
|
37
37
|
}
|
|
38
38
|
function applyComposioConnectionLifecycleEvent(payload) {
|
|
39
39
|
const normalized = normalizeComposioTriggerPayload(payload);
|
|
40
|
-
if (normalized.type !== "composio.connected_account.expired" && normalized.type !== "composio.connected_account.deleted") return;
|
|
40
|
+
if (normalized.type !== "composio.connected_account.expired" && normalized.type !== "composio.connected_account.deleted") return void 0;
|
|
41
41
|
const providerConnectionId = readString(normalized.data.id ?? normalized.data.nanoid ?? normalized.data.connected_account_id);
|
|
42
|
-
if (!providerConnectionId) return;
|
|
42
|
+
if (!providerConnectionId) return void 0;
|
|
43
43
|
const connection = listConnectorConnections().find((candidate) => candidate.provider === "composio" && candidate.providerConnectionId === providerConnectionId);
|
|
44
|
-
if (!connection) return;
|
|
44
|
+
if (!connection) return void 0;
|
|
45
45
|
upsertConnectorConnection({
|
|
46
46
|
...connection,
|
|
47
47
|
status: normalized.type.endsWith(".deleted") ? "revoked" : "expired",
|
|
48
48
|
isDefault: false,
|
|
49
49
|
lastError: normalized.type.endsWith(".deleted") ? "Connection was removed in Composio." : "Connection expired and requires authorization."
|
|
50
50
|
});
|
|
51
|
+
return connection.id;
|
|
51
52
|
}
|
|
52
53
|
async function appendComposioTriggerEvent(config, payload) {
|
|
53
54
|
const record = payload && typeof payload === "object" && !Array.isArray(payload) ? payload : {};
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
import type { Config } from '../config/schema.js';
|
|
2
|
+
import { type KnowledgePullInput } from '../knowledge/index.js';
|
|
2
3
|
import { ComposioSessionsAdapter } from './composio-sessions.js';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare function
|
|
4
|
+
export declare const COMPOSIO_CONNECTED_SOURCE_TOOLKITS: Set<string>;
|
|
5
|
+
export declare function ingestComposioConnectedSource(input: {
|
|
5
6
|
config: Config;
|
|
6
7
|
connectorId: string;
|
|
8
|
+
collectionScope: string;
|
|
9
|
+
streamKind: 'activity' | 'inventory';
|
|
7
10
|
actionId: string;
|
|
8
11
|
arguments?: Record<string, unknown>;
|
|
12
|
+
buildArguments?: (pull: KnowledgePullInput) => Record<string, unknown>;
|
|
9
13
|
agentId: string;
|
|
10
14
|
connectionId?: string;
|
|
11
15
|
adapter?: ComposioSessionsAdapter;
|
|
12
16
|
}): Promise<{
|
|
13
|
-
recordId: string;
|
|
14
17
|
connectorId: string;
|
|
15
18
|
actionId: string;
|
|
19
|
+
sourceInstanceId: string;
|
|
20
|
+
itemsSeen: number;
|
|
21
|
+
itemsIndexed: number;
|
|
22
|
+
recordIds: string[];
|
|
16
23
|
}>;
|
|
17
|
-
export declare function
|
|
24
|
+
export declare function ingestLocalFolderSource(input: {
|
|
18
25
|
config: Config;
|
|
19
26
|
connectorId: string;
|
|
20
27
|
agentId: string;
|