@xopcai/xopc 0.0.213 → 0.0.214
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -60
- package/README.zh-CN.md +39 -61
- 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-Xw-pOm9A.js → activity-store-k-mNF_Dq.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Ca1bciiK.js → agent-avatar-dicebear-B5VyiQ_K.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-DD3TqNrC.js → agents-DM2l0hCI.js} +1 -1
- package/dist/gateway/static/root/assets/{api-CZK-lRew.js → api-BjN2udFQ.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BLFIG09j.js → app-management-settings-panel-Bbul18ij.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BsTWUq1i.js → appearance-settings-Bvvzgp00.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-cJkDKn72.js → apps-page-BWd2KUkp.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-B9LsFfEx.js → archive-plugin-DjGVsAgd.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CsWiFfmN.js → attachment-load-BCuUeuuO.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CbjU2e75.js → automations-page-Doof8nA6.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-C4xyo0c4.js → automations-workspace-B2eTpWQN.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-DbqhT_JB.js → binary-plugins-B7WFf-lc.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BGpHwxZ5.js → block-editor-CVwIwyUT.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-CrhpQl-e.js → browser-settings-page-D6ua52QD.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-BXlon_hL.js → browser-workflow-inputs-Coz8pWzP.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-B3BBDM_r.js → browser-workflows-page-8a3hnSXE.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-B9MoPW9u.js → capabilities-settings-panel-DfTpgo4L.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-presets-api-BqvMm6UW.js → capability-presets-api-BF3G84qe.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-presets-settings-panel-BmwldV9R.js → capability-presets-settings-panel-DkjsA_Yn.js} +1 -1
- package/dist/gateway/static/root/assets/{channel-recipient-api-9uca5kDa.js → channel-recipient-api-8Uz95P40.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-CwLqWcy_.js → channels-settings-Cv3pT5iN.js} +1 -1
- package/dist/gateway/static/root/assets/channels-status-swr-NfU9X-P5.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DJjYT3WX.js → chat-terminal-dock-BYds3un1.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-XCLfuDrN.js → connectors-api-Cj4deNtI.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-CVkGtcMS.js → connectors-page-CL6PMerr.js} +1 -1
- package/dist/gateway/static/root/assets/{cron-expression-DzQN7zBR.js → cron-expression-DjBh0ZL4.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-B-r5O5qd.js → date-picker-3cIzKCZU.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-Ch2XBU2s.js → dependency-picker-VZFStrz_.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-BdjX8jde.js → desktop-pet-CRNQ4CKZ.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CzjjgMMn.js → desktop-pet-settings-CJBeLcbV.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BCTgGTk4.js → directory-picker-path-field-Dbq9_c33.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-6OGgOucD.js → extension-debug-page-CSFZfcz5.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Cf6MUfCF.js → extension-page-W8vZ3Nl0.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-pSY_ZvQZ.js → extension-settings-page-D5zYR65b.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-CFJMng9v.js → gateway-config-api-BnA56bxn.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-DpiY6aub.js → gateway-config-swr-l2w9ecXl.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-aQYxNePf.js → gateway-settings-CCOOGd8A.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-BZ_6ChP4.js → gateway-startup-retry-XUzMGmLZ.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-CI33q9i1.js → heartbeat-settings-AutxO-ec.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-CAIaWs6r.js → home-page-BMpQAeHr.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-DPndEWOU.js → image-generation-api-CDoOrDMq.js} +1 -1
- package/dist/gateway/static/root/assets/{index-BhstAl5i.js → index-BIBAmAjw.js} +17 -17
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CbLJRGXR.js → keyboard-shortcuts-settings-Bcc08kso.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-BqFnCaKT.js → local-app-workbench-page-ctXGGgj1.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-Crf6c3SK.js → local-apps-page-CuwtmiCt.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BYSRjM6g.js → locale-store-BIOMAhmR.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-BpfLQWex.js → logs-page-Vq-wDYVv.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-mxyYWKgM.js → management-settings-gQwyJgL4.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-kZaPrUTM.js → markdown-split-DLSvtLDY.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DlsczsQ1.js → markdown-view-BMDQYc6E.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Dk67jaG6.js → media-plugins-DFdpMglM.js} +1 -1
- package/dist/gateway/static/root/assets/messages-CbbZKEfO.js +3 -0
- package/dist/gateway/static/root/assets/{notes-api-DaeeQw8A.js → notes-api-lKPk0Voa.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-CQDzw8fX.js → notes-page-BBhONbU4.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-workbench-BYiROmRJ.js → notes-workbench-CCFrzDRT.js} +2 -2
- package/dist/gateway/static/root/assets/{page-tabs-C4UkhX2U.js → page-tabs-DoQq4tt6.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-nzcjh6y0.js → preview-open-alternatives-BtJkAYOs.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-3FvW5cHm.js → product-open-page-ClyG8t4A.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-p45i1sMj.js → project-detail-page-CVeA23NS.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-Y9yXB4DX.js → projects-page-DFj-bwa5.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-Bu6OGEY2.js → registry-api-BFwvRxBn.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-CNsGY0VS.js → remote-access-hub-BgIrBYNz.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CVqPSfUb.js → runtime-tools-settings-panel-DdTZPRU5.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-Dz6eZpqv.js → schema-form-C3Q03Hyv.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-BAtpgb1t.js → sessions-page-wfBSuhmo.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-4zV9nthi.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BaWFAZv4.js → settings-form-section-DdrNtxul.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-BWmdZfNg.js → settings-loading-skeleton-BFvEfK7v.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-Btcb-Dc8.js → settings-page-B8iNNrLN.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-BNllZUFP.js → setup-status-panel-DEBPLh04.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-CGzY3S0N.js → share-preview-page-CrsscJs3.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-CncwbTHY.js → shares-settings-Cpd3s8-P.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BrDL4HAN.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-Bi2IWpU0.js → skills-page-B1sTkjZH.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-BancvwN2.js → skills-page.utils-CIcb0h3E.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CihjIzWx.js → system-settings-panel-MAl91hH_.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-SSNFtY-d.js → task-detail-page-C5wgYuvF.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-D1_t_31B.js → theme-store-BrbF9cgL.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-C2LhiQq5.js → typed-models-lib-Peglr65V.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-tf_8rxAK.js → use-autosave-C10PZ1OV.js} +1 -1
- package/dist/gateway/static/root/assets/{user-context-page-BnPTFEar.js → user-context-page-DsAfqOJy.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-DN-y7Zfe.js → voice-api-key-field-bdYmX3ph.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-bqqH4aZ9.js → work-discovery-overlay-BI4wbLTm.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-2H33iXOB.js → workflow-run-setup-panel-CfmwGYkr.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-BnfxRf1q.js → workflows-page-D7tjtD97.js} +1 -1
- package/dist/gateway/static/root/index.html +10 -10
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +4 -4
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/ipc/inbox.js +1 -1
- package/dist/src/agent/memory/create-memory-manager.js +1 -1
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +3 -3
- package/dist/src/agent-runtime/index.js +1 -1
- package/dist/src/agent-runtime/runtime-profile.js +1 -1
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/cli/commands/agent.js +2 -2
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/models.js +2 -2
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/profile.js +1 -1
- package/dist/src/cli/commands/tunnel.js +1 -1
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/config/index.js +5 -5
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/connectors/composio-managed-client.d.ts +1 -1
- package/dist/src/connectors/composio-session-types.d.ts +91 -0
- package/dist/src/connectors/composio-session-types.js +1 -0
- package/dist/src/connectors/composio-sessions.d.ts +2 -91
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +2 -2
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service.js +9 -9
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/runtime-tools/manager.js +41 -22
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/work-discovery/analyzer.js +16 -4
- package/dist/src/work-discovery/types.d.ts +1 -0
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +17 -17
- package/dist/gateway/static/root/assets/channels-status-swr-DeBw3du9.js +0 -1
- package/dist/gateway/static/root/assets/messages-DyM8OOVG.js +0 -3
- package/dist/gateway/static/root/assets/settings-advanced-gate-pgBQ21Oe.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-CcW2dhSW.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
3
4
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
4
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
5
|
import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
|
|
6
|
+
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
7
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
8
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
7
9
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
8
10
|
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
9
|
-
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
10
11
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
11
|
-
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
12
12
|
//#region src/agent/tasks/task-judge-service.ts
|
|
13
13
|
init_schema();
|
|
14
14
|
init_providers();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { buildMemoryRuntime } from "./memory-runtime.js";
|
|
2
1
|
import { checkBoundary } from "./boundary-guard.js";
|
|
3
2
|
import { resolveModelRole } from "./model-router.js";
|
|
4
3
|
import { buildRuntimeToolRegistry } from "./tool-registry.js";
|
|
4
|
+
import { buildMemoryRuntime } from "./memory-runtime.js";
|
|
5
5
|
import { resolveWorkflow, validateWorkflowForRuntime } from "./workflow-runtime.js";
|
|
6
6
|
import { buildAgentRuntimeProfile } from "./runtime-profile.js";
|
|
7
7
|
import { appendAgentRunEvent, createAgentRunTrace, finishAgentRunTrace, hashEffectiveManifest } from "./run-trace.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { buildAgentManifestPromptSection } from "../agent-manifest/prompt.js";
|
|
2
2
|
import "../agent-manifest/index.js";
|
|
3
|
-
import { buildMemoryRuntime } from "./memory-runtime.js";
|
|
4
3
|
import { checkBoundary } from "./boundary-guard.js";
|
|
5
4
|
import { resolveModelRole } from "./model-router.js";
|
|
6
5
|
import { buildRuntimeToolRegistry } from "./tool-registry.js";
|
|
6
|
+
import { buildMemoryRuntime } from "./memory-runtime.js";
|
|
7
7
|
import { resolveWorkflow, validateWorkflowForRuntime } from "./workflow-runtime.js";
|
|
8
8
|
//#region src/agent-runtime/runtime-profile.ts
|
|
9
9
|
function buildAgentRuntimeProfile(params) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
3
4
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
4
5
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
5
6
|
import { isLocalModelBaseUrl, resolveModelCallApiKey, resolveModelCallOptions } from "../providers/model-call.js";
|
|
6
|
-
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
7
7
|
//#region src/ai-assist/text-assist.ts
|
|
8
8
|
init_providers();
|
|
9
9
|
init_logger();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
-
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
5
4
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
|
-
import {
|
|
5
|
+
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
7
6
|
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
7
|
+
import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
|
|
8
8
|
import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
|
|
9
9
|
import { dirname, join } from "path";
|
|
10
10
|
import { mkdir, readFile, readdir, rm } from "fs/promises";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/auth/profiles/store.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
3
2
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
4
|
-
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
3
|
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
4
|
+
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
//#region src/auth/sync-provider-auth.ts
|
|
8
8
|
/**
|
|
@@ -2,8 +2,8 @@ import { PACKAGE_VERSION, init_package_version } from "../../package-version.js"
|
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
4
|
import { assertCacheDir, init_cache_dir_policy } from "../cache-dir-policy.js";
|
|
5
|
-
import { init_paths, resolveBinDir } from "../../config/paths.js";
|
|
6
5
|
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
6
|
+
import { init_paths, resolveBinDir } from "../../config/paths.js";
|
|
7
7
|
import { resolvePackageRoot } from "../../infra/update-check.js";
|
|
8
8
|
import { dirname, join } from "node:path";
|
|
9
9
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -8,10 +8,10 @@ import { MessageBus, MessageBusShutdownError } from "../../infra/bus/queue.js";
|
|
|
8
8
|
import "../../infra/bus/index.js";
|
|
9
9
|
import { AgentService } from "../../agent/service.js";
|
|
10
10
|
import "../../agent/index.js";
|
|
11
|
-
import { formatExamples, register } from "../registry.js";
|
|
12
|
-
import { getContextWithOpts } from "../context.js";
|
|
13
11
|
import { getWorkspacePath } from "../../config/workspace-path-helpers.js";
|
|
14
12
|
import "../../config/index.js";
|
|
13
|
+
import { formatExamples, register } from "../registry.js";
|
|
14
|
+
import { getContextWithOpts } from "../context.js";
|
|
15
15
|
import { getXopcCloudCatalogCoordinator } from "../../providers/xopc-cloud-catalog-coordinator.js";
|
|
16
16
|
import { listSessions } from "./agent/sessions.js";
|
|
17
17
|
import { renderStreamToTerminal } from "./agent/stream-renderer.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAgentDefaultModelRef, init_schema, parseModelRef } from "../../../../config/schema.js";
|
|
2
|
-
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
3
2
|
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
|
|
3
|
+
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
//#region src/cli/commands/doctor/checks/provider-auth.ts
|
|
6
6
|
init_loader();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_paths, resolveConfigPath } from "../../../config/paths.js";
|
|
2
2
|
import { loadConfig } from "../../../config/loader.js";
|
|
3
|
-
import "../../../config/index.js";
|
|
4
3
|
import { isRestartEnabled } from "../../../config/commands.flags.js";
|
|
4
|
+
import "../../../config/index.js";
|
|
5
5
|
import { resolveGatewayService } from "../../../daemon/service.js";
|
|
6
6
|
import { authorizeGatewaySigusr1Restart, writeGatewayRestartIntentSync } from "../../../infra/restart.js";
|
|
7
7
|
import { findVerifiedGatewayListenerPidsOnPortSync, formatGatewayPidList, signalVerifiedGatewayPidSync } from "../../../infra/gateway-processes.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
2
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
3
2
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
4
4
|
import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
|
|
5
|
+
import "../../config/index.js";
|
|
5
6
|
import { formatExamples, register } from "../registry.js";
|
|
6
7
|
import { getContextWithOpts } from "../context.js";
|
|
7
|
-
import "../../config/index.js";
|
|
8
8
|
import { prepareUpdateGlobalDefaults } from "../../gateway/global-defaults-admin.js";
|
|
9
9
|
import { disconnectProvider } from "../../providers/provider-disconnect.js";
|
|
10
10
|
import { colors } from "../utils/colors.js";
|
|
@@ -2,8 +2,8 @@ import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
|
|
|
2
2
|
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
3
3
|
import { saveConfig } from "../../config/loader.js";
|
|
4
4
|
import { resolveGatewayLocalClientHost } from "../../config/gateway-bind.js";
|
|
5
|
-
import { formatExamples, register } from "../registry.js";
|
|
6
5
|
import "../../config/index.js";
|
|
6
|
+
import { formatExamples, register } from "../registry.js";
|
|
7
7
|
import { provisionEagerRuntimes } from "../../runtime-tools/bootstrap.js";
|
|
8
8
|
import { colors } from "../utils/colors.js";
|
|
9
9
|
import { initWorkspace } from "../utils/init-workspace.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { formatExamples, register } from "../registry.js";
|
|
4
3
|
import { createProfile, deleteProfile, getCurrentProfile, getSwitchCommand, listProfiles, resolveProfileStateDir } from "../../config/profile.js";
|
|
4
|
+
import { formatExamples, register } from "../registry.js";
|
|
5
5
|
import { colors } from "../utils/colors.js";
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import Table from "cli-table3";
|
|
@@ -3,8 +3,8 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
4
4
|
import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
5
5
|
import { loadTunnelState } from "../../tunnel/tunnel-state.js";
|
|
6
|
-
import { formatExamples, register } from "../registry.js";
|
|
7
6
|
import "../../config/index.js";
|
|
7
|
+
import { formatExamples, register } from "../registry.js";
|
|
8
8
|
import { TUNNEL_RISK_SUMMARY_LINES, TunnelConsentError, assertTunnelMayStart, hasValidTunnelConsent } from "../../tunnel/consent.js";
|
|
9
9
|
import { resolveTunnelBrokerUrl, resolveTunnelRegistrationSecret } from "../../tunnel/env.js";
|
|
10
10
|
import { ensureFrpcBinary } from "../../tunnel/frpc-binary.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
|
|
2
2
|
import { loadConfig } from "../../config/loader.js";
|
|
3
|
-
import { formatExamples, register } from "../registry.js";
|
|
4
3
|
import "../../config/index.js";
|
|
4
|
+
import { formatExamples, register } from "../registry.js";
|
|
5
5
|
import { acquireUpdateLock } from "../../infra/update-lock.js";
|
|
6
6
|
import { normalizeUpdateChannel } from "../../infra/update-channels.js";
|
|
7
7
|
import { compareSemver, resolveNpmChannelTag } from "../../infra/update-check.js";
|
|
@@ -4,9 +4,9 @@ import { ExtensionLoader } from "../extensions/loader.js";
|
|
|
4
4
|
import "../extensions/index.js";
|
|
5
5
|
import { MessageBus } from "../infra/bus/queue.js";
|
|
6
6
|
import "../infra/bus/index.js";
|
|
7
|
-
import { createDefaultContext } from "./registry.js";
|
|
8
7
|
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
9
8
|
import "../config/index.js";
|
|
9
|
+
import { createDefaultContext } from "./registry.js";
|
|
10
10
|
import { registerExtensionCliProgram } from "../extensions/sdk/channel-helpers.js";
|
|
11
11
|
import { join } from "path";
|
|
12
12
|
//#region src/cli/extension-cli-register.ts
|
package/dist/src/config/index.js
CHANGED
|
@@ -2,21 +2,21 @@ import { ENV_VARS, XOPC_DB_FILENAME, resolveHomeDir, resolveStateDir, resolveXop
|
|
|
2
2
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
3
3
|
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
4
4
|
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentTypedModelRoleSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
5
|
-
import {
|
|
5
|
+
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
6
6
|
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
7
7
|
import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
|
|
8
8
|
import { resolveAgentDir as resolveAgentDir$1, resolveAgentHomeDir as resolveAgentHomeDir$1, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
9
|
-
import { extractProfileAgentId, resolveEffectiveAgentManifestForAgent, resolveEffectiveAgentManifestForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
10
9
|
import { FILENAMES, WORKSPACE_FILES, existsSync, hasBundledExtensionManifest, init_paths, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveCredentialsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
11
|
-
import { init_loader, loadConfig, saveConfig } from "./loader.js";
|
|
12
|
-
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
13
10
|
import { CustomModelSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
|
|
11
|
+
import { init_loader, loadConfig, saveConfig } from "./loader.js";
|
|
12
|
+
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
13
|
+
import { extractProfileAgentId, resolveEffectiveAgentManifestForAgent, resolveEffectiveAgentManifestForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
14
14
|
import { canonicalizeConfiguredMcpServer, isKnownCliMcpTypeAlias, normalizeConfiguredMcpServers, resolveXopcMcpTransportAlias } from "./mcp-config-normalize.js";
|
|
15
15
|
import { formatThinkingLevels, listThinkingLevels, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, thinkLevelToNumber } from "../agent/transcript/thinking-types.js";
|
|
16
|
+
import { diffConfigPaths } from "./diff.js";
|
|
16
17
|
import { getWorkspacePath } from "./workspace-path-helpers.js";
|
|
17
18
|
import { listAgentProfileMarkdownDirs, listAgentWorkspaceDirs } from "./workspace-dirs.js";
|
|
18
19
|
import { ProfileManager, createProfile, deleteProfile, getCurrentProfile, getProfileManager, getProfileNameFromDir, getSwitchCommand, listProfiles, resolveProfileStateDir } from "./profile.js";
|
|
19
|
-
import { diffConfigPaths } from "./diff.js";
|
|
20
20
|
import { BASE_RELOAD_RULES, buildReloadPlan, matchReloadRule } from "./rules.js";
|
|
21
21
|
import { ConfigHotReloader } from "./reload.js";
|
|
22
22
|
//#region src/config/index.ts
|
|
@@ -2,8 +2,8 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
4
|
import { ConfigSchema, init_schema } from "./schema.js";
|
|
5
|
-
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
6
5
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
|
+
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
7
7
|
import { assertChannelPluginConfigs, init_validate_channel_configs } from "./validate-channel-configs.js";
|
|
8
8
|
import { dirname } from "path";
|
|
9
9
|
import { existsSync, mkdirSync, promises, readFileSync } from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
3
2
|
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
3
|
+
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
4
4
|
import { existsSync, readFileSync } from "fs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/config/models-json.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ToolRouterCreateSessionConfig } from '@composio/core';
|
|
2
2
|
import { type ProviderAuthService } from '../providers/provider-auth-service.js';
|
|
3
|
-
import type { ComposioSessionLike, ComposioSessionsClient } from './composio-
|
|
3
|
+
import type { ComposioSessionLike, ComposioSessionsClient } from './composio-session-types.js';
|
|
4
4
|
export declare class ManagedComposioClient implements ComposioSessionsClient {
|
|
5
5
|
readonly mode: "managed";
|
|
6
6
|
private readonly fetchImpl;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { ToolRouterCreateSessionConfig } from '@composio/core';
|
|
2
|
+
export type ComposioAuthConfigOption = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
status: 'ENABLED' | 'DISABLED';
|
|
6
|
+
authScheme?: string;
|
|
7
|
+
isComposioManaged: boolean;
|
|
8
|
+
isEnabledForToolRouter: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type ComposioToolkitAuthState = {
|
|
11
|
+
toolkit: string;
|
|
12
|
+
managedAuthAvailable: boolean;
|
|
13
|
+
requiresCustomAuthConfig: boolean;
|
|
14
|
+
authConfigs: ComposioAuthConfigOption[];
|
|
15
|
+
};
|
|
16
|
+
type SessionToolkitResponse = {
|
|
17
|
+
items: Array<{
|
|
18
|
+
slug: string;
|
|
19
|
+
name: string;
|
|
20
|
+
logo?: string;
|
|
21
|
+
isNoAuth: boolean;
|
|
22
|
+
connection?: {
|
|
23
|
+
isActive: boolean;
|
|
24
|
+
connectedAccount?: {
|
|
25
|
+
status: string;
|
|
26
|
+
id: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}>;
|
|
30
|
+
cursor?: string;
|
|
31
|
+
};
|
|
32
|
+
export type ComposioSessionLike = {
|
|
33
|
+
sessionId: string;
|
|
34
|
+
toolkits(options?: {
|
|
35
|
+
toolkits?: string[];
|
|
36
|
+
isConnected?: boolean;
|
|
37
|
+
limit?: number;
|
|
38
|
+
cursor?: string;
|
|
39
|
+
}): Promise<SessionToolkitResponse>;
|
|
40
|
+
authorize(toolkit: string, options?: {
|
|
41
|
+
callbackUrl?: string;
|
|
42
|
+
alias?: string;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
id: string;
|
|
45
|
+
status: string;
|
|
46
|
+
redirectUrl?: string | null;
|
|
47
|
+
}>;
|
|
48
|
+
search(params: {
|
|
49
|
+
query: string;
|
|
50
|
+
toolkits?: string[];
|
|
51
|
+
}): Promise<unknown>;
|
|
52
|
+
execute(toolSlug: string, args?: Record<string, unknown>, options?: {
|
|
53
|
+
account?: string;
|
|
54
|
+
}): Promise<unknown>;
|
|
55
|
+
};
|
|
56
|
+
export type ComposioSessionsClient = {
|
|
57
|
+
mode?: 'managed' | 'byok';
|
|
58
|
+
sessions: {
|
|
59
|
+
create(userId: string, config?: ToolRouterCreateSessionConfig): Promise<ComposioSessionLike>;
|
|
60
|
+
};
|
|
61
|
+
connectedAccounts: {
|
|
62
|
+
list(query?: {
|
|
63
|
+
userIds?: string[];
|
|
64
|
+
toolkitSlugs?: string[];
|
|
65
|
+
}): Promise<unknown>;
|
|
66
|
+
delete(id: string): Promise<unknown>;
|
|
67
|
+
refresh(id: string): Promise<unknown>;
|
|
68
|
+
};
|
|
69
|
+
authConfigs?: {
|
|
70
|
+
list(query?: {
|
|
71
|
+
toolkit?: string;
|
|
72
|
+
showDisabled?: boolean;
|
|
73
|
+
}): Promise<{
|
|
74
|
+
items: Array<{
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
status: 'ENABLED' | 'DISABLED';
|
|
78
|
+
authScheme?: string;
|
|
79
|
+
isComposioManaged?: boolean;
|
|
80
|
+
isEnabledForToolRouter?: boolean;
|
|
81
|
+
}>;
|
|
82
|
+
}>;
|
|
83
|
+
};
|
|
84
|
+
toolkits?: {
|
|
85
|
+
get(slug: string): Promise<{
|
|
86
|
+
composioManagedAuthSchemes?: string[];
|
|
87
|
+
authConfigDetails?: unknown[];
|
|
88
|
+
}>;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ToolRouterCreateSessionConfig } from '@composio/core';
|
|
2
1
|
import { CredentialResolver } from '../auth/credentials.js';
|
|
2
|
+
import type { ComposioSessionLike, ComposioSessionsClient, ComposioToolkitAuthState } from './composio-session-types.js';
|
|
3
3
|
import type { ConnectorActionMetadata, ConnectorConnection, ConnectorInstallationPolicy } from './types.js';
|
|
4
4
|
export declare function resolveComposioApiKey(resolver?: CredentialResolver): Promise<string | null>;
|
|
5
5
|
export declare function assertComposioAccessConfigured(resolver?: CredentialResolver): Promise<'byok' | 'managed'>;
|
|
@@ -17,95 +17,7 @@ export type ComposioAuthorizeResult = {
|
|
|
17
17
|
connectUrl?: string;
|
|
18
18
|
status: string;
|
|
19
19
|
};
|
|
20
|
-
export type ComposioAuthConfigOption
|
|
21
|
-
id: string;
|
|
22
|
-
name: string;
|
|
23
|
-
status: 'ENABLED' | 'DISABLED';
|
|
24
|
-
authScheme?: string;
|
|
25
|
-
isComposioManaged: boolean;
|
|
26
|
-
isEnabledForToolRouter: boolean;
|
|
27
|
-
};
|
|
28
|
-
export type ComposioToolkitAuthState = {
|
|
29
|
-
toolkit: string;
|
|
30
|
-
managedAuthAvailable: boolean;
|
|
31
|
-
requiresCustomAuthConfig: boolean;
|
|
32
|
-
authConfigs: ComposioAuthConfigOption[];
|
|
33
|
-
};
|
|
34
|
-
type SessionToolkitResponse = {
|
|
35
|
-
items: Array<{
|
|
36
|
-
slug: string;
|
|
37
|
-
name: string;
|
|
38
|
-
logo?: string;
|
|
39
|
-
isNoAuth: boolean;
|
|
40
|
-
connection?: {
|
|
41
|
-
isActive: boolean;
|
|
42
|
-
connectedAccount?: {
|
|
43
|
-
status: string;
|
|
44
|
-
id: string;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
}>;
|
|
48
|
-
cursor?: string;
|
|
49
|
-
};
|
|
50
|
-
export type ComposioSessionLike = {
|
|
51
|
-
sessionId: string;
|
|
52
|
-
toolkits(options?: {
|
|
53
|
-
toolkits?: string[];
|
|
54
|
-
isConnected?: boolean;
|
|
55
|
-
limit?: number;
|
|
56
|
-
cursor?: string;
|
|
57
|
-
}): Promise<SessionToolkitResponse>;
|
|
58
|
-
authorize(toolkit: string, options?: {
|
|
59
|
-
callbackUrl?: string;
|
|
60
|
-
alias?: string;
|
|
61
|
-
}): Promise<{
|
|
62
|
-
id: string;
|
|
63
|
-
status: string;
|
|
64
|
-
redirectUrl?: string | null;
|
|
65
|
-
}>;
|
|
66
|
-
search(params: {
|
|
67
|
-
query: string;
|
|
68
|
-
toolkits?: string[];
|
|
69
|
-
}): Promise<unknown>;
|
|
70
|
-
execute(toolSlug: string, args?: Record<string, unknown>, options?: {
|
|
71
|
-
account?: string;
|
|
72
|
-
}): Promise<unknown>;
|
|
73
|
-
};
|
|
74
|
-
export type ComposioSessionsClient = {
|
|
75
|
-
mode?: 'managed' | 'byok';
|
|
76
|
-
sessions: {
|
|
77
|
-
create(userId: string, config?: ToolRouterCreateSessionConfig): Promise<ComposioSessionLike>;
|
|
78
|
-
};
|
|
79
|
-
connectedAccounts: {
|
|
80
|
-
list(query?: {
|
|
81
|
-
userIds?: string[];
|
|
82
|
-
toolkitSlugs?: string[];
|
|
83
|
-
}): Promise<unknown>;
|
|
84
|
-
delete(id: string): Promise<unknown>;
|
|
85
|
-
refresh(id: string): Promise<unknown>;
|
|
86
|
-
};
|
|
87
|
-
authConfigs?: {
|
|
88
|
-
list(query?: {
|
|
89
|
-
toolkit?: string;
|
|
90
|
-
showDisabled?: boolean;
|
|
91
|
-
}): Promise<{
|
|
92
|
-
items: Array<{
|
|
93
|
-
id: string;
|
|
94
|
-
name: string;
|
|
95
|
-
status: 'ENABLED' | 'DISABLED';
|
|
96
|
-
authScheme?: string;
|
|
97
|
-
isComposioManaged?: boolean;
|
|
98
|
-
isEnabledForToolRouter?: boolean;
|
|
99
|
-
}>;
|
|
100
|
-
}>;
|
|
101
|
-
};
|
|
102
|
-
toolkits?: {
|
|
103
|
-
get(slug: string): Promise<{
|
|
104
|
-
composioManagedAuthSchemes?: string[];
|
|
105
|
-
authConfigDetails?: unknown[];
|
|
106
|
-
}>;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
20
|
+
export type { ComposioAuthConfigOption, ComposioSessionLike, ComposioSessionsClient, ComposioToolkitAuthState, } from './composio-session-types.js';
|
|
109
21
|
export type ComposioSessionContext = {
|
|
110
22
|
principalId: string;
|
|
111
23
|
installationScope?: string;
|
|
@@ -154,4 +66,3 @@ export declare class ComposioSessionsAdapter {
|
|
|
154
66
|
reason: string;
|
|
155
67
|
}>;
|
|
156
68
|
}
|
|
157
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
4
3
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
|
+
import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
6
|
import { existsSync } from "fs";
|
|
7
7
|
import { mkdir, readFile } from "fs/promises";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveCapabilityPresetLayer, resolveEffectiveAgentManifest } from "../agent-manifest/resolver.js";
|
|
2
2
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentDir, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, resolveUserPath, validateAgentIdForNewAgent } from "../agent/agent-scope.js";
|
|
3
|
-
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
4
3
|
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
4
|
+
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
5
5
|
import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES, REQUIRED_AGENT_PROFILE_MARKDOWN_FILE_SET } from "../agent/context/workspace.js";
|
|
6
6
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
7
7
|
import { seedAgentProfileMarkdownFiles } from "../agent/context/workspace-seed.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../config/paths-state.js";
|
|
2
2
|
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
3
|
-
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
4
3
|
import { init_paths, resolveConfigPath, resolveSkillsDir } from "../config/paths.js";
|
|
4
|
+
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
5
5
|
import { isBareProfileMarkdownFileName, resolveProfileMarkdownPathIfBareName } from "../agent/tools/tool-paths.js";
|
|
6
6
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
7
7
|
import { basename, isAbsolute, resolve } from "node:path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { shouldSilence, stripHeartbeatToken } from "../../heartbeat/tokens.js";
|
|
4
|
-
import { appendCronEventLines } from "../../heartbeat/event-prompt.js";
|
|
5
4
|
import { isWithinActiveHours } from "../../heartbeat/active-hours.js";
|
|
6
5
|
import { isHeartbeatContentEmpty } from "../../heartbeat/content-check.js";
|
|
6
|
+
import { appendCronEventLines } from "../../heartbeat/event-prompt.js";
|
|
7
7
|
import { createHeartbeatWake } from "../../heartbeat/wake.js";
|
|
8
8
|
import { resolveHeartbeatMdPath } from "../workspace-heartbeat-path.js";
|
|
9
9
|
import { readFile } from "fs/promises";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ContextCompactionPolicySchema, UserContextDreamingSchema, UserContextPrivacySchema, init_config } from "../../../user-context/config.js";
|
|
2
2
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
3
3
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
4
|
-
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus, init_channel_catalog_service } from "../../../channels/catalog/channel-catalog-service.js";
|
|
5
4
|
import { init_models_json, loadModelsJson } from "../../../config/models-json.js";
|
|
6
5
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
6
|
+
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus, init_channel_catalog_service } from "../../../channels/catalog/channel-catalog-service.js";
|
|
7
7
|
import { getProviderRegistry, init_plugin_registry } from "../../../providers/plugin-registry.js";
|
|
8
8
|
import { getAllProviders, init_providers, isProviderConfigured } from "../../../providers/index.js";
|
|
9
9
|
import { normalizeConfiguredMcpServers } from "../../../config/mcp-config-normalize.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
2
1
|
import { init_resolve_config_value, testApiKeyResolution } from "../../../config/resolve-config-value.js";
|
|
2
|
+
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
3
3
|
import { init_models_json, loadModelsJson, saveModelsJson, validateModelsConfig } from "../../../config/models-json.js";
|
|
4
4
|
import { getModelCatalogStore, init_model_catalog_store } from "../../../providers/model-catalog-store.js";
|
|
5
5
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
@@ -47,7 +47,7 @@ export declare function submitSessionInput(c: Context, deps: AuthenticatedRouteD
|
|
|
47
47
|
channel: string;
|
|
48
48
|
} | {
|
|
49
49
|
type: "system";
|
|
50
|
-
source: "
|
|
50
|
+
source: "automation" | "cli" | "workflow" | "heartbeat" | "internal";
|
|
51
51
|
};
|
|
52
52
|
position: number;
|
|
53
53
|
targetRunId?: string;
|
|
@@ -107,7 +107,7 @@ export declare function replaceLatestSessionTurn(c: Context, deps: Authenticated
|
|
|
107
107
|
channel: string;
|
|
108
108
|
} | {
|
|
109
109
|
type: "system";
|
|
110
|
-
source: "
|
|
110
|
+
source: "automation" | "cli" | "workflow" | "heartbeat" | "internal";
|
|
111
111
|
};
|
|
112
112
|
position: number;
|
|
113
113
|
targetRunId?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { loadConfig } from "../config/loader.js";
|
|
2
|
-
import "../config/index.js";
|
|
3
2
|
import { isRestartEnabled } from "../config/commands.flags.js";
|
|
3
|
+
import "../config/index.js";
|
|
4
4
|
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
5
5
|
import { restartGatewayProcessWithFreshPid } from "./respawn.js";
|
|
6
6
|
import { acquireGatewayLock } from "./lock.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
4
3
|
import { getModelRegistry } from "../../providers/model-registry.js";
|
|
4
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
5
5
|
import { init_providers } from "../../providers/index.js";
|
|
6
6
|
import { disposeAllSessionMcpRuntimes } from "../../agent/mcp/bundle-mcp-runtime.js";
|
|
7
7
|
import { reloadImageGenerationProviders } from "../../agent/image/generation/provider-registry.js";
|
|
@@ -9,14 +9,14 @@ import { closeXopcDatabase, openXopcDatabase } from "../storage/sqlite/connectio
|
|
|
9
9
|
import "../storage/sqlite/index.js";
|
|
10
10
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
11
11
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
12
|
-
import { buildSessionKey, init_session_key, sanitizeSegment } from "../routing/session-key.js";
|
|
13
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
14
12
|
import { init_paths, resolveAgentDir, resolveConfigPath, resolveExtensionsDir } from "../config/paths.js";
|
|
13
|
+
import { prewarmModelRegistry } from "../providers/model-registry.js";
|
|
15
14
|
import { areExtensionsGloballyDisabled } from "../extensions/discover-extensions.js";
|
|
16
15
|
import { buildExtensionMetadataSnapshot } from "../extensions/extension-metadata-snapshot.js";
|
|
17
16
|
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, init_channel_catalog_service } from "../channels/catalog/channel-catalog-service.js";
|
|
18
17
|
import { loadConfig, saveConfig } from "../config/loader.js";
|
|
19
|
-
import {
|
|
18
|
+
import { buildSessionKey, init_session_key, sanitizeSegment } from "../routing/session-key.js";
|
|
19
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
20
20
|
import { init_providers, providers_exports } from "../providers/index.js";
|
|
21
21
|
import { TaskRepository } from "../tasks/task-repository.js";
|
|
22
22
|
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
@@ -50,18 +50,18 @@ import { registerClarifyBridge } from "./clarify-runtime.js";
|
|
|
50
50
|
import { ChannelManager } from "../channels/manager.js";
|
|
51
51
|
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
52
52
|
import "../config/index.js";
|
|
53
|
-
import { DiscussionService } from "../discussions/service.js";
|
|
54
|
-
import { DiscussionOrganizer } from "../discussions/organizer.js";
|
|
55
|
-
import { DiscussionLiveWorker } from "../discussions/live-worker.js";
|
|
56
|
-
import { DiscussionOrganizerWorker } from "../discussions/organizer-worker.js";
|
|
57
|
-
import { DiscussionSealer } from "../discussions/sealer.js";
|
|
58
|
-
import "../discussions/index.js";
|
|
59
53
|
import { ManagedComposioEventPoller } from "../connectors/composio-managed-events.js";
|
|
60
54
|
import { startConnectedKnowledgeCoordinator } from "../knowledge/coordinator.js";
|
|
61
55
|
import "../knowledge/index.js";
|
|
62
56
|
import { startConnectorLearningCoordinator } from "../connectors/learning-coordinator.js";
|
|
63
57
|
import { ConnectedSourceChangePublisher } from "../connectors/source-change-publisher.js";
|
|
64
58
|
import { startConnectorSupervisor } from "../connectors/supervisor.js";
|
|
59
|
+
import { DiscussionService } from "../discussions/service.js";
|
|
60
|
+
import { DiscussionOrganizer } from "../discussions/organizer.js";
|
|
61
|
+
import { DiscussionLiveWorker } from "../discussions/live-worker.js";
|
|
62
|
+
import { DiscussionOrganizerWorker } from "../discussions/organizer-worker.js";
|
|
63
|
+
import { DiscussionSealer } from "../discussions/sealer.js";
|
|
64
|
+
import "../discussions/index.js";
|
|
65
65
|
import { EndpointToolRuntime } from "../endpoint-tools/runtime.js";
|
|
66
66
|
import "../endpoint-tools/index.js";
|
|
67
67
|
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|