@xopcai/xopc 0.0.315 → 0.0.316
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BbFOF2SH.js → agent-avatar-dicebear-XIyH14Sn.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-D9T-QGmd.js → agent-defaults-settings-panel-DJl_o7Xf.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-Ds5sQcPd.js → agents-CGFhxPFv.js} +1 -1
- package/dist/gateway/static/root/assets/{api-BzloAiIG.js → api-Dy056n2_.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BpUHskXq.js → app-management-settings-panel-Dp7Fcj2Z.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CQd5Vo6f.js → appearance-settings-CSUffLjx.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-B7VIsfye.js → apps-page-DtIcKfJG.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-BM4O6WfL.js → archive-plugin-D3SdndlF.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-Cdn9MYmI.js → attachment-load-BgxXYRkd.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DnRx-Ra4.js → automations-page-krhofMgL.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-B5s10G5F.js → automations-workspace-EbpneB06.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-dkhUf4bm.js → binary-plugins-w6lazTqo.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BTzqEuAy.js → block-editor-CxHqPODE.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-Bowij-nJ.js → browser-automation-inputs-hNdEgfGG.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-CQ7SYTQj.js → browser-automations-page-BYsGJ_xs.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-vqLoPOOg.js → browser-settings-page-CP_c5q0V.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-DI68WGYd.js → capabilities-settings-panel-ljW3s3vv.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-Cimssy-S.js → channels-settings-CR9SRgFp.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DzgFHd6l.js → chat-terminal-dock-medSiQoQ.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-380_vIqO.js → computer-settings-page-DJxO0CfY.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-DILFakXb.js → connector-service-page-WaoUqr8a.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-COmFp9HC.js → connectors-page-KIi15pQl.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-CRVun-T5.js → date-picker-DalDr0E6.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-BoWqt5yU.js → dependency-picker-ONChq2Yr.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-DPlkBjft.js → desktop-pet-b1a37SVn.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-D7FgfX_K.js → desktop-pet-settings-CwqZxGv4.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-BP6yxut8.js → device-pairing-wizard-C_MNpS30.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CT_QkSN_.js → extension-debug-page-CGthPGca.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BF1NdcKP.js → extension-page-CExNJs0G.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CKQVZ3Xc.js → extension-settings-page-DBfxzKR8.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BPsZPoAT.js → gateway-config-swr-DFjsI4QK.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-3bIy7XMr.js → gateway-settings-BlpheZrf.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-cG6EqUJw.js → gateway-startup-retry-oRRqSoe9.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-DFNDLFgv.js → home-page-BvdT-uaI.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-DI_QutIx.js → image-generation-api-CyDy_Sxu.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-BUG6G72F.js → imports-page-Dnp2hmFL.js} +1 -1
- package/dist/gateway/static/root/assets/index-BYKatjhB.css +1 -0
- package/dist/gateway/static/root/assets/{index-BCi8nfxs.js → index-DhCnwCI9.js} +38 -38
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-qnG-4FJs.js → keyboard-shortcuts-settings-1DUcGrYh.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-B3iJWhjN.js → local-app-workbench-page-BW2-80Og.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-BpEGeURS.js → local-apps-page-C7_2zyV_.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BlgpZORR.js → locale-store-D6VmRI5e.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-0QPGj-5c.js → logs-page-Cbr7bPM6.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-Sl0wwidS.js → management-settings-G7GcFx2_.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-BzjjpL2H.js → markdown-view-B5MfZeKH.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Bzkdhotn.js → media-plugins-IbcEpV96.js} +1 -1
- package/dist/gateway/static/root/assets/messages-BCqLsIZK.js +3 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-BXtD71j1.js → note-detail-panel-C4DiKkDf.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-page-DNY4vW-u.js → notes-page-DgHQmpVq.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-CFt4hXQ6.js → page-context-capture-button-B5rZ_F0R.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-Dz_x22MQ.js → page-tabs-B84Yghg5.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-C1mkgFAl.js → preview-open-alternatives-CaEtDmZO.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-DHZgzSDV.js → product-open-page-BK9z5b-v.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-D3NhZ7ZZ.js → project-detail-page-Qj8Xb9qS.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-CEr8DX9I.js → projects-page-BOp6swwM.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-DMW2apOO.js → registry-api-sOL6E5LU.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-Db-B-Mf3.js → remote-access-hub-yb8l4ppq.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DEJi0BLL.js → runtime-tools-settings-panel-BAvzw1T0.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-BUUX-PnI.js → scenes-page-CiAgb7hf.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-RVltVpuG.js → schema-form-Dytkw9RZ.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-Rm4H2okS.js → sessions-page-43hcOW84.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-C414vr2V.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BkBO7woF.js → settings-form-section-DBJlmKQV.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-zl0XY203.js → settings-page-C9GbP-ZG.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-lLvHc-zF.js → settings-page-layout-OvBOGen7.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-Difrpr4T.js → setup-status-panel-BCMym4xj.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-NC4Gj867.js → share-preview-page-D-sx26yN.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-DPLvEcB-.js → shares-settings-EdNGhsuF.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DYYM1qVn.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-CzekvBNQ.js → skills-page-Cgrfnet5.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-BLeiN245.js → skills-page.utils-COPGVfmB.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-Bp75s9nl.js → system-settings-panel-B9tptggE.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-Bh8H4FYR.js → task-detail-page-BrsM6Xmm.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-BDiaC6an.js → tunnel-api-qb33IFGP.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-C_ntK_Zu.js → use-autosave-DfhqCGRX.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-C7gFCGAV.js → user-model-page-Sg94U7zz.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-D4cfuMp1.js → voice-api-key-field-taBVzvtI.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-Cjvd6maH.js → voice-config-api-B4yjd1Kb.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-Ce6ToB0O.js → work-discovery-overlay-DWGTB3Uk.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-C80nrmKi.js → workflow-run-setup-panel-CP58uTNh.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-CVQjo3RI.js → workflows-page-Clka1xiQ.js} +1 -1
- package/dist/gateway/static/root/index.html +8 -8
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +18 -17
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- 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/embedded/run-turn.js +28 -15
- package/dist/src/agent/embedded/system-prompt-override.js +14 -3
- package/dist/src/agent/embedded/xopc-stream-bridge.js +13 -2
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/memory/context-budget.js +1 -1
- package/dist/src/agent/orchestration/agent-turn-policy.d.ts +2 -2
- package/dist/src/agent/prompt/agent-system-prompt.d.ts +3 -0
- package/dist/src/agent/prompt/agent-system-prompt.js +16 -0
- 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/tools/knowledge-memory-tool.js +1 -0
- package/dist/src/agent-config/schema.d.ts +8 -8
- package/dist/src/ai-assist/text-assist.js +3 -2
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- 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/chat-commands/agent-edit.js +1 -1
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +3 -3
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/computer/runtime.js +1 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +2 -2
- package/dist/src/config/schema.d.ts +5 -5
- package/dist/src/config/schema.js +1 -1
- package/dist/src/connectors/connected-source-ingestion.d.ts +1 -0
- package/dist/src/connectors/connected-source-ingestion.js +1 -0
- package/dist/src/connectors/connected-source-understanding.d.ts +1 -0
- package/dist/src/connectors/connected-source-understanding.js +91 -31
- package/dist/src/connectors/content-enrichment.d.ts +1 -0
- package/dist/src/connectors/content-enrichment.js +3 -1
- package/dist/src/connectors/learning-coordinator.js +24 -24
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/chat-stream/mapper.js +9 -4
- package/dist/src/gateway/chat-stream/protocol.d.ts +2 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +2 -2
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/user-model-refresh.js +2 -2
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service.js +5 -5
- package/dist/src/knowledge/ingestion-service.d.ts +5 -2
- package/dist/src/knowledge/ingestion-service.js +24 -15
- package/dist/src/knowledge-memory/domain.d.ts +1 -1
- package/dist/src/notes/service.js +1 -1
- package/dist/src/platform/client.d.ts +1 -1
- package/dist/src/platform/contracts.d.ts +1 -1
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/extension-stream-bridge.js +6 -4
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-call.js +3 -3
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/presentation.js +4 -3
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/storage/sqlite/context-extraction-repository.d.ts +1 -2
- package/dist/src/storage/sqlite/context-extraction-repository.js +1 -9
- package/dist/src/storage/sqlite/index.d.ts +1 -2
- package/dist/src/storage/sqlite/index.js +2 -3
- package/dist/src/storage/sqlite/knowledge-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/knowledge-repository.js +3 -0
- package/dist/src/storage/sqlite/migrations/200_connected_work_threads.sql +92 -0
- package/dist/src/storage/sqlite/migrations/201_connector_extraction_audit.sql +127 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +4 -4
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/schema.sql +1 -1
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +2 -2
- package/dist/src/user-context/domain.d.ts +0 -13
- package/dist/src/user-context/sources/index.js +2 -2
- package/dist/src/user-context/sources/repository.d.ts +10 -0
- package/dist/src/user-context/sources/repository.js +19 -4
- package/dist/src/user-context/sources/types.d.ts +1 -0
- package/dist/src/voice/tts/audio.js +1 -1
- package/dist/src/work-discovery/service.js +2 -2
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +7 -7
- package/dist/gateway/static/root/assets/index-DWgd1VK2.css +0 -1
- package/dist/gateway/static/root/assets/messages-2GhUD7SC.js +0 -3
- package/dist/gateway/static/root/assets/settings-advanced-gate-VxPItcOG.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-CKdLCf_-.js +0 -1
- package/dist/src/storage/sqlite/context-relation-repository.d.ts +0 -50
- package/dist/src/storage/sqlite/context-relation-repository.js +0 -98
|
@@ -6,9 +6,9 @@ import { getSessionMetadata } from "../../storage/sqlite/session-read-repository
|
|
|
6
6
|
import "../../storage/sqlite/index.js";
|
|
7
7
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
8
8
|
import { init_agent_scope, listAgentEntries, normalizeAgentId } from "../../agent/agent-scope.js";
|
|
9
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
9
10
|
import { createConversation, init_conversation_repository } from "../../storage/sqlite/conversation-repository.js";
|
|
10
11
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../../routing/agent-session-key.js";
|
|
11
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
12
12
|
import { effectiveWorkspacePathForSession } from "../../session/session-workspace.js";
|
|
13
13
|
import { ProjectService } from "../../projects/project-service.js";
|
|
14
14
|
import { inferSuggestedProjectDefaultAgentId } from "../../projects/project-agent-suggestion.js";
|
|
@@ -2,9 +2,9 @@ import { closeXopcDatabase, isXopcDatabaseOpen, openXopcDatabase } from "../stor
|
|
|
2
2
|
import { TaskRepository } from "../tasks/task-repository.js";
|
|
3
3
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
4
4
|
import "../storage/sqlite/index.js";
|
|
5
|
-
import { init_agent_session_key, isValidAgentId, normalizeAgentId } from "../routing/agent-session-key.js";
|
|
6
5
|
import { resolveConfigPath } from "../config/paths.js";
|
|
7
6
|
import { loadConfig } from "../config/loader.js";
|
|
7
|
+
import { init_agent_session_key, isValidAgentId, normalizeAgentId } from "../routing/agent-session-key.js";
|
|
8
8
|
import { init_providers, providerSupportsOAuth } from "../providers/index.js";
|
|
9
9
|
import { ProjectService } from "../projects/project-service.js";
|
|
10
10
|
import { isValidProjectAgentId, normalizeProjectAgentId } from "../projects/project-agent.js";
|
|
@@ -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 { listConnectorInstances } from "../connectors/instances.js";
|
|
6
6
|
import { createSkillConfigManager, isSkillEnabled } from "../agent/skills/config.js";
|
package/dist/src/tui/tui.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { version } from "../../package.js";
|
|
2
2
|
import { resolveStateDir, resolveXopcDatabasePath } from "../config/paths-state.js";
|
|
3
|
-
import { init_agent_session_key, normalizeAgentId } from "../routing/agent-session-key.js";
|
|
4
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
5
3
|
import { init_paths } from "../config/paths.js";
|
|
6
4
|
import { loadConfig } from "../config/loader.js";
|
|
5
|
+
import { init_agent_session_key, normalizeAgentId } from "../routing/agent-session-key.js";
|
|
7
6
|
import { getAllModels, getAllProviders, getApiKey, init_providers, isProviderConfiguredSync } from "../providers/index.js";
|
|
7
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
8
8
|
import { ProjectTrustStore, hasTrustRequiringProjectResources } from "../project-trust/trust-store.js";
|
|
9
9
|
import { MAX_WEBCHAT_ATTACHMENT_FILE_BYTES } from "../gateway/chat-limits.js";
|
|
10
10
|
import { renderWorkflowFinalSummary, renderWorkflowPanel } from "../agent/workflow/snapshot.js";
|
|
@@ -52,19 +52,6 @@ export type CollaborationRule = {
|
|
|
52
52
|
createdAt: number;
|
|
53
53
|
updatedAt: number;
|
|
54
54
|
};
|
|
55
|
-
export type PersonalizationItem = {
|
|
56
|
-
objectType: 'profile' | 'rule' | 'focus' | 'understanding';
|
|
57
|
-
objectId: string;
|
|
58
|
-
versionId?: string;
|
|
59
|
-
decision: 'selected' | 'irrelevant' | 'expired' | 'scope_mismatch' | 'sensitive' | 'needs_consent' | 'budget_exceeded' | 'conflicted' | 'disabled';
|
|
60
|
-
reason: string;
|
|
61
|
-
content: string;
|
|
62
|
-
sourceLabel: string;
|
|
63
|
-
origin: 'told_by_user' | 'observed' | 'inferred' | 'connected_source';
|
|
64
|
-
rank?: number;
|
|
65
|
-
score?: number;
|
|
66
|
-
injectedChars: number;
|
|
67
|
-
};
|
|
68
55
|
export type ContextEvidence = {
|
|
69
56
|
id: string;
|
|
70
57
|
sourceType: 'conversation' | 'connector' | 'user' | 'runtime';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createUnderstandingSourceRun, getUnderstandingSourceGrant, getUnderstandingSourceRun, listUnderstandingSourceGrants, listUnderstandingSourceRuns, revokeUnderstandingSourceGrant, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceGrantPolicies, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant } from "./repository.js";
|
|
1
|
+
import { createUnderstandingSourceRun, getConnectorUnderstandingSourceRun, getOrCreateConnectorUnderstandingSourceRun, getUnderstandingSourceGrant, getUnderstandingSourceRun, listUnderstandingSourceGrants, listUnderstandingSourceRuns, revokeUnderstandingSourceGrant, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceGrantPolicies, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant } from "./repository.js";
|
|
2
2
|
import { clusterUnderstandingSignals, tokenizeUnderstandingSignal } from "./signal-clustering.js";
|
|
3
3
|
import { listUnderstandingSourceDefinitions } from "./catalog.js";
|
|
4
|
-
export { clusterUnderstandingSignals, createUnderstandingSourceRun, getUnderstandingSourceGrant, getUnderstandingSourceRun, listUnderstandingSourceDefinitions, listUnderstandingSourceGrants, listUnderstandingSourceRuns, revokeUnderstandingSourceGrant, tokenizeUnderstandingSignal, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceGrantPolicies, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant };
|
|
4
|
+
export { clusterUnderstandingSignals, createUnderstandingSourceRun, getConnectorUnderstandingSourceRun, getOrCreateConnectorUnderstandingSourceRun, getUnderstandingSourceGrant, getUnderstandingSourceRun, listUnderstandingSourceDefinitions, listUnderstandingSourceGrants, listUnderstandingSourceRuns, revokeUnderstandingSourceGrant, tokenizeUnderstandingSignal, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceGrantPolicies, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant };
|
|
@@ -24,10 +24,20 @@ export declare function createUnderstandingSourceRun(input: {
|
|
|
24
24
|
grantId: string;
|
|
25
25
|
kind: UnderstandingSourceRun['kind'];
|
|
26
26
|
status?: UnderstandingSourceRun['status'];
|
|
27
|
+
connectorLearningJobId?: string;
|
|
27
28
|
cursorBefore?: string;
|
|
28
29
|
metadata?: Record<string, unknown>;
|
|
29
30
|
nowMs?: number;
|
|
30
31
|
}): UnderstandingSourceRun;
|
|
32
|
+
export declare function getConnectorUnderstandingSourceRun(connectorLearningJobId: string): UnderstandingSourceRun | null;
|
|
33
|
+
export declare function getOrCreateConnectorUnderstandingSourceRun(input: {
|
|
34
|
+
grantId: string;
|
|
35
|
+
connectorLearningJobId: string;
|
|
36
|
+
kind: UnderstandingSourceRun['kind'];
|
|
37
|
+
status?: UnderstandingSourceRun['status'];
|
|
38
|
+
metadata?: Record<string, unknown>;
|
|
39
|
+
nowMs?: number;
|
|
40
|
+
}): UnderstandingSourceRun;
|
|
31
41
|
export declare function getUnderstandingSourceRun(id: string): UnderstandingSourceRun | null;
|
|
32
42
|
export declare function listUnderstandingSourceRuns(grantId: string, limit?: number): UnderstandingSourceRun[];
|
|
33
43
|
export declare function updateUnderstandingSourceRun(id: string, patch: {
|
|
@@ -35,6 +35,7 @@ function runFromRow(row) {
|
|
|
35
35
|
id: row.run_id,
|
|
36
36
|
grantId: row.grant_id,
|
|
37
37
|
kind: row.kind,
|
|
38
|
+
...row.connector_learning_job_id ? { connectorLearningJobId: row.connector_learning_job_id } : {},
|
|
38
39
|
status: row.status,
|
|
39
40
|
...row.cursor_before ? { cursorBefore: row.cursor_before } : {},
|
|
40
41
|
...row.cursor_after ? { cursorAfter: row.cursor_after } : {},
|
|
@@ -104,11 +105,25 @@ function createUnderstandingSourceRun(input) {
|
|
|
104
105
|
const now = input.nowMs ?? Date.now();
|
|
105
106
|
runSqliteWriteTransaction((db) => db.prepare(`
|
|
106
107
|
INSERT INTO understanding_source_runs (
|
|
107
|
-
run_id, grant_id, kind, status, cursor_before, metadata_json, started_at
|
|
108
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
109
|
-
`).run(id, input.grantId, input.kind, input.status ?? "running", input.cursorBefore ?? null, JSON.stringify(input.metadata ?? {}), now));
|
|
108
|
+
run_id, grant_id, connector_learning_job_id, kind, status, cursor_before, metadata_json, started_at
|
|
109
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
110
|
+
`).run(id, input.grantId, input.connectorLearningJobId ?? null, input.kind, input.status ?? "running", input.cursorBefore ?? null, JSON.stringify(input.metadata ?? {}), now));
|
|
110
111
|
return getUnderstandingSourceRun(id);
|
|
111
112
|
}
|
|
113
|
+
function getConnectorUnderstandingSourceRun(connectorLearningJobId) {
|
|
114
|
+
const row = getSqliteDatabase().prepare("SELECT * FROM understanding_source_runs WHERE connector_learning_job_id = ?").get(connectorLearningJobId);
|
|
115
|
+
return row ? runFromRow(row) : null;
|
|
116
|
+
}
|
|
117
|
+
function getOrCreateConnectorUnderstandingSourceRun(input) {
|
|
118
|
+
const id = randomUUID();
|
|
119
|
+
const now = input.nowMs ?? Date.now();
|
|
120
|
+
runSqliteWriteTransaction((db) => db.prepare(`
|
|
121
|
+
INSERT OR IGNORE INTO understanding_source_runs (
|
|
122
|
+
run_id, grant_id, connector_learning_job_id, kind, status, metadata_json, started_at
|
|
123
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
124
|
+
`).run(id, input.grantId, input.connectorLearningJobId, input.kind, input.status ?? "running", JSON.stringify(input.metadata ?? {}), now));
|
|
125
|
+
return getConnectorUnderstandingSourceRun(input.connectorLearningJobId);
|
|
126
|
+
}
|
|
112
127
|
function getUnderstandingSourceRun(id) {
|
|
113
128
|
const row = getSqliteDatabase().prepare("SELECT * FROM understanding_source_runs WHERE run_id = ?").get(id);
|
|
114
129
|
return row ? runFromRow(row) : null;
|
|
@@ -127,4 +142,4 @@ function updateUnderstandingSourceRun(id, patch) {
|
|
|
127
142
|
return getUnderstandingSourceRun(id);
|
|
128
143
|
}
|
|
129
144
|
//#endregion
|
|
130
|
-
export { createUnderstandingSourceRun, getUnderstandingSourceGrant, getUnderstandingSourceRun, listUnderstandingSourceGrants, listUnderstandingSourceRuns, revokeUnderstandingSourceGrant, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceGrantPolicies, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant };
|
|
145
|
+
export { createUnderstandingSourceRun, getConnectorUnderstandingSourceRun, getOrCreateConnectorUnderstandingSourceRun, getUnderstandingSourceGrant, getUnderstandingSourceRun, listUnderstandingSourceGrants, listUnderstandingSourceRuns, revokeUnderstandingSourceGrant, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceGrantPolicies, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant };
|
|
@@ -63,6 +63,7 @@ export interface UnderstandingSourceCollectionResult {
|
|
|
63
63
|
export interface UnderstandingSourceRun {
|
|
64
64
|
id: string;
|
|
65
65
|
grantId: string;
|
|
66
|
+
connectorLearningJobId?: string;
|
|
66
67
|
kind: 'preview' | 'bootstrap' | 'incremental' | 'fingerprint';
|
|
67
68
|
status: 'queued' | 'running' | 'completed' | 'partial' | 'failed' | 'canceled';
|
|
68
69
|
cursorBefore?: string;
|
|
@@ -2,8 +2,8 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { join } from "path";
|
|
4
4
|
import { unlink, writeFile } from "fs/promises";
|
|
5
|
-
import { tmpdir } from "os";
|
|
6
5
|
import { spawn } from "child_process";
|
|
6
|
+
import { tmpdir } from "os";
|
|
7
7
|
//#region src/voice/tts/audio.ts
|
|
8
8
|
/**
|
|
9
9
|
* Audio Compression Utilities
|
|
@@ -8,15 +8,15 @@ import { ActivityService } from "../activity/service.js";
|
|
|
8
8
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
9
9
|
import { init_session_key, resolveConversationId } from "../routing/session-key.js";
|
|
10
10
|
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
11
|
-
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
12
11
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
12
|
+
import { isLocalModelBaseUrl } from "../providers/model-call.js";
|
|
13
|
+
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
13
14
|
import { writeKnowledgeItem } from "../knowledge-memory/repository.js";
|
|
14
15
|
import "../knowledge-memory/index.js";
|
|
15
16
|
import { createWorkDiscoveryRun, getProjectUnderstandingRun, getWorkDiscoveryOnboardingState, getWorkDiscoveryRun, getWorkDiscoveryRunByIdempotencyKey, listPendingProjectUnderstandingRuns, setWorkDiscoveryFeedback, setWorkDiscoveryOnboardingState, updateWorkDiscoveryRun } from "./repository.js";
|
|
16
17
|
import { createPriorityWindow, createUserGoal } from "../user-model/goals.js";
|
|
17
18
|
import { linkAssertionEvidence, reconcileAssertion } from "../user-model/repository.js";
|
|
18
19
|
import "../user-model/index.js";
|
|
19
|
-
import { isLocalModelBaseUrl } from "../providers/model-call.js";
|
|
20
20
|
import { allowsRemoteSourceProcessing } from "../user-context/sources/processing-policy.js";
|
|
21
21
|
import { analyzeUnderstandingSources, analyzeWorkContext, workDiscoveryResultMarkdown } from "./analyzer.js";
|
|
22
22
|
import { createUnderstandingSourceRun, getUnderstandingSourceGrant, getUnderstandingSourceRun, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceGrantPolicies, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant } from "../user-context/sources/repository.js";
|
|
@@ -2,8 +2,8 @@ import { TaskRepository, init_task_repository } from "../../tasks/task-repositor
|
|
|
2
2
|
import { TaskRunRepository, init_task_run_repository } from "../../tasks/task-run-repository.js";
|
|
3
3
|
import { init_conversation_repository, resolveRoutedConversation } from "../../storage/sqlite/conversation-repository.js";
|
|
4
4
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
5
|
-
import { extractProfileAgentId, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
5
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
6
|
+
import { extractProfileAgentId, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
7
7
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
8
8
|
import { getProjectWorkspacePathForSession } from "../../projects/workspace.js";
|
|
9
9
|
import { publishAutomationProductEvent } from "../../automations/product-events.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.316",
|
|
4
4
|
"description": "Local-first personal AI for the one-person company, with durable context, tasks, workflows, automations, and local or cloud models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@composio/core": "0.18.1",
|
|
69
|
-
"@earendil-works/pi-agent-core": "0.
|
|
70
|
-
"@earendil-works/pi-ai": "0.
|
|
71
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
72
|
-
"@earendil-works/pi-tui": "0.
|
|
69
|
+
"@earendil-works/pi-agent-core": "0.87.0",
|
|
70
|
+
"@earendil-works/pi-ai": "0.87.0",
|
|
71
|
+
"@earendil-works/pi-coding-agent": "0.87.0",
|
|
72
|
+
"@earendil-works/pi-tui": "0.87.0",
|
|
73
73
|
"@grammyjs/runner": "^2.0.3",
|
|
74
74
|
"@hono/node-server": "^2.0.4",
|
|
75
75
|
"@inquirer/prompts": "^8.5.0",
|
|
@@ -174,8 +174,8 @@
|
|
|
174
174
|
"@xopcai/endpoint-tools-client": "0.0.0",
|
|
175
175
|
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
176
176
|
"@xopcai/gateway-contract": "0.0.0",
|
|
177
|
-
"@xopcai/realtime-
|
|
178
|
-
"@xopcai/realtime-
|
|
177
|
+
"@xopcai/realtime-client": "0.0.0",
|
|
178
|
+
"@xopcai/realtime-protocol": "0.0.0"
|
|
179
179
|
},
|
|
180
180
|
"scripts": {
|
|
181
181
|
"assets:brand": "node scripts/generate-brand-assets.mjs",
|