@xopcai/xopc 0.0.256 → 0.0.258

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.
Files changed (139) hide show
  1. package/dist/browser-ext/manifest.json +1 -1
  2. package/dist/extensions/telegram/xopc.extension.json +1 -1
  3. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BZJZvmYw.js → agent-avatar-dicebear-D7tpOS12.js} +1 -1
  4. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DGHLpxj_.js +1 -0
  5. package/dist/gateway/static/root/assets/{agents-1vtaw07m.js → agents-DDiR9MCE.js} +1 -1
  6. package/dist/gateway/static/root/assets/{app-management-settings-panel-DG64SQsx.js → app-management-settings-panel-xtMKAVbv.js} +1 -1
  7. package/dist/gateway/static/root/assets/{appearance-settings-BRWQdIIy.js → appearance-settings-Cngeu2w8.js} +1 -1
  8. package/dist/gateway/static/root/assets/{apps-page-D3ziBisx.js → apps-page-CXiCvD0B.js} +1 -1
  9. package/dist/gateway/static/root/assets/{archive-plugin-D3FQ9VzV.js → archive-plugin-DXKFrMNm.js} +1 -1
  10. package/dist/gateway/static/root/assets/{attachment-load-Cid3dBaW.js → attachment-load-DLYGTBVf.js} +1 -1
  11. package/dist/gateway/static/root/assets/{automations-page-BUTNaZtj.js → automations-page-BTp6bGo4.js} +1 -1
  12. package/dist/gateway/static/root/assets/automations-workspace-CuyEKO6M.js +6 -0
  13. package/dist/gateway/static/root/assets/{binary-plugins-BSYMCuaB.js → binary-plugins-BcvVtSvZ.js} +1 -1
  14. package/dist/gateway/static/root/assets/{block-editor-qDlC3t7b.js → block-editor-hZg3H6K-.js} +3 -3
  15. package/dist/gateway/static/root/assets/{browser-automations-page-Du1KVE01.js → browser-automations-page-COsWjB_N.js} +2 -2
  16. package/dist/gateway/static/root/assets/browser-settings-page-D9CfpBLt.js +8 -0
  17. package/dist/gateway/static/root/assets/capabilities-settings-panel-CEOmYG_f.js +7 -0
  18. package/dist/gateway/static/root/assets/channels-settings-DS3vq4cr.js +1 -0
  19. package/dist/gateway/static/root/assets/{chat-terminal-dock-CY-I_bCe.js → chat-terminal-dock-CmV1RMyj.js} +2 -2
  20. package/dist/gateway/static/root/assets/connectors-page-C51TR-Ov.js +2 -0
  21. package/dist/gateway/static/root/assets/{cron-expression-z4WOWyBU.js → cron-expression-DsEb7fyV.js} +1 -1
  22. package/dist/gateway/static/root/assets/{date-picker-vKUcJeQZ.js → date-picker-ChR8KQ7f.js} +1 -1
  23. package/dist/gateway/static/root/assets/{dependency-picker-BpZ9A2gi.js → dependency-picker-DGz0raEu.js} +1 -1
  24. package/dist/gateway/static/root/assets/{desktop-pet-ClrAMqgn.js → desktop-pet-_nHlkhRg.js} +1 -1
  25. package/dist/gateway/static/root/assets/{desktop-pet-settings-DKNKGiEG.js → desktop-pet-settings-B_tVwGUL.js} +1 -1
  26. package/dist/gateway/static/root/assets/{extension-debug-page-C39hFkJm.js → extension-debug-page-DJttDDUz.js} +1 -1
  27. package/dist/gateway/static/root/assets/{extension-page-DkqVsWB7.js → extension-page-vv7-Kg1n.js} +1 -1
  28. package/dist/gateway/static/root/assets/{extension-settings-page-Be4lFw8f.js → extension-settings-page-BpsPHT1o.js} +1 -1
  29. package/dist/gateway/static/root/assets/gateway-settings-BrIcafAP.js +1 -0
  30. package/dist/gateway/static/root/assets/heartbeat-settings-BIqk_r9f.js +1 -0
  31. package/dist/gateway/static/root/assets/home-page-DQxTTwVp.js +1 -0
  32. package/dist/gateway/static/root/assets/index-B1zcAf8-.css +2 -0
  33. package/dist/gateway/static/root/assets/{index-BWdn9NaX.js → index-DfvY-SO6.js} +19 -19
  34. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-ge76J038.js → keyboard-shortcuts-settings-CjUFDVZk.js} +1 -1
  35. package/dist/gateway/static/root/assets/local-app-workbench-page-Cl4VINRc.js +2 -0
  36. package/dist/gateway/static/root/assets/{local-apps-page-gkw7VRL4.js → local-apps-page-DNK11iaj.js} +1 -1
  37. package/dist/gateway/static/root/assets/{logs-page-HHtDMSUW.js → logs-page-Cqy0hmu5.js} +2 -2
  38. package/dist/gateway/static/root/assets/{management-settings-DOfCSojd.js → management-settings-LejmrKSf.js} +1 -1
  39. package/dist/gateway/static/root/assets/{media-plugins-D8wMcUtB.js → media-plugins-BFQxVZ03.js} +1 -1
  40. package/dist/gateway/static/root/assets/{mobile-pairing-wizard-B4Ewewwr.js → mobile-pairing-wizard-DfT_mH8L.js} +1 -1
  41. package/dist/gateway/static/root/assets/note-detail-panel-CvFzG1Bp.js +5 -0
  42. package/dist/gateway/static/root/assets/notes-page-k297u-gH.js +8 -0
  43. package/dist/gateway/static/root/assets/{page-tabs-DoxnT3X4.js → page-tabs-CMZs-2FR.js} +1 -1
  44. package/dist/gateway/static/root/assets/{preview-open-alternatives-D4oL1yua.js → preview-open-alternatives-BUprGPfS.js} +1 -1
  45. package/dist/gateway/static/root/assets/project-detail-page-CXcG3Su-.js +1 -0
  46. package/dist/gateway/static/root/assets/projects-page-BaOV7aDd.js +1 -0
  47. package/dist/gateway/static/root/assets/remote-access-hub-WY2alRLt.js +1 -0
  48. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CrOpchy5.js → runtime-tools-settings-panel-BIrnrKec.js} +2 -2
  49. package/dist/gateway/static/root/assets/{schema-form-Dk52v4cQ.js → schema-form-CjQ582_7.js} +1 -1
  50. package/dist/gateway/static/root/assets/sessions-page-CUIrWSsD.js +1 -0
  51. package/dist/gateway/static/root/assets/settings-advanced-gate-BOdZicC_.js +1 -0
  52. package/dist/gateway/static/root/assets/{settings-form-section-dvGi1APN.js → settings-form-section-d1SWWFyj.js} +1 -1
  53. package/dist/gateway/static/root/assets/{settings-page-CEYjEm2D.js → settings-page-CeSoibS9.js} +1 -1
  54. package/dist/gateway/static/root/assets/setup-status-panel-DfUt3_r7.js +1 -0
  55. package/dist/gateway/static/root/assets/{share-preview-page-DP4Qgsv6.js → share-preview-page-D7MJNTsV.js} +1 -1
  56. package/dist/gateway/static/root/assets/shares-settings-BS2kgw-8.js +1 -0
  57. package/dist/gateway/static/root/assets/{skill-reload-api-BicZK04u.js → skill-reload-api-BrEpq0C1.js} +1 -1
  58. package/dist/gateway/static/root/assets/{skills-page-Dlr1Ue1w.js → skills-page-DTFxG_j4.js} +1 -1
  59. package/dist/gateway/static/root/assets/{skills-page.utils-I1wcnceD.js → skills-page.utils-Co0GHVOk.js} +1 -1
  60. package/dist/gateway/static/root/assets/{system-settings-panel-DIaFAHT0.js → system-settings-panel-Cu9GTXm7.js} +1 -1
  61. package/dist/gateway/static/root/assets/task-detail-page-Dg3NARt6.js +1 -0
  62. package/dist/gateway/static/root/assets/{tunnel-api-DAXx1rHF.js → tunnel-api-cyxe_LpB.js} +1 -1
  63. package/dist/gateway/static/root/assets/{use-autosave-BwEFbveP.js → use-autosave-YQ_35Glb.js} +1 -1
  64. package/dist/gateway/static/root/assets/user-model-page-BZMPfbEY.js +2 -0
  65. package/dist/gateway/static/root/assets/{voice-api-key-field-C-WbC2fM.js → voice-api-key-field-1e1_bhD3.js} +1 -1
  66. package/dist/gateway/static/root/assets/{work-discovery-overlay-DiGw5KKj.js → work-discovery-overlay-Ur-4XdYe.js} +1 -1
  67. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BIU2wg99.js → workflow-run-setup-panel-Bn8Y5Xq4.js} +2 -2
  68. package/dist/gateway/static/root/assets/workflows-page-DCh0jiOu.js +6 -0
  69. package/dist/gateway/static/root/index.html +2 -2
  70. package/dist/package.js +1 -1
  71. package/dist/packages/gateway-contract/src/notifications.js +8 -1
  72. package/dist/src/agent/agent-manager.js +4 -4
  73. package/dist/src/agent/background-review/run-background-review.js +1 -1
  74. package/dist/src/agent/embedded/model-runtime.js +1 -1
  75. package/dist/src/agent/embedded/run-for-session.js +1 -1
  76. package/dist/src/agent/image/tool-model-config.js +1 -1
  77. package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
  78. package/dist/src/agent/service.js +2 -2
  79. package/dist/src/agent/session/session-inspector.js +1 -1
  80. package/dist/src/agent/skills/hub-lock.js +1 -1
  81. package/dist/src/agent/tasks/task-judge-service.js +3 -3
  82. package/dist/src/ai-assist/text-assist.js +1 -1
  83. package/dist/src/auth/credentials.js +2 -2
  84. package/dist/src/auth/oauth/xopc-cloud.js +1 -1
  85. package/dist/src/auth/profiles/store.js +1 -1
  86. package/dist/src/auth/sync-provider-auth.js +2 -2
  87. package/dist/src/browser/providers/browser-ext-install.js +1 -1
  88. package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
  89. package/dist/src/cli/commands/models.js +1 -1
  90. package/dist/src/config/index.js +4 -4
  91. package/dist/src/config/loader.js +2 -2
  92. package/dist/src/config/models-json.js +1 -1
  93. package/dist/src/connectors/connected-source-understanding.js +1 -4
  94. package/dist/src/extensions/lockfile.js +1 -1
  95. package/dist/src/gateway/agents-admin.js +1 -1
  96. package/dist/src/gateway/file-path-classifier.js +1 -1
  97. package/dist/src/gateway/hono/lib/config-payload.js +1 -1
  98. package/dist/src/gateway/hono/routes/models.js +1 -1
  99. package/dist/src/gateway/hono/routes/user-model.js +39 -8
  100. package/dist/src/gateway/hono/routes/workflows.js +2 -2
  101. package/dist/src/gateway/service/config-coordinator.js +1 -1
  102. package/dist/src/gateway/service.js +4 -4
  103. package/dist/src/notifications/planner.js +35 -0
  104. package/dist/src/notifications/service.js +2 -0
  105. package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
  106. package/dist/src/providers/index.js +2 -2
  107. package/dist/src/providers/model-registry.js +1 -1
  108. package/dist/src/providers/register-runtime-providers.js +1 -1
  109. package/dist/src/tui/tui-startup-resources.js +1 -1
  110. package/dist/src/tui/tui.js +2 -2
  111. package/dist/src/user-model/index.js +2 -2
  112. package/dist/src/user-model/repository.d.ts +8 -0
  113. package/dist/src/user-model/repository.js +89 -1
  114. package/dist/src/work-discovery/service.js +2 -5
  115. package/dist/src/workflows/service/workflow-run-service.js +1 -1
  116. package/package.json +4 -4
  117. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-Bq7GNF1L.js +0 -1
  118. package/dist/gateway/static/root/assets/automations-workspace-D4NJSE8l.js +0 -6
  119. package/dist/gateway/static/root/assets/browser-settings-page-WZ0Jt5Hp.js +0 -8
  120. package/dist/gateway/static/root/assets/capabilities-settings-panel-D1AYoRx4.js +0 -7
  121. package/dist/gateway/static/root/assets/channels-settings-CZnlYu2L.js +0 -1
  122. package/dist/gateway/static/root/assets/connectors-page-CkH3gaqs.js +0 -2
  123. package/dist/gateway/static/root/assets/gateway-settings-HIHGY-0Y.js +0 -1
  124. package/dist/gateway/static/root/assets/heartbeat-settings-DiYjWa1F.js +0 -1
  125. package/dist/gateway/static/root/assets/home-page-BLZNEVmk.js +0 -1
  126. package/dist/gateway/static/root/assets/index-50Kr6L6C.css +0 -2
  127. package/dist/gateway/static/root/assets/local-app-workbench-page-E47xrPDI.js +0 -2
  128. package/dist/gateway/static/root/assets/note-detail-panel-DPd5L2A9.js +0 -5
  129. package/dist/gateway/static/root/assets/notes-page-CE_De-iQ.js +0 -8
  130. package/dist/gateway/static/root/assets/project-detail-page-DXhBJzJy.js +0 -1
  131. package/dist/gateway/static/root/assets/projects-page-CcqhmZoX.js +0 -1
  132. package/dist/gateway/static/root/assets/remote-access-hub-ulmJT_Ac.js +0 -1
  133. package/dist/gateway/static/root/assets/sessions-page-RM0kAsNa.js +0 -1
  134. package/dist/gateway/static/root/assets/settings-advanced-gate-BfLbu67w.js +0 -1
  135. package/dist/gateway/static/root/assets/setup-status-panel-BZ4i0CYX.js +0 -1
  136. package/dist/gateway/static/root/assets/shares-settings-B5yHTrGO.js +0 -1
  137. package/dist/gateway/static/root/assets/task-detail-page-4_5g-V8B.js +0 -1
  138. package/dist/gateway/static/root/assets/user-model-page-CQnXw4ba.js +0 -2
  139. package/dist/gateway/static/root/assets/workflows-page-D3Z7JVHH.js +0 -6
@@ -1,15 +1,15 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
3
  import { TaskRunRepository } from "../../tasks/task-run-repository.js";
4
- import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
5
4
  import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
6
- import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
7
- import { completeWithResolvedCredentials } from "../../providers/model-call.js";
8
5
  import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
6
+ import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
9
7
  import { TaskRepository } from "../../tasks/task-repository.js";
10
8
  import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
11
9
  import { readWorkspaceRevision } from "../coding/workspace-revision.js";
10
+ import { completeWithResolvedCredentials } from "../../providers/model-call.js";
12
11
  import { TaskApplicationService } from "../../tasks/task-application-service.js";
12
+ import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
13
13
  //#region src/agent/tasks/task-judge-service.ts
14
14
  init_schema();
15
15
  init_providers();
@@ -1,9 +1,9 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
4
3
  import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
5
4
  import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
6
5
  import { isLocalModelBaseUrl, resolveModelCallApiKey, resolveModelCallOptions } from "../providers/model-call.js";
6
+ import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
7
7
  //#region src/ai-assist/text-assist.ts
8
8
  init_providers();
9
9
  init_logger();
@@ -1,10 +1,10 @@
1
1
  import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
2
2
  import { createLogger } from "../utils/logger/index.js";
3
3
  import { init_logger } from "../utils/logger.js";
4
- import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
5
4
  import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
6
- import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
5
+ import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
7
6
  import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
7
+ import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
8
8
  import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
9
9
  import { dirname, join } from "path";
10
10
  import { mkdir, readFile, readdir, rm } from "fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
2
- import { generatePKCE, init_pkce } from "./pkce.js";
3
2
  import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
3
+ import { generatePKCE, init_pkce } from "./pkce.js";
4
4
  import { hostname } from "node:os";
5
5
  import { randomBytes } from "node:crypto";
6
6
  import http from "node:http";
@@ -1,5 +1,5 @@
1
- import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
2
1
  import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
2
+ import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
3
3
  import path from "node:path";
4
4
  import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
5
5
  //#region src/auth/profiles/store.ts
@@ -1,8 +1,8 @@
1
1
  import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
2
+ import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
2
3
  import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
3
- import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
4
4
  import { init_loader, loadConfig } from "../config/loader.js";
5
- import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
5
+ import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
6
6
  import { existsSync, readFileSync } from "node:fs";
7
7
  //#region src/auth/sync-provider-auth.ts
8
8
  /**
@@ -1,8 +1,8 @@
1
1
  import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
2
2
  import { createLogger } from "../../utils/logger/index.js";
3
3
  import { init_logger } from "../../utils/logger.js";
4
- import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
5
4
  import { init_paths, resolveBinDir } from "../../config/paths.js";
5
+ import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
6
6
  import { assertCacheDir } from "../cache-dir-policy.js";
7
7
  import { resolvePackageRoot } from "../../infra/update-check.js";
8
8
  import { dirname, join } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { getAgentDefaultModelRef, init_schema, parseModelRef } from "../../../../config/schema.js";
2
- import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
3
2
  import { init_loader, loadConfig } from "../../../../config/loader.js";
3
+ import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
4
4
  import { existsSync } from "node:fs";
5
5
  //#region src/cli/commands/doctor/checks/provider-auth.ts
6
6
  init_loader();
@@ -1,6 +1,6 @@
1
1
  import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
2
- import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
3
2
  import { loadConfig, saveConfig } from "../../config/loader.js";
3
+ import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
4
4
  import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
5
5
  import { formatExamples, register } from "../registry.js";
6
6
  import { getContextWithOpts } from "../context.js";
@@ -2,15 +2,15 @@ import { ENV_VARS, XOPC_DB_FILENAME, resolveHomeDir, resolveStateDir, resolveXop
2
2
  import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
3
3
  import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
4
4
  import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
5
- import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
5
+ import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
6
6
  import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
7
7
  import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
8
8
  import { resolveAgentDir as resolveAgentDir$1, resolveAgentHomeDir as resolveAgentHomeDir$1, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
9
+ import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
9
10
  import { FILENAMES, WORKSPACE_FILES, existsSync, hasBundledExtensionManifest, init_paths, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveCredentialsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveMcpOAuthPath, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
10
- import { CustomModelSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
11
11
  import { init_loader, loadConfig, saveConfig } from "./loader.js";
12
- import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
13
- import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
12
+ import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
13
+ import { CustomModelSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
14
14
  import { canonicalizeConfiguredMcpServer, isKnownCliMcpTypeAlias, normalizeConfiguredMcpServers, resolveXopcMcpTransportAlias } from "./mcp-config-normalize.js";
15
15
  import { formatThinkingLevels, listThinkingLevels, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, thinkLevelToNumber } from "../agent/transcript/thinking-types.js";
16
16
  import { getWorkspacePath } from "./workspace-path-helpers.js";
@@ -2,10 +2,10 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
2
2
  import { createLogger } from "../utils/logger/index.js";
3
3
  import { init_logger } from "../utils/logger.js";
4
4
  import { ConfigSchema, init_schema } from "./schema.js";
5
- import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
6
5
  import { init_paths, resolveConfigPath } from "./paths.js";
7
- import { init_resolution, setActivePlatformDiscovery } from "../platform/resolution.js";
6
+ import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
8
7
  import { assertChannelPluginConfigs, init_validate_channel_configs } from "./validate-channel-configs.js";
8
+ import { init_resolution, setActivePlatformDiscovery } from "../platform/resolution.js";
9
9
  import { dirname } from "path";
10
10
  import { existsSync, mkdirSync, promises, readFileSync } from "fs";
11
11
  import { config } from "dotenv";
@@ -1,6 +1,6 @@
1
1
  import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
2
- import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
3
2
  import { init_paths, resolveModelsJsonPath } from "./paths.js";
3
+ import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
4
4
  import { existsSync, readFileSync } from "fs";
5
5
  import { z } from "zod";
6
6
  //#region src/config/models-json.ts
@@ -116,10 +116,7 @@ async function deriveConnectedSourceUnderstanding(input) {
116
116
  },
117
117
  predicate: `${candidate.category}.connected.${candidate.factKey}`,
118
118
  cardinality: "single",
119
- scope: {
120
- type: "agent",
121
- id: input.agentId
122
- },
119
+ scope: { type: "global" },
123
120
  kind: candidate.category === "communication" ? "preference" : candidate.category,
124
121
  value: candidate.statement,
125
122
  normalizedValue: candidate.statement.toLocaleLowerCase(),
@@ -1,7 +1,7 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
4
3
  import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
4
+ import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
5
5
  import { dirname, join } from "path";
6
6
  import { existsSync } from "fs";
7
7
  import { mkdir, readFile } from "fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentDir, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, resolveUserPath, validateAgentIdForNewAgent } from "../agent/agent-scope.js";
2
- import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
3
2
  import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
3
+ import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
4
4
  import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES, REQUIRED_AGENT_PROFILE_MARKDOWN_FILE_SET } from "../agent/context/workspace.js";
5
5
  import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
6
6
  import { seedAgentProfileMarkdownFiles } from "../agent/context/workspace-seed.js";
@@ -1,7 +1,7 @@
1
1
  import { init_paths_state, resolveStateDir } from "../config/paths-state.js";
2
2
  import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
3
- import { init_paths, resolveConfigPath, resolveSkillsDir } from "../config/paths.js";
4
3
  import { extractProfileAgentId } from "../config/agent-profile.js";
4
+ import { init_paths, resolveConfigPath, resolveSkillsDir } from "../config/paths.js";
5
5
  import { isBareProfileMarkdownFileName, resolveProfileMarkdownPathIfBareName } from "../agent/tools/tool-paths.js";
6
6
  import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
7
7
  import { basename, isAbsolute, resolve } from "node:path";
@@ -1,9 +1,9 @@
1
1
  import { ContextPlanningConfigSchema, KnowledgeMemoryConfigSchema, UserModelConfigSchema, init_config } from "../../../user-context/config.js";
2
2
  import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
3
3
  import { resolveModelsJsonPath } from "../../../config/paths.js";
4
+ import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus, init_channel_catalog_service } from "../../../channels/catalog/channel-catalog-service.js";
4
5
  import { init_models_json, loadModelsJson } from "../../../config/models-json.js";
5
6
  import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
6
- import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus, init_channel_catalog_service } from "../../../channels/catalog/channel-catalog-service.js";
7
7
  import { getProviderRegistry, init_plugin_registry } from "../../../providers/plugin-registry.js";
8
8
  import { getAllProviders, init_providers, isProviderConfigured } from "../../../providers/index.js";
9
9
  import { normalizeConfiguredMcpServers } from "../../../config/mcp-config-normalize.js";
@@ -1,5 +1,5 @@
1
- import { init_resolve_config_value, testApiKeyResolution } from "../../../config/resolve-config-value.js";
2
1
  import { resolveModelsJsonPath } from "../../../config/paths.js";
2
+ import { init_resolve_config_value, testApiKeyResolution } from "../../../config/resolve-config-value.js";
3
3
  import { init_models_json, loadModelsJson, saveModelsJson, validateModelsConfig } from "../../../config/models-json.js";
4
4
  import { getModelCatalogStore, init_model_catalog_store } from "../../../providers/model-catalog-store.js";
5
5
  import { getModelRegistry } from "../../../providers/model-registry.js";
@@ -2,13 +2,15 @@ import { createCollaborationRule, getCollaborationRule, listCollaborationRules,
2
2
  import { getKnowledgeItem, listKnowledgeItems, searchKnowledgeItems, setKnowledgeStatus } from "../../../knowledge-memory/repository.js";
3
3
  import "../../../knowledge-memory/index.js";
4
4
  import { createPriorityWindow, createUserGoal, listPriorityWindows, listUserGoals, setUserGoalStatus } from "../../../user-model/goals.js";
5
- import { getAssertionSlot, getUserAssertion, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../../user-model/repository.js";
5
+ import { getAssertionSlot, getUserAssertion, listUserAssertionSources, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../../user-model/repository.js";
6
6
  import { applyUserProfilePatch, getUserProfileSnapshot } from "../../../user-model/profile.js";
7
7
  import { bootstrapUserModel } from "../../../user-model/bootstrap.js";
8
8
  import "../../../user-model/index.js";
9
9
  import { listMemoryMaintenanceRuns } from "../../../memory-maintenance/service.js";
10
10
  import "../../../memory-maintenance/index.js";
11
11
  import { getExecutionContextAudit, recordExecutionContextFeedback } from "../../../agent/context/audit.js";
12
+ import { listUnderstandingSourceGrants } from "../../../user-context/sources/repository.js";
13
+ import { userInfo } from "node:os";
12
14
  //#region src/gateway/hono/routes/user-model.ts
13
15
  function object(value) {
14
16
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -52,6 +54,19 @@ function subject(value) {
52
54
  function errorMessage(error) {
53
55
  return error instanceof Error ? error.message : String(error);
54
56
  }
57
+ function machineCallName() {
58
+ try {
59
+ const username = userInfo().username.trim();
60
+ return [
61
+ "root",
62
+ "admin",
63
+ "administrator",
64
+ "user"
65
+ ].includes(username.toLocaleLowerCase()) ? "" : username.slice(0, 100);
66
+ } catch {
67
+ return "";
68
+ }
69
+ }
55
70
  const ASSERTION_STATUSES = new Set([
56
71
  "candidate",
57
72
  "active",
@@ -88,20 +103,21 @@ const RULE_STATUSES = new Set([
88
103
  "disabled",
89
104
  "archived"
90
105
  ]);
91
- function assertionView(assertion) {
106
+ function assertionView(assertion, sources = listUserAssertionSources([assertion.id]).get(assertion.id) ?? []) {
92
107
  const slot = getAssertionSlot(assertion.slotId);
93
108
  if (!slot) throw new Error(`Assertion slot not found: ${assertion.slotId}`);
94
109
  return {
95
110
  ...assertion,
96
111
  predicate: slot.predicate,
97
112
  subject: slot.subject,
98
- scope: slot.scope
113
+ scope: slot.scope,
114
+ sources
99
115
  };
100
116
  }
101
117
  function registerUserModelRoutes(authenticated, deps) {
102
118
  const write = deps.strictRateLimitMiddleware;
103
119
  authenticated.get("/api/user-model", (c) => {
104
- const assertions = listUserAssertions({
120
+ const rawAssertions = listUserAssertions({
105
121
  statuses: [
106
122
  "active",
107
123
  "candidate",
@@ -110,13 +126,24 @@ function registerUserModelRoutes(authenticated, deps) {
110
126
  "stale"
111
127
  ],
112
128
  limit: 1e3
113
- }).map(assertionView);
129
+ });
130
+ const assertionSources = listUserAssertionSources(rawAssertions.map((item) => item.id));
131
+ const assertions = rawAssertions.map((item) => assertionView(item, assertionSources.get(item.id) ?? []));
114
132
  const goals = listUserGoals();
115
133
  const priorities = listPriorityWindows();
116
134
  const knowledge = listKnowledgeItems({
117
135
  recordClass: "memory",
118
136
  limit: 1e3
119
137
  });
138
+ const profile = getUserProfileSnapshot();
139
+ const sources = listUnderstandingSourceGrants().map((source) => ({
140
+ id: source.id,
141
+ kind: source.adapterId === "local-work-folders" ? "work_folder" : source.adapterId.startsWith("connector:") ? "connector" : "local_source",
142
+ adapterId: source.adapterId,
143
+ category: source.category,
144
+ displayName: source.displayName,
145
+ ...source.lastCollectedAt ? { lastCollectedAt: source.lastCollectedAt } : {}
146
+ }));
120
147
  return c.json({
121
148
  assertions,
122
149
  goals,
@@ -124,7 +151,9 @@ function registerUserModelRoutes(authenticated, deps) {
124
151
  rules: listCollaborationRules(),
125
152
  knowledge,
126
153
  maintenance: { lastRun: listMemoryMaintenanceRuns(1)[0] ?? null },
127
- profile: getUserProfileSnapshot(),
154
+ profile,
155
+ sources,
156
+ suggestedCallName: profile.callName || machineCallName(),
128
157
  counts: {
129
158
  activeAssertions: assertions.filter((item) => item.status === "active").length,
130
159
  reviewAssertions: assertions.filter((item) => item.status === "needs_review" || item.status === "conflicted").length,
@@ -176,10 +205,12 @@ function registerUserModelRoutes(authenticated, deps) {
176
205
  authenticated.get("/api/user-model/assertions", (c) => {
177
206
  const requested = c.req.query("status")?.split(",").filter(Boolean);
178
207
  if (requested?.some((status) => !ASSERTION_STATUSES.has(status))) return c.json({ error: "Invalid assertion status" }, 400);
179
- return c.json({ assertions: listUserAssertions({
208
+ const assertions = listUserAssertions({
180
209
  ...requested ? { statuses: requested } : {},
181
210
  limit: 1e3
182
- }).map(assertionView) });
211
+ });
212
+ const assertionSources = listUserAssertionSources(assertions.map((item) => item.id));
213
+ return c.json({ assertions: assertions.map((item) => assertionView(item, assertionSources.get(item.id) ?? [])) });
183
214
  });
184
215
  authenticated.get("/api/user-model/assertions/:id", (c) => {
185
216
  const assertion = getUserAssertion(c.req.param("id"));
@@ -7,10 +7,10 @@ import { WorkflowNameConflictError, WorkflowRevisionConflictError, createWorkflo
7
7
  import "../../../workflows/domain/index.js";
8
8
  import { resolveWorkflowRunArtifactsDir } from "../../../workflows/store/paths.js";
9
9
  import { WorkflowDraftService } from "../../../workflows/draft/workflow-draft-service.js";
10
- import { WorkflowDraftConflictError, WorkflowDraftStore } from "../../../workflows/authoring/workflow-draft-store.js";
11
- import "../../../workflows/authoring/index.js";
12
10
  import "../../../workflows/draft/index.js";
13
11
  import { ProjectWorkflowPresetRepository } from "../../../workflows/project-presets/project-workflow-preset-repository.js";
12
+ import { WorkflowDraftConflictError, WorkflowDraftStore } from "../../../workflows/authoring/workflow-draft-store.js";
13
+ import "../../../workflows/authoring/index.js";
14
14
  import { basename, join } from "node:path";
15
15
  import { readFile, stat } from "node:fs/promises";
16
16
  //#region src/gateway/hono/routes/workflows.ts
@@ -1,7 +1,7 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
- import { getModelRegistry } from "../../providers/model-registry.js";
4
3
  import { loadConfig, saveConfig } from "../../config/loader.js";
4
+ import { getModelRegistry } from "../../providers/model-registry.js";
5
5
  import { init_providers } from "../../providers/index.js";
6
6
  import { disposeAllSessionMcpRuntimes } from "../../agent/mcp/bundle-mcp-runtime.js";
7
7
  import { reloadImageGenerationProviders } from "../../agent/image/generation/provider-registry.js";
@@ -12,16 +12,16 @@ import { getSessionConfig } from "../storage/sqlite/config-repository.js";
12
12
  import "../storage/sqlite/index.js";
13
13
  import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
14
14
  import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
15
+ import { buildSessionKey, init_session_key, sanitizeSegment } from "../routing/session-key.js";
16
+ import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
17
+ import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
15
18
  import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../config/paths.js";
16
- import { prewarmModelRegistry } from "../providers/model-registry.js";
17
19
  import { areExtensionsGloballyDisabled } from "../extensions/discover-extensions.js";
18
20
  import { buildExtensionMetadataSnapshot } from "../extensions/extension-metadata-snapshot.js";
19
21
  import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, init_channel_catalog_service } from "../channels/catalog/channel-catalog-service.js";
20
22
  import { loadConfig, saveConfig } from "../config/loader.js";
21
- import { buildSessionKey, init_session_key, sanitizeSegment } from "../routing/session-key.js";
22
- import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
23
+ import { prewarmModelRegistry } from "../providers/model-registry.js";
23
24
  import { init_providers, providers_exports } from "../providers/index.js";
24
- import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
25
25
  import { TaskRepository } from "../tasks/task-repository.js";
26
26
  import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
27
27
  import { getEmbeddedExecutionSession } from "../agent/embedded/execution-context.js";
@@ -153,11 +153,46 @@ function proactivePlan(payload) {
153
153
  }
154
154
  };
155
155
  }
156
+ function workDiscoveryPlan(eventType, payload) {
157
+ if (!payload || typeof payload !== "object") return null;
158
+ const event = payload;
159
+ const completed = eventType === "work-discovery.completed";
160
+ if (typeof event.runId !== "string" || !event.runId || typeof event.sessionKey !== "string" || !event.sessionKey || event.status !== (completed ? "completed" : "failed")) return null;
161
+ const type = completed ? "work_discovery.review_ready" : "work_discovery.failed";
162
+ return {
163
+ dedupeKey: `${type}:${event.runId}`,
164
+ notification: {
165
+ type,
166
+ target: {
167
+ kind: "work_discovery",
168
+ runId: event.runId,
169
+ sessionKey: event.sessionKey
170
+ },
171
+ priority: completed ? "normal" : "high",
172
+ title: completed ? {
173
+ en: "Understanding ready for review",
174
+ zh: "用户理解已可确认"
175
+ } : {
176
+ en: "Understanding needs attention",
177
+ zh: "用户理解需要处理"
178
+ },
179
+ body: completed ? {
180
+ en: "Review what xopc learned about your work.",
181
+ zh: "查看并确认 xopc 对你工作的理解。"
182
+ } : {
183
+ en: "Open user understanding to review or retry.",
184
+ zh: "打开用户理解,查看详情或重试。"
185
+ },
186
+ payload: { runId: event.runId }
187
+ }
188
+ };
189
+ }
156
190
  function notificationPlanFromGatewayEvent(type, payload) {
157
191
  if (type === "agent.run.ended") return chatPlan(payload);
158
192
  if (type === "task.attention_required.v2" || type === "task.phase_changed.v2") return taskPlan(payload);
159
193
  if (type === "automation.run.completed") return automationPlan(payload);
160
194
  if (type === "proactive.inbox.created") return proactivePlan(payload);
195
+ if (type === "work-discovery.completed" || type === "work-discovery.failed") return workDiscoveryPlan(type, payload);
161
196
  return null;
162
197
  }
163
198
  //#endregion
@@ -29,6 +29,8 @@ function preferenceAllows(type, preferences) {
29
29
  case "automation.completed": return preferences.automationCompleted;
30
30
  case "automation.failed": return preferences.automationFailed;
31
31
  case "proactive.insight": return preferences.proactiveInsight;
32
+ case "work_discovery.review_ready":
33
+ case "work_discovery.failed": return true;
32
34
  }
33
35
  }
34
36
  function retryAt(attempts, now) {
@@ -1,5 +1,5 @@
1
- import { getApiKeyFromEnv, init_env_keys } from "../env-keys.js";
2
1
  import { init_sync_provider_auth, resolveProviderApiKeyForAgentSync } from "../../auth/sync-provider-auth.js";
2
+ import { getApiKeyFromEnv, init_env_keys } from "../env-keys.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 { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
4
+ import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
3
5
  import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
4
6
  import { init_model_ref, splitProviderModelRef } from "./model-ref.js";
5
7
  import { ModelRegistry, getModelRegistry, init_model_registry, prewarmModelRegistry, resetModelRegistry } from "./model-registry.js";
6
- import { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
7
8
  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 { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
5
4
  import { resolveModelsJsonPath } from "../config/paths.js";
5
+ import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.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 { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
3
2
  import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
3
+ import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.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,6 +1,6 @@
1
1
  import { resolveStateDir } from "../config/paths-state.js";
2
- import { init_paths, resolveAgentProfileDir, resolveBundledSkillsDir } from "../config/paths.js";
3
2
  import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
3
+ import { init_paths, resolveAgentProfileDir, resolveBundledSkillsDir } from "../config/paths.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";
@@ -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";
5
6
  import { init_paths } from "../config/paths.js";
6
7
  import { loadConfig } from "../config/loader.js";
7
8
  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";
@@ -14,7 +14,6 @@ import { MAX_WEBCHAT_ATTACHMENT_FILE_BYTES } from "../gateway/chat-limits.js";
14
14
  import { isTerminalWorkflowRunStatus } from "../workflows/domain/run.js";
15
15
  import "../workflows/domain/index.js";
16
16
  import { runViewToSnapshot } from "../workflows/service/run-view-to-snapshot.js";
17
- import { resolveTuiSessionKey, resolveTuiStartupSessionKey } from "../routing/resolve-tui-session-key.js";
18
17
  import { applyThemeById, getBashExcludeBorderColor, getBashModeBorderColor, getCustomThemesDir, getThemeExports, getThinkingBorderColor, initTuiTheme, listAvailableThemeIds, resolveThemePalette } from "./theme-manager.js";
19
18
  import { editorTheme, theme } from "./theme.js";
20
19
  import { extensionForImageMimeType, readClipboardImage } from "./clipboard-image.js";
@@ -46,6 +45,7 @@ import { installTuiStdioFilter } from "./tui-stdio-filter.js";
46
45
  import { createEditorSubmitHandler, createSubmitBurstCoalescer, shouldEnableWindowsGitBashPasteFallback } from "./tui-submit.js";
47
46
  import { withTuiSuspended } from "./tui-suspend.js";
48
47
  import { createInitialState } from "./tui-types.js";
48
+ import { resolveTuiSessionKey, resolveTuiStartupSessionKey } from "../routing/resolve-tui-session-key.js";
49
49
  import { EmbeddedBackend } from "./backends/embedded-backend.js";
50
50
  import { GatewayRealtimeBackend } from "./backends/gateway-realtime-backend.js";
51
51
  import { ChatLog } from "./components/chat-log.js";
@@ -2,8 +2,8 @@ import { USER_MODEL_PRINCIPAL_ID, validateCandidate, validateScope } from "./dom
2
2
  import { calculateExecutionValue } from "./importance.js";
3
3
  import { createPriorityWindow, createUserGoal, listPriorityWindows, listUserGoals, setUserGoalStatus } from "./goals.js";
4
4
  import { defaultReviewAt, isAssertionValidAt, requiresBoundedValidity, resolveCurrentAssertion } from "./temporal.js";
5
- import { getActiveAssertionByPredicate, getActiveAssertionForSlot, getAssertionSlot, getUserAssertion, getUserTimezone, linkAssertionEvidence, listSlotAssertions, listUserAssertions, reconcileAssertion, setAssertionStatus } from "./repository.js";
5
+ import { getActiveAssertionByPredicate, getActiveAssertionForSlot, getAssertionSlot, getUserAssertion, getUserTimezone, linkAssertionEvidence, listSlotAssertions, listUserAssertionSources, listUserAssertions, reconcileAssertion, setAssertionStatus } from "./repository.js";
6
6
  import { applyUserProfilePatch, getUserProfileSnapshot } from "./profile.js";
7
7
  import { bootstrapUserModel } from "./bootstrap.js";
8
8
  import { isWorkingAssumption } from "./usage-policy.js";
9
- export { USER_MODEL_PRINCIPAL_ID, applyUserProfilePatch, bootstrapUserModel, calculateExecutionValue, createPriorityWindow, createUserGoal, defaultReviewAt, getActiveAssertionByPredicate, getActiveAssertionForSlot, getAssertionSlot, getUserAssertion, getUserProfileSnapshot, getUserTimezone, isAssertionValidAt, isWorkingAssumption, linkAssertionEvidence, listPriorityWindows, listSlotAssertions, listUserAssertions, listUserGoals, reconcileAssertion, requiresBoundedValidity, resolveCurrentAssertion, setAssertionStatus, setUserGoalStatus, validateCandidate, validateScope };
9
+ export { USER_MODEL_PRINCIPAL_ID, applyUserProfilePatch, bootstrapUserModel, calculateExecutionValue, createPriorityWindow, createUserGoal, defaultReviewAt, getActiveAssertionByPredicate, getActiveAssertionForSlot, getAssertionSlot, getUserAssertion, getUserProfileSnapshot, getUserTimezone, isAssertionValidAt, isWorkingAssumption, linkAssertionEvidence, listPriorityWindows, listSlotAssertions, listUserAssertionSources, listUserAssertions, listUserGoals, reconcileAssertion, requiresBoundedValidity, resolveCurrentAssertion, setAssertionStatus, setUserGoalStatus, validateCandidate, validateScope };
@@ -1,4 +1,11 @@
1
1
  import { type AssertionCandidate, type AssertionSlot, type AssertionStatus, type ReconciliationResult, type UserAssertion } from './domain.js';
2
+ export type UserAssertionSource = {
3
+ id: string;
4
+ kind: 'user' | 'conversation' | 'connector' | 'work_folder' | 'local_source' | 'inference';
5
+ label?: string;
6
+ category?: 'files' | 'recent_documents' | 'calendar' | 'tasks' | 'notes' | 'mail' | 'messages' | 'code_activity';
7
+ observedAt: number;
8
+ };
2
9
  export declare function reconcileAssertion(candidate: AssertionCandidate, now?: number): ReconciliationResult;
3
10
  export declare function getUserAssertion(id: string): UserAssertion | undefined;
4
11
  export declare function getAssertionSlot(id: string): AssertionSlot | undefined;
@@ -8,6 +15,7 @@ export declare function listUserAssertions(input?: {
8
15
  statuses?: AssertionStatus[];
9
16
  limit?: number;
10
17
  }): UserAssertion[];
18
+ export declare function listUserAssertionSources(assertionIds: string[]): Map<string, UserAssertionSource[]>;
11
19
  export declare function getActiveAssertionByPredicate(predicate: string): UserAssertion | undefined;
12
20
  export declare function getActiveAssertionForSlot(input: {
13
21
  subject: AssertionSlot['subject'];