@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,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, shouldSilence, stripHeartbeatToken } from "./tokens.js";
|
|
2
|
-
import { appendCronEventLines } from "./event-prompt.js";
|
|
3
2
|
import { isWithinActiveHours } from "./active-hours.js";
|
|
4
3
|
import { isHeartbeatContentEmpty } from "./content-check.js";
|
|
4
|
+
import { appendCronEventLines } from "./event-prompt.js";
|
|
5
5
|
import { createHeartbeatWake } from "./wake.js";
|
|
6
6
|
export { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, appendCronEventLines, createHeartbeatWake, isHeartbeatContentEmpty, isWithinActiveHours, shouldSilence, stripHeartbeatToken };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_sync_provider_auth, resolveProviderApiKeyForAgentSync } from "../../auth/sync-provider-auth.js";
|
|
2
1
|
import { getApiKeyFromEnv, init_env_keys } from "../env-keys.js";
|
|
2
|
+
import { init_sync_provider_auth, resolveProviderApiKeyForAgentSync } from "../../auth/sync-provider-auth.js";
|
|
3
3
|
import { getDefaultAuthProfileStore } from "./auth-profile-store.js";
|
|
4
4
|
//#region src/providers/auth-runtime/resolve-auth.ts
|
|
5
5
|
init_env_keys();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __esmMin, __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
3
|
-
import { getOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
|
|
4
|
-
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
5
3
|
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
6
4
|
import { init_model_ref, splitProviderModelRef } from "./model-ref.js";
|
|
7
5
|
import { ModelRegistry, getModelRegistry, init_model_registry, prewarmModelRegistry, resetModelRegistry } from "./model-registry.js";
|
|
6
|
+
import { getOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
|
|
8
7
|
import { CredentialResolver, hasCredentials, init_credentials } from "../auth/credentials.js";
|
|
8
|
+
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
9
9
|
import { EXTENSION_PROVIDER_BASE_URL, init_constants } from "./constants.js";
|
|
10
10
|
import { applyOfficialModelMetadataCorrections, getSupplementalModels, init_model_supplements } from "./model-supplements.js";
|
|
11
11
|
import { getProviderRegistry, init_plugin_registry } from "./plugin-registry.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { resolveModelsJsonPath } from "../config/paths.js";
|
|
5
4
|
import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
|
|
5
|
+
import { resolveModelsJsonPath } from "../config/paths.js";
|
|
6
6
|
import { getDefaultModelValues, init_models_json, validateModelsConfig } from "../config/models-json.js";
|
|
7
7
|
import { getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
8
8
|
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
|
|
3
2
|
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
3
|
+
import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
|
|
4
4
|
import { XOPC_CLOUD_PROVIDER_ID, init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
|
|
5
5
|
//#region src/providers/register-runtime-providers.ts
|
|
6
6
|
function registerRuntimeProvider(modelRuntime, source) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { applyPathPrepend } from "../infra/path-prepend.js";
|
|
3
4
|
import { RuntimeError } from "./errors.js";
|
|
4
5
|
import { atomicInstallRuntime, extractRuntimeArchive } from "./archive.js";
|
|
5
6
|
import { runRuntimeCommand } from "./command.js";
|
|
@@ -46,6 +47,40 @@ function uvExecutables(installDir) {
|
|
|
46
47
|
uvx: join(installDir, executableName("uvx"))
|
|
47
48
|
};
|
|
48
49
|
}
|
|
50
|
+
function managedNodeProbeEnvironment(executables) {
|
|
51
|
+
const env = { ...process.env };
|
|
52
|
+
applyPathPrepend(env, [dirname(executables.node ?? executables.primary)]);
|
|
53
|
+
return env;
|
|
54
|
+
}
|
|
55
|
+
async function probeNodePackageManagers(executables) {
|
|
56
|
+
if (!executables.npm || !executables.npx) return null;
|
|
57
|
+
const env = managedNodeProbeEnvironment(executables);
|
|
58
|
+
const [npm, npx] = await Promise.all([runRuntimeCommand({
|
|
59
|
+
command: executables.npm,
|
|
60
|
+
args: ["--version"],
|
|
61
|
+
env
|
|
62
|
+
}), runRuntimeCommand({
|
|
63
|
+
command: executables.npx,
|
|
64
|
+
args: ["--version"],
|
|
65
|
+
env
|
|
66
|
+
})]);
|
|
67
|
+
return {
|
|
68
|
+
npm,
|
|
69
|
+
npx
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function packageManagerProbeFailure(name, result) {
|
|
73
|
+
if (result.ok) return null;
|
|
74
|
+
const output = result.stderr || result.stdout;
|
|
75
|
+
if (output) return `${name}: ${output}`;
|
|
76
|
+
if (result.timedOut) return `${name}: timed out`;
|
|
77
|
+
if (result.aborted) return `${name}: aborted`;
|
|
78
|
+
return `${name}: exited with code ${result.exitCode ?? "unknown"}`;
|
|
79
|
+
}
|
|
80
|
+
function packageManagerProbeFailureMessage(results) {
|
|
81
|
+
if (!results) return "npm or npx executable is missing";
|
|
82
|
+
return [packageManagerProbeFailure("npm", results.npm), packageManagerProbeFailure("npx", results.npx)].filter((message) => message !== null).join("; ");
|
|
83
|
+
}
|
|
49
84
|
function runtimeConfig(options, runtime) {
|
|
50
85
|
if (runtime === "node") return options.config.node;
|
|
51
86
|
if (runtime === "python") return options.config.python;
|
|
@@ -125,17 +160,8 @@ var ManagedRuntimeManager = class extends EventEmitter {
|
|
|
125
160
|
const version = parseRuntimeVersion(`${result.stdout}\n${result.stderr}`);
|
|
126
161
|
if (!result.ok || !version || !versionSatisfies(version, requestedVersion)) return null;
|
|
127
162
|
if (runtime === "node") {
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
if (!npm || !npx) return null;
|
|
131
|
-
const [npmProbe, npxProbe] = await Promise.all([runRuntimeCommand({
|
|
132
|
-
command: npm,
|
|
133
|
-
args: ["--version"]
|
|
134
|
-
}), runRuntimeCommand({
|
|
135
|
-
command: npx,
|
|
136
|
-
args: ["--version"]
|
|
137
|
-
})]);
|
|
138
|
-
if (!npmProbe.ok || !npxProbe.ok) return null;
|
|
163
|
+
const packageManagers = await probeNodePackageManagers(manifest.executables);
|
|
164
|
+
if (!packageManagers?.npm.ok || !packageManagers.npx.ok) return null;
|
|
139
165
|
}
|
|
140
166
|
return {
|
|
141
167
|
runtime,
|
|
@@ -271,22 +297,15 @@ var ManagedRuntimeManager = class extends EventEmitter {
|
|
|
271
297
|
}
|
|
272
298
|
let packageManagerVersion;
|
|
273
299
|
if (runtime === "node") {
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
args: ["--version"]
|
|
277
|
-
});
|
|
278
|
-
const npxProbe = await runRuntimeCommand({
|
|
279
|
-
command: executables.npx,
|
|
280
|
-
args: ["--version"]
|
|
281
|
-
});
|
|
282
|
-
if (!npmProbe.ok || !npxProbe.ok) {
|
|
300
|
+
const packageManagers = await probeNodePackageManagers(executables);
|
|
301
|
+
if (!packageManagers?.npm.ok || !packageManagers.npx.ok) {
|
|
283
302
|
await rm(installDir, {
|
|
284
303
|
recursive: true,
|
|
285
304
|
force: true
|
|
286
305
|
});
|
|
287
|
-
throw new RuntimeError(`Node ${version}
|
|
306
|
+
throw new RuntimeError(`Node ${version} failed its npm or npx installation probe: ${packageManagerProbeFailureMessage(packageManagers)}`, "RUNTIME_PROBE_FAILED", runtime, "probe_package_manager", true);
|
|
288
307
|
}
|
|
289
|
-
packageManagerVersion =
|
|
308
|
+
packageManagerVersion = packageManagers.npm.stdout;
|
|
290
309
|
}
|
|
291
310
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
292
311
|
const manifest = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
3
2
|
import { init_paths, resolveAgentProfileDir, resolveBundledSkillsDir } from "../config/paths.js";
|
|
3
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
4
4
|
import { resolveBootstrapFilesSync } from "../agent/bootstrap/bootstrap-files.js";
|
|
5
5
|
import { createSkillConfigManager, isSkillEnabled } from "../agent/skills/config.js";
|
|
6
6
|
import { loadSkills } from "../agent/skills/index.js";
|
package/dist/src/tui/tui.js
CHANGED
|
@@ -2,10 +2,10 @@ import { version } from "../../package.js";
|
|
|
2
2
|
import { resolveStateDir, resolveXopcDatabasePath } from "../config/paths-state.js";
|
|
3
3
|
import { parseAgentSessionKey } from "../routing/session-key-utils.js";
|
|
4
4
|
import { init_agent_session_key, normalizeAgentId } from "../routing/agent-session-key.js";
|
|
5
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
6
5
|
import { init_paths } from "../config/paths.js";
|
|
7
6
|
import { loadConfig } from "../config/loader.js";
|
|
8
7
|
import { getAllModels, getAllProviders, getApiKey, init_providers, isProviderConfiguredSync } from "../providers/index.js";
|
|
8
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
9
9
|
import { ProjectTrustStore, hasTrustRequiringProjectResources } from "../project-trust/trust-store.js";
|
|
10
10
|
import { renderWorkflowFinalSummary, renderWorkflowPanel } from "../agent/workflow/snapshot.js";
|
|
11
11
|
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
@@ -145,12 +145,20 @@ function snapshotForModel(snapshot) {
|
|
|
145
145
|
})
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function defaultConversationStarter(snapshot) {
|
|
149
|
+
const name = snapshot.root.displayName;
|
|
150
|
+
const changedPathCount = snapshot.git?.changedPaths.length ?? 0;
|
|
151
|
+
if (changedPathCount > 0) return `Review the ${changedPathCount} changed ${changedPathCount === 1 ? "path" : "paths"} in ${name}, explain what work appears to be in progress, and recommend the most important next step.`;
|
|
152
|
+
if (snapshot.root.projectKind === "coding") return `Help me understand ${name}: summarize what this project does, its current state, and the most important place to start.`;
|
|
153
|
+
return `Help me understand the contents of ${name}, what appears most important right now, and where I should start.`;
|
|
154
|
+
}
|
|
155
|
+
function lowConfidenceResult(snapshot, question, conversationStarter) {
|
|
149
156
|
return {
|
|
150
157
|
projectSummary: snapshot.root.projectKind === "coding" ? `${snapshot.root.displayName} appears to be a software project.` : `${snapshot.root.displayName} is a local work folder.`,
|
|
151
158
|
currentState: snapshot.git?.changedPaths.length ? `${snapshot.git.changedPaths.length} changed paths were detected, but there was not enough reliable context to recommend work.` : "There was not enough recent, readable context to determine the current objective.",
|
|
152
159
|
uncertainties: ["The current objective is not explicit in the selected files."],
|
|
153
160
|
suggestions: [],
|
|
161
|
+
conversationStarter: conversationStarter?.trim().slice(0, 2e3) || defaultConversationStarter(snapshot),
|
|
154
162
|
lowConfidence: true,
|
|
155
163
|
contextQuestion: question ?? "What are you trying to move forward in this folder?"
|
|
156
164
|
};
|
|
@@ -169,7 +177,7 @@ async function analyzeWorkContext(input) {
|
|
|
169
177
|
content: [
|
|
170
178
|
"You help a user resume real work in one explicitly selected local folder.",
|
|
171
179
|
"Analyze only the supplied bounded snapshot. Never claim that you ran commands, tests, or inspected anything absent from it.",
|
|
172
|
-
"Return only one JSON object with projectSummary, currentState, uncertainties, suggestions, profileCandidates, workThreads, lowConfidence, and contextQuestion.",
|
|
180
|
+
"Return only one JSON object with projectSummary, currentState, uncertainties, suggestions, profileCandidates, workThreads, conversationStarter, lowConfidence, and contextQuestion.",
|
|
173
181
|
"profileCandidates contains stable, useful facts about the user inferred from the supplied project evidence. Include every distinct fact with direct support; do not pad the list.",
|
|
174
182
|
"Each profile candidate has category (role, focus, technology, workflow, or preference), statement, confidence, and evidence.",
|
|
175
183
|
"Do not infer sensitive traits, identity, health, finances, political views, or anything not directly supported by the work evidence.",
|
|
@@ -184,6 +192,8 @@ async function analyzeWorkContext(input) {
|
|
|
184
192
|
"verification is a short array describing how the user can tell the task is real.",
|
|
185
193
|
"Each evidence item contains an optional exact relative path from the snapshot and one concrete observation.",
|
|
186
194
|
"actionPrompt asks the assistant to investigate or continue the step; it does not silently authorize file changes.",
|
|
195
|
+
"conversationStarter is one concise, editable first-person prompt the user can send immediately. Ground it in the most important visible project or directory signal, ask the assistant to explain before acting, and never silently authorize file changes.",
|
|
196
|
+
"Always return conversationStarter, including when confidence is low.",
|
|
187
197
|
"If the current objective is unclear or fewer than three credible suggestions exist, set lowConfidence=true, return suggestions=[], and ask one concise contextQuestion.",
|
|
188
198
|
"Use Simplified Chinese for every user-facing string when the visible snapshot documents are mainly Chinese; otherwise use English.",
|
|
189
199
|
"",
|
|
@@ -209,16 +219,17 @@ async function analyzeWorkContext(input) {
|
|
|
209
219
|
if (!parsed) throw invalidJsonError("Analysis", response, raw);
|
|
210
220
|
if (parsed.lowConfidence === true) return {
|
|
211
221
|
modelRef,
|
|
212
|
-
result: lowConfidenceResult(input.snapshot, typeof parsed.contextQuestion === "string" ? parsed.contextQuestion.trim().slice(0, 500) : void 0)
|
|
222
|
+
result: lowConfidenceResult(input.snapshot, typeof parsed.contextQuestion === "string" ? parsed.contextQuestion.trim().slice(0, 500) : void 0, typeof parsed.conversationStarter === "string" ? parsed.conversationStarter : void 0)
|
|
213
223
|
};
|
|
214
224
|
const allowedPaths = new Set([...input.snapshot.documents.map((document) => document.relativePath), ...input.snapshot.git?.changedPaths ?? []]);
|
|
215
225
|
const allowedThreadRefs = new Set([...allowedPaths, "git://recent-state"]);
|
|
216
226
|
const suggestions = Array.isArray(parsed.suggestions) ? parsed.suggestions.map((value) => validateSuggestion(value, allowedPaths)).filter((value) => Boolean(value)) : [];
|
|
217
227
|
if (suggestions.length !== 3) return {
|
|
218
228
|
modelRef,
|
|
219
|
-
result: lowConfidenceResult(input.snapshot)
|
|
229
|
+
result: lowConfidenceResult(input.snapshot, typeof parsed.contextQuestion === "string" ? parsed.contextQuestion.trim().slice(0, 500) : void 0, typeof parsed.conversationStarter === "string" ? parsed.conversationStarter : void 0)
|
|
220
230
|
};
|
|
221
231
|
const primarySuggestion = [...suggestions].sort((a, b) => suggestionScore(b) - suggestionScore(a))[0];
|
|
232
|
+
const conversationStarter = typeof parsed.conversationStarter === "string" ? parsed.conversationStarter.trim().slice(0, 2e3) : primarySuggestion?.actionPrompt;
|
|
222
233
|
const profileCandidates = input.candidateContext?.length && Array.isArray(parsed.profileCandidates) ? parsed.profileCandidates.map((value) => validateProfileCandidate(value)).filter((value) => Boolean(value)) : [];
|
|
223
234
|
const workThreadCandidates = Array.isArray(parsed.workThreads) ? parsed.workThreads.map((value) => validateWorkThreadCandidate(value, allowedThreadRefs)).filter((value) => Boolean(value)) : [];
|
|
224
235
|
const projectSummary = typeof parsed.projectSummary === "string" ? parsed.projectSummary.trim() : "";
|
|
@@ -231,6 +242,7 @@ async function analyzeWorkContext(input) {
|
|
|
231
242
|
currentState: currentState.slice(0, 1200),
|
|
232
243
|
uncertainties: strings(parsed.uncertainties, 6).map((value) => value.slice(0, 500)),
|
|
233
244
|
suggestions,
|
|
245
|
+
...conversationStarter ? { conversationStarter } : {},
|
|
234
246
|
...profileCandidates.length > 0 ? { profileCandidates } : {},
|
|
235
247
|
...workThreadCandidates.length > 0 ? { workThreadCandidates } : {},
|
|
236
248
|
...primarySuggestion ? { primarySuggestionId: primarySuggestion.id } : {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
2
|
-
import { extractProfileAgentId, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
3
2
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
3
|
+
import { extractProfileAgentId, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
4
4
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
5
5
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
6
6
|
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Local-first AI
|
|
3
|
+
"version": "0.0.214",
|
|
4
|
+
"description": "Local-first personal AI assistant with reviewable user understanding, durable tasks, workflows, automations, and local or cloud models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
7
7
|
"types": "dist/src/index.d.ts",
|
|
@@ -30,26 +30,26 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"keywords": [
|
|
33
|
-
"
|
|
34
|
-
"ai-
|
|
33
|
+
"agentic-ai",
|
|
34
|
+
"ai-agents",
|
|
35
|
+
"ai-assistant",
|
|
36
|
+
"ai-memory",
|
|
37
|
+
"automation",
|
|
35
38
|
"byok",
|
|
36
39
|
"cli",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"task-loop-os",
|
|
42
|
-
"llm",
|
|
40
|
+
"desktop-app",
|
|
41
|
+
"electron",
|
|
42
|
+
"knowledge-management",
|
|
43
|
+
"local-ai",
|
|
43
44
|
"local-first",
|
|
44
45
|
"mcp",
|
|
45
|
-
"multi-agent",
|
|
46
46
|
"ollama",
|
|
47
|
+
"open-source",
|
|
48
|
+
"personal-ai",
|
|
47
49
|
"self-hosted",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"weixin",
|
|
52
|
-
"workflow"
|
|
50
|
+
"task-management",
|
|
51
|
+
"typescript",
|
|
52
|
+
"workflow-automation"
|
|
53
53
|
],
|
|
54
54
|
"author": "xopcai <lyxopc.ai@gmail.com>",
|
|
55
55
|
"license": "MIT",
|
|
@@ -163,9 +163,9 @@
|
|
|
163
163
|
"vitepress": "^1.6.4",
|
|
164
164
|
"vitest": "4.1.5",
|
|
165
165
|
"vue": "^3.5.35",
|
|
166
|
+
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
166
167
|
"@xopcai/gateway-contract": "0.0.0",
|
|
167
168
|
"@xopcai/realtime-protocol": "0.0.0",
|
|
168
|
-
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
169
169
|
"@xopcai/realtime-client": "0.0.0"
|
|
170
170
|
},
|
|
171
171
|
"scripts": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./locale-store-BYSRjM6g.js";import{n as t}from"./channel-recipient-api-9uca5kDa.js";function n(){return e(`/api/channels/status`)}var r=t;export{r as n,n as t};
|