@xopcai/xopc 0.0.194 → 0.0.196
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/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-4ln7j-oZ.js → agent-avatar-dicebear-B1oxPli_.js} +1 -1
- package/dist/gateway/static/root/assets/agents-VoFNMGL3.js +68 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-B0IMpHk8.js → app-management-settings-panel-vmuJ_Z6i.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BG6ZGIUf.js → appearance-settings-BMlEoe-G.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-CsNB6mv_.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BNpjG4FR.js → archive-plugin-BdE4Mati.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-BK25C_hA.js → attachment-load-CTzaQcLV.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-CW1YWgiX.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-fbFe6Jqc.js → binary-plugins-B25zTNxl.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-SQHwWg1e.js → block-editor-Cdrf2awF.js} +6 -6
- package/dist/gateway/static/root/assets/browser-settings-page-BMTmGMM6.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-DuUQ_Ycz.js → browser-workflow-inputs-BsmHy0ks.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-B8I2FmrM.js → browser-workflows-page-Wx9FrbK-.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-C5l85__e.js +7 -0
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-9T2KXAs1.js +3 -0
- package/dist/gateway/static/root/assets/channels-settings-DquD4BPQ.js +1 -0
- package/dist/gateway/static/root/assets/connectors-api-BC-4ftOM.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-7zUxVHQg.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-DtWb3YAh.js → cron-expression-BycQlU8Q.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-3vjdusik.js → dependency-picker-BvYqHRz0.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-NmW7VWdO.js → desktop-pet-BOb8sEhN.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DrdSI9lX.js → desktop-pet-settings-DStgPb82.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-CG5XR1UD.js → directory-picker-path-field-DUUr9sq0.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-RjIezQyy.js → extension-debug-page-p83TmZFd.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-D9Elz9mr.js → extension-page-DMQ3ovxA.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BvVjqFvm.js → extension-settings-page-BcSKEU8s.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-C-rYVz-n.js → gateway-config-api-C-MmtCc7.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-CLS25-gm.js → gateway-settings-CuaRDWbg.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-DSgDxtwJ.js → heartbeat-settings-Dm8TrfGa.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-BYhDbUvI.js +3 -0
- package/dist/gateway/static/root/assets/{index-Cb9y6tVR.js → index-BzPwnXho.js} +62 -62
- package/dist/gateway/static/root/assets/index-CFFYvilx.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-RcHmSHYI.js → keyboard-shortcuts-settings-BQb06_jl.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CHk4x0kR.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-s7PKLTvO.js → local-apps-page-DQtsxjGs.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-CDqIY72S.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-CWUHBXje.js → management-settings-D7itDEHl.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-B-IuPr4L.js → markdown-split-Db-KrpOQ.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CiejHVt4.js → media-plugins-CHN66qs0.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-BSJAwHqy.js → notes-page-CJtKZM0P.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-epHGeKd5.js +4 -0
- package/dist/gateway/static/root/assets/{page-tabs-D6YJ6_l_.js → page-tabs-HXweXqYE.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Tw_G-6jb.js → preview-open-alternatives-Dob6Oe2l.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BlB3QjTV.js → product-open-page--RnCc9bb.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-BxOD5-zj.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-D-9AhrH5.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-CSUNXLKM.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-D59bftC7.js → runtime-tools-settings-panel-Bg1W2__k.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-DyXqGA71.js → schema-form-BI4rVt3u.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-BxOUBMca.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DAvTIbgw.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-DZUGXwFO.js → settings-form-section-C7rzhi7x.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-Lz1ec5lN.js → settings-loading-skeleton-BS36Mjzz.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-DLofKC7q.js → settings-page-BDSd7F9Y.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-BdkN2U81.js → settings-page-layout-CTMmZcwj.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-D1v-2Ci-.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-DrZVv8tB.js → share-preview-page-BeCxg6eb.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-CXL1EldF.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-BxwkKgVw.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-zOD__-H5.js → skills-page-CyfjEM4D.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-ZDcx95iD.js → skills-page.utils-CnbJncdL.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-BJhat70L.js → system-settings-panel-CAv0Yk0Y.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-DGTVJs_N.js +1 -0
- package/dist/gateway/static/root/assets/{typed-models-lib-B1p3wMFK.js → typed-models-lib-DomX3Szl.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-Frcfbncl.js → use-autosave-BLc4gfG0.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-C2kQENTK.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-CSNOUNF4.js → voice-api-key-field-BijmpPjb.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DTJGssPz.js → work-discovery-overlay-D7w2JFFq.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-Bt2-fzHu.js → work-discovery-page-XtoPgPUS.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-D3uCmyag.js → workflow-run-setup-panel-BEmugHfL.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-D_K2xOWq.js +5 -0
- package/dist/gateway/static/root/index.html +2 -2
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +1 -1
- package/dist/src/agent/memory/create-memory-manager.js +1 -1
- package/dist/src/agent-runtime/index.js +1 -1
- package/dist/src/agent-runtime/runtime-profile.js +1 -1
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.d.ts +2 -1
- package/dist/src/cli/commands/onboard/model.js +10 -3
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/hono/routes/local-apps.js +1 -1
- package/dist/src/gateway/hono/routes/understanding-sources.js +5 -1
- package/dist/src/gateway/hono/routes/update.js +2 -2
- package/dist/src/gateway/index.js +1 -1
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/service.js +6 -6
- package/dist/src/infra/gateway-processes.js +1 -1
- package/dist/src/infra/update-restart.js +1 -1
- package/dist/src/infra/update-runner.js +2 -2
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/tui/backends/gateway-realtime-backend.js +1 -1
- package/dist/src/user-context/sources/activity-clustering.js +1 -1
- package/dist/src/user-context/sources/index.js +2 -2
- package/dist/src/user-context/sources/repository.d.ts +1 -0
- package/dist/src/user-context/sources/repository.js +4 -1
- package/dist/src/work-discovery/analyzer.js +8 -8
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/agents-C1Z-rurI.js +0 -68
- package/dist/gateway/static/root/assets/apps-page-CwsZENTk.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-BedezAfO.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-CC0_TfTy.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-ditT6VRs.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-bNVds1ta.js +0 -3
- package/dist/gateway/static/root/assets/channels-settings-DhsWSbJ2.js +0 -1
- package/dist/gateway/static/root/assets/connectors-api-Ne8mQrYN.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-hZA9M1z_.js +0 -2
- package/dist/gateway/static/root/assets/home-page-CDpUUelT.js +0 -3
- package/dist/gateway/static/root/assets/image-generation-api-Cki7jfEV.js +0 -1
- package/dist/gateway/static/root/assets/index-DtEVsSU1.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DvzXo7dx.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-CNm5fu3L.js +0 -2
- package/dist/gateway/static/root/assets/notes-workbench-DTWRQ_EU.js +0 -4
- package/dist/gateway/static/root/assets/project-detail-page-DT7aWLWT.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-B-i3U2fU.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-v-kXavTc.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-tEfg1Pru.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-tbguNxVJ.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DQgoV7gj.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-I2bBkyDb.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-gFdcImEc.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-DoyREaFj.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-DniWcH92.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-Ba5fVQWY.js +0 -5
|
@@ -4,7 +4,6 @@ import { init_logger } from "../utils/logger.js";
|
|
|
4
4
|
import { getSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
5
5
|
import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
6
6
|
import "../storage/sqlite/index.js";
|
|
7
|
-
import { checkBoundary } from "../agent-runtime/boundary-guard.js";
|
|
8
7
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
9
8
|
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
10
9
|
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
@@ -38,6 +37,7 @@ import { UserContextCoordinator } from "./memory/user-context-coordinator.js";
|
|
|
38
37
|
import { WorkspaceRuntimeRegistry } from "./workspace-runtime/registry.js";
|
|
39
38
|
import { BackgroundReviewCoordinator } from "./background-review/coordinator.js";
|
|
40
39
|
import { maybeRequestChannelExecApproval } from "../channels/exec-approval-runtime.js";
|
|
40
|
+
import { checkBoundary } from "../agent-runtime/boundary-guard.js";
|
|
41
41
|
import { SkillFilesystemWatcher } from "./skills/filesystem-watcher.js";
|
|
42
42
|
import { ProjectTrustStore, hasTrustRequiringProjectResources } from "../project-trust/trust-store.js";
|
|
43
43
|
import { basename, resolve, sep } from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { buildMemoryRuntime } from "../../agent-runtime/memory-runtime.js";
|
|
2
1
|
import { isMemorySubsystemEnabled } from "./memory-config.js";
|
|
3
2
|
import { BuiltinMemoryProvider } from "./builtin-provider.js";
|
|
4
3
|
import { MemoryManager } from "./manager.js";
|
|
5
4
|
import { loadMemoryPluginProviders } from "./plugin-discovery.js";
|
|
5
|
+
import { buildMemoryRuntime } from "../../agent-runtime/memory-runtime.js";
|
|
6
6
|
//#region src/agent/memory/create-memory-manager.ts
|
|
7
7
|
function createMemoryManagerFromConfig(config) {
|
|
8
8
|
const routing = resolveMemoryManagerOptions(config);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { buildMemoryRuntime } from "./memory-runtime.js";
|
|
1
2
|
import { checkBoundary } from "./boundary-guard.js";
|
|
2
3
|
import { resolveModelRole } from "./model-router.js";
|
|
3
4
|
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";
|
|
3
4
|
import { checkBoundary } from "./boundary-guard.js";
|
|
4
5
|
import { resolveModelRole } from "./model-router.js";
|
|
5
6
|
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,8 +1,8 @@
|
|
|
1
1
|
import { buildChannelCatalogForConfig, init_channel_catalog_service } from "../../channels/catalog/channel-catalog-service.js";
|
|
2
2
|
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
3
|
-
import { formatExamples, register } from "../registry.js";
|
|
4
3
|
import { listChannelPairingState } from "../../channels/pairing/pairing-service.js";
|
|
5
4
|
import { approveChannelPairingFromCli } from "../../channels/pairing/approve-cli.js";
|
|
5
|
+
import { formatExamples, register } from "../registry.js";
|
|
6
6
|
import { colors } from "../utils/colors.js";
|
|
7
7
|
import { Command } from "commander";
|
|
8
8
|
//#region src/cli/commands/channels.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
2
2
|
import { getStoreConnectorInstallPlan, installStoreConnector, listStoreConnectors } from "../../capabilities/store-connector.js";
|
|
3
3
|
import { register } from "../registry.js";
|
|
4
|
-
import { Command } from "commander";
|
|
5
4
|
import { confirm } from "@inquirer/prompts";
|
|
5
|
+
import { Command } from "commander";
|
|
6
6
|
//#region src/cli/commands/connectors.ts
|
|
7
7
|
init_loader();
|
|
8
8
|
function parsePairs(values, option) {
|
|
@@ -13,8 +13,8 @@ import { existsSync, readFileSync, rmSync, statSync } from "node:fs";
|
|
|
13
13
|
import { execSync } from "node:child_process";
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
15
15
|
import semver from "semver";
|
|
16
|
-
import { Command } from "commander";
|
|
17
16
|
import { confirm } from "@inquirer/prompts";
|
|
17
|
+
import { Command } from "commander";
|
|
18
18
|
//#region src/cli/commands/extension-marketplace.ts
|
|
19
19
|
init_loader();
|
|
20
20
|
init_paths();
|
|
@@ -3,8 +3,8 @@ import { loadConfig } from "../../../config/loader.js";
|
|
|
3
3
|
import "../../../config/index.js";
|
|
4
4
|
import { isRestartEnabled } from "../../../config/commands.flags.js";
|
|
5
5
|
import { resolveGatewayService } from "../../../daemon/service.js";
|
|
6
|
-
import { findVerifiedGatewayListenerPidsOnPortSync, formatGatewayPidList, signalVerifiedGatewayPidSync } from "../../../infra/gateway-processes.js";
|
|
7
6
|
import { authorizeGatewaySigusr1Restart, writeGatewayRestartIntentSync } from "../../../infra/restart.js";
|
|
7
|
+
import { findVerifiedGatewayListenerPidsOnPortSync, formatGatewayPidList, signalVerifiedGatewayPidSync } from "../../../infra/gateway-processes.js";
|
|
8
8
|
import { runServiceRestart, runServiceStop } from "./lifecycle-core.js";
|
|
9
9
|
import { DEFAULT_RESTART_HEALTH_ATTEMPTS, renderGatewayPortHealthDiagnostics, waitForGatewayHealthyListener } from "./restart-health.js";
|
|
10
10
|
import { parsePortFromArgs, renderGatewayServiceStartHints, resolveGatewayPortFromConfig } from "./shared.js";
|
|
@@ -8,8 +8,8 @@ import "../../config/index.js";
|
|
|
8
8
|
import { prepareUpdateGlobalDefaults } from "../../gateway/global-defaults-admin.js";
|
|
9
9
|
import { colors } from "../utils/colors.js";
|
|
10
10
|
import { runCliOAuthLogin } from "../utils/oauth-login.js";
|
|
11
|
-
import { Command } from "commander";
|
|
12
11
|
import { input } from "@inquirer/prompts";
|
|
12
|
+
import { Command } from "commander";
|
|
13
13
|
//#region src/cli/commands/models.ts
|
|
14
14
|
init_credentials();
|
|
15
15
|
init_schema();
|
|
@@ -6,6 +6,7 @@ import { type ModelCatalogStore } from '../../../providers/model-catalog-store.j
|
|
|
6
6
|
import { XopcCloudModelSource } from '../../../providers/xopc-cloud-model-source.js';
|
|
7
7
|
import type { CLIContext } from '../../registry.js';
|
|
8
8
|
export declare function defaultXopcCloudImageModel(catalogStore?: ModelCatalogStore): string | undefined;
|
|
9
|
+
export declare function defaultXopcCloudVisionModel(catalogStore?: ModelCatalogStore): string | undefined;
|
|
9
10
|
export declare function defaultXopcCloudAudioModels(catalogStore?: ModelCatalogStore): {
|
|
10
11
|
stt?: string;
|
|
11
12
|
tts?: {
|
|
@@ -21,6 +22,6 @@ export declare function setPrimaryModel(config: Config, workspacePath: string, m
|
|
|
21
22
|
voice: string;
|
|
22
23
|
maxCharacters: number;
|
|
23
24
|
};
|
|
24
|
-
}): Config;
|
|
25
|
+
}, defaultVisionModel?: string): Config;
|
|
25
26
|
export declare function refreshOnboardModelCatalogIfNeeded(provider: string, hasCatalogModels: boolean, source?: Pick<XopcCloudModelSource, 'refresh'>): Promise<void>;
|
|
26
27
|
export declare function setupModel(existingConfig: Config | null, ctx: CLIContext): Promise<Config>;
|
|
@@ -29,6 +29,10 @@ function defaultXopcCloudImageModel(catalogStore = getModelCatalogStore()) {
|
|
|
29
29
|
const model = catalogStore.getSource("xopc-cloud")?.models.find((entry) => entry.availability === "available" && entry.kind === "image" && entry.operations.includes("images.generate"));
|
|
30
30
|
return model ? `xopc-cloud/${model.id}` : void 0;
|
|
31
31
|
}
|
|
32
|
+
function defaultXopcCloudVisionModel(catalogStore = getModelCatalogStore()) {
|
|
33
|
+
const model = catalogStore.getSource("xopc-cloud")?.models.find((entry) => entry.availability === "available" && entry.kind === "language" && entry.input.includes("image") && (entry.operations.includes("chat.completions") || entry.operations.includes("responses")));
|
|
34
|
+
return model ? `xopc-cloud/${model.id}` : void 0;
|
|
35
|
+
}
|
|
32
36
|
function defaultXopcCloudAudioModels(catalogStore = getModelCatalogStore()) {
|
|
33
37
|
const models = catalogStore.getSource("xopc-cloud")?.models.filter((entry) => entry.availability === "available") ?? [];
|
|
34
38
|
const stt = models.find((entry) => entry.kind === "stt");
|
|
@@ -42,7 +46,7 @@ function defaultXopcCloudAudioModels(catalogStore = getModelCatalogStore()) {
|
|
|
42
46
|
} } : {}
|
|
43
47
|
};
|
|
44
48
|
}
|
|
45
|
-
function setPrimaryModel(config, workspacePath, modelRef, defaultImageGenerationModel, defaultAudioModels) {
|
|
49
|
+
function setPrimaryModel(config, workspacePath, modelRef, defaultImageGenerationModel, defaultAudioModels, defaultVisionModel) {
|
|
46
50
|
const id = config.agents.default ?? config.agents.list[0]?.id ?? "main";
|
|
47
51
|
const index = config.agents.list.findIndex((entry) => entry.id === id);
|
|
48
52
|
let nextConfig = config;
|
|
@@ -70,6 +74,7 @@ function setPrimaryModel(config, workspacePath, modelRef, defaultImageGeneration
|
|
|
70
74
|
...currentModels?.roles,
|
|
71
75
|
deep: { model: modelRef }
|
|
72
76
|
},
|
|
77
|
+
...!currentModels?.imageModel && defaultVisionModel ? { imageModel: { primary: defaultVisionModel } } : {},
|
|
73
78
|
...!currentModels?.imageGenerationModel && defaultImageGenerationModel ? { imageGenerationModel: { primary: defaultImageGenerationModel } } : {}
|
|
74
79
|
} });
|
|
75
80
|
if (prep.ok === false) throw new Error(prep.error);
|
|
@@ -541,11 +546,13 @@ async function setupModel(existingConfig, ctx) {
|
|
|
541
546
|
});
|
|
542
547
|
console.log("\n✅ Model configured:", model);
|
|
543
548
|
const imageModel = provider === "xopc-cloud" ? defaultXopcCloudImageModel() : void 0;
|
|
549
|
+
const visionModel = provider === "xopc-cloud" ? defaultXopcCloudVisionModel() : void 0;
|
|
544
550
|
const audioModels = provider === "xopc-cloud" ? defaultXopcCloudAudioModels() : void 0;
|
|
551
|
+
if (visionModel) console.log("✅ Image understanding configured:", visionModel);
|
|
545
552
|
if (imageModel) console.log("✅ Image generation configured:", imageModel);
|
|
546
553
|
if (audioModels?.stt) console.log("✅ Speech recognition configured:", audioModels.stt);
|
|
547
554
|
if (audioModels?.tts) console.log("✅ Speech synthesis configured:", audioModels.tts.model);
|
|
548
|
-
return setPrimaryModel(config, ctx.workspacePath, model, imageModel, audioModels);
|
|
555
|
+
return setPrimaryModel(config, ctx.workspacePath, model, imageModel, audioModels, visionModel);
|
|
549
556
|
}
|
|
550
557
|
//#endregion
|
|
551
|
-
export { defaultXopcCloudAudioModels, defaultXopcCloudImageModel, refreshOnboardModelCatalogIfNeeded, setPrimaryModel, setupModel };
|
|
558
|
+
export { defaultXopcCloudAudioModels, defaultXopcCloudImageModel, defaultXopcCloudVisionModel, refreshOnboardModelCatalogIfNeeded, setPrimaryModel, setupModel };
|
|
@@ -10,8 +10,8 @@ import { initWorkspace } from "../utils/init-workspace.js";
|
|
|
10
10
|
import { setupModel } from "./onboard/model.js";
|
|
11
11
|
import { getChannelConfigurators } from "./onboard/channels/registry.js";
|
|
12
12
|
import { setupChannels } from "./onboard/channels/index.js";
|
|
13
|
-
import { Command } from "commander";
|
|
14
13
|
import { select } from "@inquirer/prompts";
|
|
14
|
+
import { Command } from "commander";
|
|
15
15
|
//#region src/cli/commands/onboard.ts
|
|
16
16
|
init_schema();
|
|
17
17
|
init_paths_state();
|
|
@@ -2,9 +2,9 @@ import { PACKAGE_VERSION, init_package_version } from "../../package-version.js"
|
|
|
2
2
|
import { loadConfig } from "../../config/loader.js";
|
|
3
3
|
import { formatExamples, register } from "../registry.js";
|
|
4
4
|
import "../../config/index.js";
|
|
5
|
+
import { acquireUpdateLock } from "../../infra/update-lock.js";
|
|
5
6
|
import { normalizeUpdateChannel } from "../../infra/update-channels.js";
|
|
6
7
|
import { compareSemver, resolveNpmChannelTag } from "../../infra/update-check.js";
|
|
7
|
-
import { acquireUpdateLock } from "../../infra/update-lock.js";
|
|
8
8
|
import { formatUpdateApiResult, resolveUpdateInstallSurface, runGatewayUpdateWithPostSteps } from "../../infra/update-runner.js";
|
|
9
9
|
import { Command } from "commander";
|
|
10
10
|
//#region src/cli/commands/update.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { init_agent_scope, normalizeAgentId, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
1
2
|
import { resolveEffectiveAgentManifest } from "../agent-manifest/resolver.js";
|
|
2
3
|
import "../agent-manifest/index.js";
|
|
3
|
-
import { init_agent_scope, normalizeAgentId, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
4
4
|
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
5
5
|
import { agentExists, getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
6
6
|
//#region src/config/agent-profile.ts
|
|
@@ -7,8 +7,8 @@ import { SlotRegistry, getSlotRegistry, registerSlotType } from "../slots.js";
|
|
|
7
7
|
import { ExtensionDiagnostics, ExtensionLoaderCacheImpl, getExtensionCache, getExtensionDiagnostics } from "../diagnostics.js";
|
|
8
8
|
import "../loader.js";
|
|
9
9
|
import { ExtensionHookRunner, createHookContext, isHookEvent } from "../hooks.js";
|
|
10
|
-
import { registerExtensionCliProgram } from "./channel-helpers.js";
|
|
11
10
|
import { defineChannelPluginEntry } from "./channel-entry.js";
|
|
11
|
+
import { registerExtensionCliProgram } from "./channel-helpers.js";
|
|
12
12
|
import { lazyFunction, lazyModule } from "./lazy.js";
|
|
13
13
|
import { createMockExtensionApi, createTestGateway } from "./testing.js";
|
|
14
14
|
//#region src/extensions/sdk/index.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveCapabilityPresetLayer, resolveEffectiveAgentManifest } from "../agent-manifest/resolver.js";
|
|
2
1
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentDir, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, resolveUserPath, validateAgentIdForNewAgent } from "../agent/agent-scope.js";
|
|
2
|
+
import { resolveCapabilityPresetLayer, resolveEffectiveAgentManifest } from "../agent-manifest/resolver.js";
|
|
3
3
|
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
4
4
|
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
5
5
|
import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES, REQUIRED_AGENT_PROFILE_MARKDOWN_FILE_SET } from "../agent/context/workspace.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readLocalAppAcceptanceConfig } from "../../../local-apps/acceptance.js";
|
|
2
|
-
import { LOCAL_APP_RUNTIME_BRIDGE_HASH, injectLocalAppRuntimeBridge } from "../../../local-apps/preview-runtime-bridge.js";
|
|
3
2
|
import { extensionAssetMimeType } from "../lib/extension-assets.js";
|
|
3
|
+
import { LOCAL_APP_RUNTIME_BRIDGE_HASH, injectLocalAppRuntimeBridge } from "../../../local-apps/preview-runtime-bridge.js";
|
|
4
4
|
import { relative, resolve } from "node:path";
|
|
5
5
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
6
6
|
//#region src/gateway/hono/routes/local-apps.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { deleteUnderstanding, listUnderstandingEvidence, listUnderstandings } from "../../../storage/sqlite/user-context-repository.js";
|
|
2
2
|
import { getConnectorAccount } from "../../../storage/sqlite/connector-account-repository.js";
|
|
3
3
|
import "../../../storage/sqlite/index.js";
|
|
4
|
-
import { getUnderstandingSourceGrant, listUnderstandingSourceGrants, listUserFocuses, revokeUnderstandingSourceGrant, setUserFocusStatus } from "../../../user-context/sources/repository.js";
|
|
4
|
+
import { deleteUserFocus, getUnderstandingSourceGrant, listUnderstandingSourceGrants, listUserFocuses, revokeUnderstandingSourceGrant, setUserFocusStatus } from "../../../user-context/sources/repository.js";
|
|
5
5
|
import { getWorkDiscoveryService } from "./work-discovery.js";
|
|
6
6
|
import { listUnderstandingSourceDefinitions } from "../../../user-context/sources/catalog.js";
|
|
7
7
|
//#region src/gateway/hono/routes/understanding-sources.ts
|
|
@@ -199,6 +199,10 @@ function registerUnderstandingSourceRoutes(authenticated, deps) {
|
|
|
199
199
|
error: "Focus not found"
|
|
200
200
|
}, 404);
|
|
201
201
|
});
|
|
202
|
+
authenticated.delete("/api/understanding/focuses/:focusId", limited, (c) => deleteUserFocus(c.req.param("focusId")) ? c.json({ ok: true }) : c.json({
|
|
203
|
+
ok: false,
|
|
204
|
+
error: "Focus not found"
|
|
205
|
+
}, 404));
|
|
202
206
|
}
|
|
203
207
|
//#endregion
|
|
204
208
|
export { registerUnderstandingSourceRoutes };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../../../package-version.js";
|
|
2
2
|
import { loadConfig } from "../../../config/loader.js";
|
|
3
3
|
import "../../../config/index.js";
|
|
4
|
-
import { normalizeUpdateChannel } from "../../../infra/update-channels.js";
|
|
5
4
|
import { acquireUpdateLock } from "../../../infra/update-lock.js";
|
|
6
|
-
import {
|
|
5
|
+
import { normalizeUpdateChannel } from "../../../infra/update-channels.js";
|
|
7
6
|
import { getUpdateAvailable, runGatewayUpdateCheck } from "../../../infra/update-startup.js";
|
|
8
7
|
import { createGatewayRouteLogger } from "../lib/route-logger.js";
|
|
8
|
+
import { formatUpdateApiResult, runGatewayUpdateWithPostSteps } from "../../../infra/update-runner.js";
|
|
9
9
|
import { streamSSE } from "hono/streaming";
|
|
10
10
|
//#region src/gateway/hono/routes/update.ts
|
|
11
11
|
init_package_version();
|
|
@@ -3,7 +3,6 @@ import { defaultGatewayBindMode, isContainerEnvironment, resolveGatewayBindHost,
|
|
|
3
3
|
import { buckets } from "./rate-limit/buckets.js";
|
|
4
4
|
import { isGatewayStrictSecurityEnabled } from "./rate-limit/env-flags.js";
|
|
5
5
|
import "./rate-limit/index.js";
|
|
6
|
-
import { checkPortAvailable, forceFreePortAndWait, listPortListeners, parseLsofOutput } from "./ports.js";
|
|
7
6
|
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
8
7
|
import { resolveGatewayListenHost, resolveGatewayListenPlan } from "./listen.js";
|
|
9
8
|
import { assertGatewayRuntimeConfig } from "./runtime-config.js";
|
|
@@ -13,6 +12,7 @@ import { createHonoApp } from "./hono/app.js";
|
|
|
13
12
|
import { GatewayServer } from "./server.js";
|
|
14
13
|
import { GatewayLockError, acquireGatewayLock } from "./lock.js";
|
|
15
14
|
import { runGatewayLoop } from "./run-loop.js";
|
|
15
|
+
import { checkPortAvailable, forceFreePortAndWait, listPortListeners, parseLsofOutput } from "./ports.js";
|
|
16
16
|
import { apiError, apiOk } from "./protocol.js";
|
|
17
17
|
import "./hono/index.js";
|
|
18
18
|
import { assertSecureGatewayHttpUrl, assertSecureWebSocketUrl, isInsecurePrivateWsAllowed, isSecureWebSocketUrl } from "./ws-security.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { loadConfig } from "../config/loader.js";
|
|
2
2
|
import "../config/index.js";
|
|
3
3
|
import { isRestartEnabled } from "../config/commands.flags.js";
|
|
4
|
-
import { consumeGatewayRestartIntentSync, consumeGatewaySigusr1RestartAuthorization, isGatewaySigusr1RestartExternallyAllowed, resetGatewayRestartStateForInProcessRestart, scheduleGatewaySigusr1Restart, setGatewaySigusr1RestartPolicy } from "../infra/restart.js";
|
|
5
4
|
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
6
5
|
import { restartGatewayProcessWithFreshPid } from "./respawn.js";
|
|
7
6
|
import { acquireGatewayLock } from "./lock.js";
|
|
7
|
+
import { consumeGatewayRestartIntentSync, consumeGatewaySigusr1RestartAuthorization, isGatewaySigusr1RestartExternallyAllowed, resetGatewayRestartStateForInProcessRestart, scheduleGatewaySigusr1Restart, setGatewaySigusr1RestartPolicy } from "../infra/restart.js";
|
|
8
8
|
//#region src/gateway/run-loop.ts
|
|
9
9
|
/**
|
|
10
10
|
* Gateway Run Loop - Core run loop for gateway process management
|
|
@@ -48,6 +48,9 @@ import { MessageBus, MessageBusShutdownError } from "../infra/bus/queue.js";
|
|
|
48
48
|
import "../infra/bus/index.js";
|
|
49
49
|
import { AgentService } from "../agent/service.js";
|
|
50
50
|
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
51
|
+
import { setPairingBroadcastSink } from "../channels/pairing/pairing-events.js";
|
|
52
|
+
import { registerClarifyBridge } from "./clarify-runtime.js";
|
|
53
|
+
import { ChannelManager } from "../channels/manager.js";
|
|
51
54
|
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
52
55
|
import "../config/index.js";
|
|
53
56
|
import { startConnectedKnowledgeCoordinator } from "../knowledge/coordinator.js";
|
|
@@ -63,12 +66,6 @@ import { DiscussionSealer } from "../discussions/sealer.js";
|
|
|
63
66
|
import "../discussions/index.js";
|
|
64
67
|
import { EndpointToolRuntime } from "../endpoint-tools/runtime.js";
|
|
65
68
|
import "../endpoint-tools/index.js";
|
|
66
|
-
import { setPairingBroadcastSink } from "../channels/pairing/pairing-events.js";
|
|
67
|
-
import { registerClarifyBridge } from "./clarify-runtime.js";
|
|
68
|
-
import { ChannelManager } from "../channels/manager.js";
|
|
69
|
-
import { scheduleGatewayUpdateCheck } from "../infra/update-startup.js";
|
|
70
|
-
import { LocalAppService } from "../local-apps/service.js";
|
|
71
|
-
import "../local-apps/index.js";
|
|
72
69
|
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
73
70
|
import { reconcileDreamingAutomations } from "./dreaming-automation-reconciler.js";
|
|
74
71
|
import { NotesStore } from "../notes/store.js";
|
|
@@ -88,6 +85,8 @@ import { auditGatewayConfig } from "./security/audit.js";
|
|
|
88
85
|
import { ModelCatalogSyncService } from "../providers/model-catalog-sync-service.js";
|
|
89
86
|
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
90
87
|
import { MobileNotificationService } from "../mobile/notification-service.js";
|
|
88
|
+
import { LocalAppService } from "../local-apps/service.js";
|
|
89
|
+
import "../local-apps/index.js";
|
|
91
90
|
import { createRuntimeBrowserRecipeService } from "../browser/recipes/runtime-service.js";
|
|
92
91
|
import "../browser/recipes/index.js";
|
|
93
92
|
import { mapProductEventToProactive } from "../proactive/events/product-event-bridge.js";
|
|
@@ -99,6 +98,7 @@ import { ProactiveTemporalWorker } from "../proactive/temporal/worker.js";
|
|
|
99
98
|
import { ProactiveInboxService } from "../proactive/inbox/service.js";
|
|
100
99
|
import { ProactiveInboxWorker } from "../proactive/inbox/worker.js";
|
|
101
100
|
import "../proactive/index.js";
|
|
101
|
+
import { scheduleGatewayUpdateCheck } from "../infra/update-startup.js";
|
|
102
102
|
import { resolveChannelConnectDeferSet } from "./resolve-channel-connect-defer.js";
|
|
103
103
|
import { restartGatewayProcessWithFreshPid } from "./respawn.js";
|
|
104
104
|
import { GatewaySessionsApi } from "./service/sessions-api.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isGatewayArgv, parseProcCmdline } from "./gateway-process-argv.js";
|
|
2
1
|
import { listPortListeners } from "../gateway/ports.js";
|
|
2
|
+
import { isGatewayArgv, parseProcCmdline } from "./gateway-process-argv.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
5
|
//#region src/infra/gateway-processes.ts
|
|
@@ -4,8 +4,8 @@ import { init_paths, resolveConfigPath } from "../config/paths.js";
|
|
|
4
4
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
5
|
import { isRestartEnabled } from "../config/commands.flags.js";
|
|
6
6
|
import { resolveGatewayService } from "../daemon/service.js";
|
|
7
|
-
import { findVerifiedGatewayListenerPidsOnPortSync, signalVerifiedGatewayPidSync } from "./gateway-processes.js";
|
|
8
7
|
import { authorizeGatewaySigusr1Restart, writeGatewayRestartIntentSync } from "./restart.js";
|
|
8
|
+
import { findVerifiedGatewayListenerPidsOnPortSync, signalVerifiedGatewayPidSync } from "./gateway-processes.js";
|
|
9
9
|
import { refreshGatewayServiceAfterUpdate } from "./update-service-refresh.js";
|
|
10
10
|
//#region src/infra/update-restart.ts
|
|
11
11
|
init_loader();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { runPostUpdateExtensionSync } from "../extensions/update.js";
|
|
2
|
+
import "./update-channels.js";
|
|
3
|
+
import { compareSemver, resolveNpmChannelTag } from "./update-check.js";
|
|
2
4
|
import { readPackageName, readPackageVersion } from "./package-json.js";
|
|
3
5
|
import { createDefaultCommandRunner, runCommandWithTimeout } from "./run-command.js";
|
|
4
6
|
import { XOPC_PACKAGE_NAME, cleanupGlobalRenameDirs, createGlobalInstallEnv, detectGlobalInstallManagerForRoot, resolveGlobalInstallSpec, resolveGlobalInstallTarget } from "./update-global.js";
|
|
5
7
|
import { runGlobalPackageUpdateSteps } from "./package-update-steps.js";
|
|
6
8
|
import { resolveStableNodePath } from "./stable-node-path.js";
|
|
7
|
-
import "./update-channels.js";
|
|
8
|
-
import { compareSemver, resolveNpmChannelTag } from "./update-check.js";
|
|
9
9
|
import { trimLogTail } from "./update-log.js";
|
|
10
10
|
import { maybeRestartGatewayAfterUpdate } from "./update-restart.js";
|
|
11
11
|
import path from "node:path";
|
|
@@ -3,9 +3,9 @@ import { init_paths_state, resolveUpdateCheckStatePath } from "../config/paths-s
|
|
|
3
3
|
import { createLogger } from "../utils/logger/index.js";
|
|
4
4
|
import { init_logger } from "../utils/logger.js";
|
|
5
5
|
import { init_write_file_atomic, writeTextAtomic } from "./write-file-atomic.js";
|
|
6
|
+
import { acquireUpdateLock } from "./update-lock.js";
|
|
6
7
|
import { normalizeUpdateChannel } from "./update-channels.js";
|
|
7
8
|
import { compareSemver, detectInstallKind, resolveNpmChannelTag, resolvePackageRoot } from "./update-check.js";
|
|
8
|
-
import { acquireUpdateLock } from "./update-lock.js";
|
|
9
9
|
import { createHash, randomUUID } from "node:crypto";
|
|
10
10
|
import { readFile } from "node:fs/promises";
|
|
11
11
|
//#region src/infra/update-startup.ts
|
|
@@ -3,8 +3,8 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { prependEnvelopeTimestamp } from "../../channels/envelope-timestamp.js";
|
|
4
4
|
import { transcriptRowsToClientHistory } from "../../session/client-history.js";
|
|
5
5
|
import { parseModelRef } from "../../agent/models/selection.js";
|
|
6
|
-
import { RealtimeClient } from "../../../packages/realtime-client/src/index.js";
|
|
7
6
|
import { gatewayCredentialAuthorization } from "../../gateway/credential.js";
|
|
7
|
+
import { RealtimeClient } from "../../../packages/realtime-client/src/index.js";
|
|
8
8
|
import { buildTuiTranscriptTree, transcriptTreeEntryIdToRowNumber } from "../tui-transcript-tree.js";
|
|
9
9
|
import { computeTuiSessionStats } from "../tui-session-stats.js";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
@@ -124,7 +124,7 @@ function clusterActivityTopics(items, now = Date.now()) {
|
|
|
124
124
|
evidenceRefs,
|
|
125
125
|
sourceIds
|
|
126
126
|
}];
|
|
127
|
-
}).sort((left, right) => right.confidence - left.confidence)
|
|
127
|
+
}).sort((left, right) => right.confidence - left.confidence);
|
|
128
128
|
}
|
|
129
129
|
//#endregion
|
|
130
130
|
export { clusterActivityTopics };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { createUnderstandingSourceRun, getUnderstandingSourceGrant, getUnderstandingSourceRun, listUnderstandingSourceGrants, listUnderstandingSourceRuns, listUserFocuses, revokeUnderstandingSourceGrant, setUserFocusStatus, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant, upsertUserFocus } from "./repository.js";
|
|
1
|
+
import { createUnderstandingSourceRun, deleteUserFocus, getUnderstandingSourceGrant, getUnderstandingSourceRun, listUnderstandingSourceGrants, listUnderstandingSourceRuns, listUserFocuses, revokeUnderstandingSourceGrant, setUserFocusStatus, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant, upsertUserFocus } from "./repository.js";
|
|
2
2
|
import { listUnderstandingSourceDefinitions } from "./catalog.js";
|
|
3
|
-
export { createUnderstandingSourceRun, getUnderstandingSourceGrant, getUnderstandingSourceRun, listUnderstandingSourceDefinitions, listUnderstandingSourceGrants, listUnderstandingSourceRuns, listUserFocuses, revokeUnderstandingSourceGrant, setUserFocusStatus, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant, upsertUserFocus };
|
|
3
|
+
export { createUnderstandingSourceRun, deleteUserFocus, getUnderstandingSourceGrant, getUnderstandingSourceRun, listUnderstandingSourceDefinitions, listUnderstandingSourceGrants, listUnderstandingSourceRuns, listUserFocuses, revokeUnderstandingSourceGrant, setUserFocusStatus, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant, upsertUserFocus };
|
|
@@ -38,3 +38,4 @@ export declare function upsertUserFocus(input: Omit<UserFocus, 'id' | 'createdAt
|
|
|
38
38
|
}): UserFocus;
|
|
39
39
|
export declare function listUserFocuses(statuses?: UserFocus['status'][]): UserFocus[];
|
|
40
40
|
export declare function setUserFocusStatus(id: string, status: UserFocus['status'], nowMs?: number): UserFocus | null;
|
|
41
|
+
export declare function deleteUserFocus(id: string): boolean;
|
|
@@ -166,5 +166,8 @@ function setUserFocusStatus(id, status, nowMs = Date.now()) {
|
|
|
166
166
|
const row = getSqliteDatabase().prepare("SELECT * FROM user_focuses WHERE focus_id = ?").get(id);
|
|
167
167
|
return row ? focusFromRow(row) : null;
|
|
168
168
|
}
|
|
169
|
+
function deleteUserFocus(id) {
|
|
170
|
+
return Number(getSqliteDatabase().prepare("DELETE FROM user_focuses WHERE focus_id = ?").run(id).changes) > 0;
|
|
171
|
+
}
|
|
169
172
|
//#endregion
|
|
170
|
-
export { createUnderstandingSourceRun, getUnderstandingSourceGrant, getUnderstandingSourceRun, listUnderstandingSourceGrants, listUnderstandingSourceRuns, listUserFocuses, revokeUnderstandingSourceGrant, setUserFocusStatus, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant, upsertUserFocus };
|
|
173
|
+
export { createUnderstandingSourceRun, deleteUserFocus, getUnderstandingSourceGrant, getUnderstandingSourceRun, listUnderstandingSourceGrants, listUnderstandingSourceRuns, listUserFocuses, revokeUnderstandingSourceGrant, setUserFocusStatus, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant, upsertUserFocus };
|
|
@@ -170,10 +170,10 @@ async function analyzeWorkContext(input) {
|
|
|
170
170
|
"You help a user resume real work in one explicitly selected local folder.",
|
|
171
171
|
"Analyze only the supplied bounded snapshot. Never claim that you ran commands, tests, or inspected anything absent from it.",
|
|
172
172
|
"Return only one JSON object with projectSummary, currentState, uncertainties, suggestions, profileCandidates, workThreads, lowConfidence, and contextQuestion.",
|
|
173
|
-
"profileCandidates contains
|
|
173
|
+
"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
174
|
"Each profile candidate has category (role, focus, technology, workflow, or preference), statement, confidence, and evidence.",
|
|
175
175
|
"Do not infer sensitive traits, identity, health, finances, political views, or anything not directly supported by the work evidence.",
|
|
176
|
-
"workThreads contains
|
|
176
|
+
"workThreads contains every distinct evidence-backed work stream with topicKey, title, summary, horizon, status, confidence, and evidenceRefs. Do not merge unrelated streams to force a fixed count.",
|
|
177
177
|
"horizon is current, ongoing, or long_term. status is active, paused, blocked, completed, or uncertain.",
|
|
178
178
|
"topicKey is a short stable topic identifier. evidenceRefs must use exact relative paths from the snapshot or git://recent-state.",
|
|
179
179
|
"Distinguish one-off recent edits from work sustained across multiple days. Prefer one current thread and only add ongoing or long_term threads when evidence supports them.",
|
|
@@ -219,8 +219,8 @@ async function analyzeWorkContext(input) {
|
|
|
219
219
|
result: lowConfidenceResult(input.snapshot)
|
|
220
220
|
};
|
|
221
221
|
const primarySuggestion = [...suggestions].sort((a, b) => suggestionScore(b) - suggestionScore(a))[0];
|
|
222
|
-
const profileCandidates = input.candidateContext?.length && Array.isArray(parsed.profileCandidates) ? parsed.profileCandidates.map((value) => validateProfileCandidate(value)).filter((value) => Boolean(value))
|
|
223
|
-
const workThreadCandidates = Array.isArray(parsed.workThreads) ? parsed.workThreads.map((value) => validateWorkThreadCandidate(value, allowedThreadRefs)).filter((value) => Boolean(value))
|
|
222
|
+
const profileCandidates = input.candidateContext?.length && Array.isArray(parsed.profileCandidates) ? parsed.profileCandidates.map((value) => validateProfileCandidate(value)).filter((value) => Boolean(value)) : [];
|
|
223
|
+
const workThreadCandidates = Array.isArray(parsed.workThreads) ? parsed.workThreads.map((value) => validateWorkThreadCandidate(value, allowedThreadRefs)).filter((value) => Boolean(value)) : [];
|
|
224
224
|
const projectSummary = typeof parsed.projectSummary === "string" ? parsed.projectSummary.trim() : "";
|
|
225
225
|
const currentState = typeof parsed.currentState === "string" ? parsed.currentState.trim() : "";
|
|
226
226
|
if (!projectSummary || !currentState) throw new Error("Analysis result is missing its summary");
|
|
@@ -269,10 +269,10 @@ async function analyzeUnderstandingSources(input) {
|
|
|
269
269
|
const prompt = [
|
|
270
270
|
"Analyze bounded context from sources the user explicitly chose to connect.",
|
|
271
271
|
"Return only one JSON object with profileCandidates and workThreads.",
|
|
272
|
-
"profileCandidates contains
|
|
272
|
+
"profileCandidates contains every distinct, stable, useful work-related fact with direct support. Do not pad the list.",
|
|
273
273
|
"Each item has category (role, focus, technology, workflow, or preference), statement, confidence, evidence, and evidenceRefs.",
|
|
274
274
|
"profileCandidates evidenceRefs must contain only supplied refs. Do not create a candidate without direct support.",
|
|
275
|
-
"workThreads contains
|
|
275
|
+
"workThreads contains every distinct evidence-backed current, ongoing, or long-term work stream. Do not merge unrelated streams to force a fixed count.",
|
|
276
276
|
"Each work thread has topicKey, title, summary, status, horizon, confidence, and evidenceRefs.",
|
|
277
277
|
"evidenceRefs must contain only supplied refs. Do not create a thread without direct support.",
|
|
278
278
|
"Synthesize across source types. Repeated independent signals are stronger than a single item.",
|
|
@@ -302,8 +302,8 @@ async function analyzeUnderstandingSources(input) {
|
|
|
302
302
|
const allowedRefs = new Set(items.map((item) => item.ref));
|
|
303
303
|
return {
|
|
304
304
|
modelRef,
|
|
305
|
-
profileCandidates: Array.isArray(parsed.profileCandidates) ? parsed.profileCandidates.map((value) => validateProfileCandidate(value, allowedRefs)).filter((value) => Boolean(value))
|
|
306
|
-
workThreadCandidates: Array.isArray(parsed.workThreads) ? parsed.workThreads.map((value) => validateWorkThreadCandidate(value, allowedRefs)).filter((value) => Boolean(value))
|
|
305
|
+
profileCandidates: Array.isArray(parsed.profileCandidates) ? parsed.profileCandidates.map((value) => validateProfileCandidate(value, allowedRefs)).filter((value) => Boolean(value)) : [],
|
|
306
|
+
workThreadCandidates: Array.isArray(parsed.workThreads) ? parsed.workThreads.map((value) => validateWorkThreadCandidate(value, allowedRefs)).filter((value) => Boolean(value)) : []
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
function workDiscoveryResultMarkdown(result) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.196",
|
|
4
4
|
"description": "Local-first AI system that remembers context, coordinates AI, and sustains long-term progress.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -163,8 +163,8 @@
|
|
|
163
163
|
"vitest": "4.1.5",
|
|
164
164
|
"vue": "^3.5.35",
|
|
165
165
|
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
166
|
-
"@xopcai/gateway-contract": "0.0.0",
|
|
167
166
|
"@xopcai/realtime-protocol": "0.0.0",
|
|
167
|
+
"@xopcai/gateway-contract": "0.0.0",
|
|
168
168
|
"@xopcai/realtime-client": "0.0.0"
|
|
169
169
|
},
|
|
170
170
|
"scripts": {
|