@xopcai/xopc 0.0.175 → 0.0.176
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/{activity-store-CM6mQUS2.js → activity-store-DsFM1upC.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-eckyE9AY.js → agent-avatar-dicebear-DvdMLOga.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-D-OIB_r0.js → agents-BVjlpbeZ.js} +1 -1
- package/dist/gateway/static/root/assets/{api-BfMRS6FX.js → api-BdPLCCBm.js} +1 -1
- package/dist/gateway/static/root/assets/{api-2SLLStKp.js → api-Bop4IQRW.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-DYkzZQzZ.js → app-management-settings-panel-DMLDOHul.js} +1 -1
- package/dist/gateway/static/root/assets/appearance-settings-DbI9foFR.js +1 -0
- package/dist/gateway/static/root/assets/{apps-page-CuvFyvuu.js → apps-page-njqxLWYD.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-k909a76t.js → archive-plugin-Dfdxuwvb.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CqNzyhdJ.js → attachment-load-Dn3RlnYD.js} +2 -2
- package/dist/gateway/static/root/assets/{attachment-preview-renderer-DonnL2dL.js → attachment-preview-renderer-Cmo-5BP5.js} +2 -2
- package/dist/gateway/static/root/assets/{attachment-process-heavy-RnGYy9bC.js → attachment-process-heavy-B2_kr5EA.js} +3 -3
- package/dist/gateway/static/root/assets/{automation-suggestion-card-snNG6u0v.js → automation-suggestion-card-Bc0Y7A9u.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DetGVTjI.js → automations-page-D-eweHZJ.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-PfQ9ZHDF.js → binary-plugins-0XtB-xC0.js} +2 -2
- package/dist/gateway/static/root/assets/{block-editor-Xrw-DnE_.js → block-editor-C4fXWbEE.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-G92AdEnX.js → browser-settings-page-lC86-drr.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-DJPF2lUY.js → browser-workflow-inputs-CZmzNymN.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-BoXs4pgc.js → browser-workflows-page-CBYM9HqG.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-nS_AMN1K.js → capabilities-settings-panel-6tYNfHqJ.js} +2 -2
- package/dist/gateway/static/root/assets/{capability-presets-api-BgY-Ysmi.js → capability-presets-api-BiJxmmhW.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-presets-settings-panel-DIO8ZNHW.js → capability-presets-settings-panel-Co-ymbd9.js} +1 -1
- package/dist/gateway/static/root/assets/{channel-recipient-api-D32T1EJM.js → channel-recipient-api-BKTUZDp-.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-4Im3vtnO.js → channels-settings-D46eVjaQ.js} +1 -1
- package/dist/gateway/static/root/assets/channels-status-swr-BMRAO4zZ.js +1 -0
- package/dist/gateway/static/root/assets/{connector-logo-C-l8haIK.js → connector-logo-Pr4RIKjj.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-vL3SjHSc.js → connectors-page-Dw1eYbRi.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-CwOI_Hei.js → desktop-pet-B8cZuQUt.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-Cldo_pA3.js → desktop-pet-settings-CEQacUDF.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-CMASXbgJ.js → directory-picker-path-field-DWnxdZtc.js} +1 -1
- package/dist/gateway/static/root/assets/{dreaming-settings-BnMx02w0.js → dreaming-settings-D2e2w2Ho.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-mUFs3ign.js → extension-debug-page-BLjTGbv3.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BsFBOZ5N.js → extension-page-D2_UC6hy.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CTEoovnV.js → extension-settings-page-BsH6o_PX.js} +1 -1
- package/dist/gateway/static/root/assets/{focus-detail-page-CCaZthpU.js → focus-detail-page-BBXUtxRB.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-Bwx-EetD.js → gateway-config-api-C-DkC6UJ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-CvgyqhR_.js → gateway-settings-DEOGiimF.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-C8f5KwkT.js → gateway-startup-retry-BlSLh1TF.js} +1 -1
- package/dist/gateway/static/root/assets/{goal-create-dialog-Bhynl9LN.js → goal-create-dialog-CSFcRE_N.js} +1 -1
- package/dist/gateway/static/root/assets/{goal-detail-page-ChS2rU0w.js → goal-detail-page-VjRArfAJ.js} +1 -1
- package/dist/gateway/static/root/assets/{goals-config-api-CUnfbgHa.js → goals-config-api-CcdS9qek.js} +1 -1
- package/dist/gateway/static/root/assets/{goals-page-BAS_liXl.js → goals-page-BAcErdch.js} +1 -1
- package/dist/gateway/static/root/assets/{goals-settings-Bkk-tOcf.js → goals-settings-BY7crl0z.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-D9Pldf5E.js → heartbeat-settings-DtTkS0gs.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-D7aCMgOv.js → image-generation-api-WGgkbwDZ.js} +1 -1
- package/dist/gateway/static/root/assets/index-2UImfRDC.js +212 -0
- package/dist/gateway/static/root/assets/index-CS9sVShT.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CBhtXhHb.js → keyboard-shortcuts-settings-C5lpWQ3f.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-HQeu_F1C.js → local-app-workbench-page-Cl0fcPL4.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-BtJGF3M8.js → local-apps-page-b05wWvXG.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DO-u1yS7.js → locale-store-sToMfHX_.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-0lvwfLAA.js → logs-page-cDE1jLJv.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-BGPaeTch.js → markdown-split-0gPVst5y.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-C_Cx8v6u.js → media-plugins-Rxyq_KTm.js} +1 -1
- package/dist/gateway/static/root/assets/messages-CarlxqXV.js +3 -0
- package/dist/gateway/static/root/assets/{notes-page-CIYy5BKF.js → notes-page-DRhNDl_Q.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-workbench-_FgNPlOx.js → notes-workbench-BKNBk0Uf.js} +2 -2
- package/dist/gateway/static/root/assets/{page-tabs-C2vsdfJO.js → page-tabs-cOEOQqHh.js} +1 -1
- package/dist/gateway/static/root/assets/pdf-D4PI9qAw.js +54 -0
- package/dist/gateway/static/root/assets/pdf.worker.min-CHFwMXne.mjs +29 -0
- package/dist/gateway/static/root/assets/{preview-open-alternatives-D_VT83bW.js → preview-open-alternatives-BopOLFvu.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BNP9kZ3Q.js → product-open-page-DWVPmmOq.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-MNi-3mZU.js → project-detail-page-BhjEXNQW.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-xx8nUKZO.js → projects-page-B80e69PH.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-H5DSn2bR.js → remote-access-hub-CwdVob6H.js} +1 -1
- package/dist/gateway/static/root/assets/{save-bar-controls-BJL6Xb-F.js → save-bar-controls-BfZmKe1t.js} +1 -1
- package/dist/gateway/static/root/assets/{schedule-field-CxCPSLbu.js → schedule-field-Cpi4jCRV.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-Cao1wGbk.js → schema-form-OXFkcZQe.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-CMQsupwM.js → sessions-page-BGt3Asj6.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BnTdM9Nn.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-9pgClEud.js → settings-form-section-BwqkZCHJ.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-CQz0gEUK.js → settings-loading-skeleton-BbqH_S3Y.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-DgsMzZLm.js → settings-page-BoxC-JSa.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-BhqupMfG.js → settings-page-layout-Ddu2iGaW.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-B7BsWxJt.js → setup-status-panel-z1Lwv0js.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-CC4dQsQN.js → share-preview-page-CVazOFjy.js} +2 -2
- package/dist/gateway/static/root/assets/{shares-settings-Bhz21P05.js → shares-settings-C4lXuyQj.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DSuIDkeI.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-A0rNObNB.js → skills-page-xgZczqVe.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-CF4AYPQg.js → skills-page.utils-DgyB1tSo.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CzZHWI4u.js → system-settings-panel-BoLSQL65.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-BZWNdSZC.js → theme-store-CBNcGOfj.js} +1 -1
- package/dist/gateway/static/root/assets/{time-picker-BC922Mdg.js → time-picker-gochWrny.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-C1S-B1pk.js → typed-models-lib-DvRnr7YB.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-DTiLxcLF.js → use-channel-catalog-CA9BFVB7.js} +1 -1
- package/dist/gateway/static/root/assets/{user-context-page-8XdpiAyP.js → user-context-page-CEfIy4WZ.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-CtIYRNfI.js → voice-api-key-field-v8tgylEZ.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-DBer86NF.js → work-discovery-page-B-3MClaf.js} +1 -1
- package/dist/gateway/static/root/assets/{work-item-detail-page-BUPyfYaq.js → work-item-detail-page-CEsFEdax.js} +1 -1
- package/dist/gateway/static/root/assets/work-page-CT9AHnq6.js +3 -0
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-CC3cJn5k.js +3 -0
- package/dist/gateway/static/root/assets/{workflows-page-CNls7g6v.js → workflows-page-C-1-_Zp1.js} +1 -1
- package/dist/gateway/static/root/index.html +7 -7
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +7 -7
- package/dist/src/agent/context/execution-scope.d.ts +26 -0
- package/dist/src/agent/context/execution-scope.js +84 -0
- package/dist/src/agent/context/project-context.d.ts +3 -1
- package/dist/src/agent/context/project-context.js +26 -8
- package/dist/src/agent/embedded/model-runtime.d.ts +1 -2
- package/dist/src/agent/embedded/model-runtime.js +17 -29
- package/dist/src/agent/embedded/session-runner.js +2 -3
- package/dist/src/agent/prompt/service-prompt-builder.js +1 -0
- package/dist/src/agent/prompt/system-prompt.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +7 -4
- package/dist/src/agent/session/session-config-service.d.ts +4 -1
- package/dist/src/agent/session/session-config-service.js +5 -3
- package/dist/src/agent/session/session-inspector.d.ts +6 -0
- package/dist/src/agent/session/session-inspector.js +9 -2
- package/dist/src/agent/workflow/subagent-runner.js +2 -0
- package/dist/src/agent/workflow/types.d.ts +1 -0
- package/dist/src/auth/model-credential-store.d.ts +17 -0
- package/dist/src/auth/model-credential-store.js +110 -0
- package/dist/src/auth/oauth/github-copilot.js +2 -2
- package/dist/src/auth/oauth/openai-codex.js +98 -7
- package/dist/src/auth/oauth/types.d.ts +4 -1
- package/dist/src/auth/oauth/xopc-cloud.js +124 -6
- package/dist/src/cli/commands/gateway/lifecycle.js +2 -2
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/config/index.js +2 -2
- package/dist/src/config/schema.d.ts +21 -0
- package/dist/src/config/schema.js +12 -2
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +3 -0
- package/dist/src/gateway/hono/lib/config-payload.js +1 -0
- package/dist/src/gateway/hono/oauth-async.d.ts +5 -0
- package/dist/src/gateway/hono/oauth-async.js +20 -8
- package/dist/src/gateway/hono/routes/config-patch/gateway.d.ts +1 -1
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +9 -0
- package/dist/src/gateway/hono/routes/goals.js +13 -0
- package/dist/src/gateway/hono/routes/local-apps.js +1 -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/sessions-api.d.ts +2 -1
- package/dist/src/gateway/service.js +5 -5
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/infra/gateway-processes.js +1 -1
- package/dist/src/infra/update-restart.js +2 -2
- package/dist/src/infra/update-runner.js +2 -2
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/mcp/channel-bridge.js +1 -1
- package/dist/src/providers/index.js +4 -2
- package/dist/src/providers/provider-auth-service.d.ts +22 -0
- package/dist/src/providers/provider-auth-service.js +66 -0
- package/dist/src/providers/register-runtime-providers.d.ts +6 -0
- package/dist/src/providers/register-runtime-providers.js +55 -0
- package/dist/src/providers/xopc-cloud-account-service.d.ts +2 -2
- package/dist/src/providers/xopc-cloud-account-service.js +6 -5
- package/dist/src/providers/xopc-cloud-config.d.ts +3 -0
- package/dist/src/providers/xopc-cloud-config.js +13 -0
- package/dist/src/providers/xopc-cloud-model-source.d.ts +2 -2
- package/dist/src/providers/xopc-cloud-model-source.js +6 -5
- package/dist/src/session/index.d.ts +1 -1
- package/dist/src/session/index.js +2 -2
- package/dist/src/session/thinking-resolve.d.ts +8 -0
- package/dist/src/session/thinking-resolve.js +6 -3
- package/dist/src/tui/tui.js +2 -2
- package/dist/src/tui/xopc-tui-keybindings.d.ts +44 -4
- package/dist/src/workflows/engine/workflow-engine.d.ts +1 -0
- package/dist/src/workflows/engine/workflow-engine.js +2 -0
- package/dist/src/workflows/service/workflow-run-service.js +12 -6
- package/dist/src/workflows/service/workflow-session-bridge.js +2 -1
- package/package.json +5 -5
- package/dist/gateway/static/root/assets/appearance-settings-CDXXN57j.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-CMctpuqb.js +0 -1
- package/dist/gateway/static/root/assets/index-DJ5vdaHk.css +0 -1
- package/dist/gateway/static/root/assets/index-TnouSpay.js +0 -212
- package/dist/gateway/static/root/assets/messages-BP8aQX-5.js +0 -3
- package/dist/gateway/static/root/assets/pdf-epILhEOn.js +0 -54
- package/dist/gateway/static/root/assets/pdf.worker.min-iDqQPrd3.mjs +0 -31
- package/dist/gateway/static/root/assets/settings-advanced-gate-OBUdG6bV.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-CBP-UB88.js +0 -1
- package/dist/gateway/static/root/assets/work-page-G8phwwI1.js +0 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-IKxqDAXw.js +0 -3
|
@@ -64,7 +64,7 @@ function parseModelRef(ref) {
|
|
|
64
64
|
model: trimmed.slice(idx + 1).trim()
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
var AgentModelRefSchema, AgentImageGenerationModelSchema, AgentTypedModelRoleSchema, AgentTypedModelRolesSchema, AgentModelsSchema, AgentsConfigSchema, BrowserCloudConfigSchema, BrowserExtensionConfigSchema, BrowserCloakConfigSchema, BrowserConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, SessionDmScopeSchema, SessionStorageConfigSchema, SessionResetModeSchema, SessionResetConfigSchema, SessionResetByTypeSchema, SessionScopeSchema, SessionConfigSchema, ChannelsConfigSchema, SearchProviderEntrySchema, WebSearchConfigSchema, WebsiteBlocklistSchema, WebToolsConfigSchema, ToolsConfigSchema, GatewayAuthRateLimitSchema, GatewaySecuritySchema, GatewayTrustedProxySchema, GatewayAuthSchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayRemoteSchema, GatewayTlsSchema, GatewayModeSchema, HeartbeatConfigSchema, GatewayChannelConnectDeferModeSchema, TunnelConsentSchema, TunnelConfigSchema, WorkspaceImportConfigSchema, WorkspaceConfigSchema, GatewayBindModeSchema, GatewayConfigSchema, ModelsDevConfigSchema, ModelCatalogConfigSchema, SttProviderConfigCatchallSchema, STTProviderConfigSchema, STTFallbackConfigSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, STTConfigSchema, TtsProviderConfigCatchallSchema, TTSProviderConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSEdgeConfigSchema, TTSSummarizationConfigSchema, TTSConfigSchema, VoiceRefinementConfigSchema, VoiceConfigSchema, MessagesConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProviderAuthConfigSchema, ProvidersConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, UpdateAutoConfigSchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, UpdateConfigSchema, CommandsConfigSchema, TuiConfigSchema, McpHttpUrlSchema, ConnectorSecretReferenceSchema, McpConfigScalarSchema, McpServerSchema, McpConfigSchema, CodeIntelligenceConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ConfigSchema;
|
|
67
|
+
var AgentModelRefSchema, AgentImageGenerationModelSchema, AgentTypedModelRoleSchema, AgentTypedModelRolesSchema, AgentModelsSchema, AgentsConfigSchema, BrowserCloudConfigSchema, BrowserExtensionConfigSchema, BrowserCloakConfigSchema, BrowserConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, SessionDmScopeSchema, SessionStorageConfigSchema, SessionResetModeSchema, SessionResetConfigSchema, SessionResetByTypeSchema, SessionScopeSchema, SessionConfigSchema, ChannelsConfigSchema, SearchProviderEntrySchema, WebSearchConfigSchema, WebsiteBlocklistSchema, WebToolsConfigSchema, ToolsConfigSchema, GatewayAuthRateLimitSchema, GatewaySecuritySchema, GatewayTrustedProxySchema, GatewayAuthSchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayRemoteSchema, GatewayTlsSchema, GatewayModeSchema, HeartbeatConfigSchema, GatewayChannelConnectDeferModeSchema, TunnelConsentSchema, TunnelConfigSchema, WorkspaceImportConfigSchema, WorkspaceConfigSchema, GatewayBindModeSchema, GatewayWebchatConfigSchema, GatewayConfigSchema, ModelsDevConfigSchema, ModelCatalogConfigSchema, SttProviderConfigCatchallSchema, STTProviderConfigSchema, STTFallbackConfigSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, STTConfigSchema, TtsProviderConfigCatchallSchema, TTSProviderConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSEdgeConfigSchema, TTSSummarizationConfigSchema, TTSConfigSchema, VoiceRefinementConfigSchema, VoiceConfigSchema, MessagesConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProviderAuthConfigSchema, ProvidersConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, UpdateAutoConfigSchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, UpdateConfigSchema, CommandsConfigSchema, TuiConfigSchema, McpHttpUrlSchema, ConnectorSecretReferenceSchema, McpConfigScalarSchema, McpServerSchema, McpConfigSchema, CodeIntelligenceConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ConfigSchema;
|
|
68
68
|
var init_schema = __esmMin((() => {
|
|
69
69
|
init_schema$1();
|
|
70
70
|
init_preset_chain();
|
|
@@ -451,6 +451,13 @@ strict: z.boolean().optional() }).optional();
|
|
|
451
451
|
"tailnet",
|
|
452
452
|
"custom"
|
|
453
453
|
]);
|
|
454
|
+
GatewayWebchatConfigSchema = z.object({
|
|
455
|
+
/** Default visibility of AI execution activity in the Web UI. */
|
|
456
|
+
activityDetailDefault: z.enum([
|
|
457
|
+
"off",
|
|
458
|
+
"on",
|
|
459
|
+
"stream"
|
|
460
|
+
]).default("on") }).default({ activityDetailDefault: "on" });
|
|
454
461
|
GatewayConfigSchema = z.object({
|
|
455
462
|
/** Semantic bind mode. */
|
|
456
463
|
bind: GatewayBindModeSchema.optional(),
|
|
@@ -465,6 +472,7 @@ strict: z.boolean().optional() }).optional();
|
|
|
465
472
|
tls: GatewayTlsSchema.optional(),
|
|
466
473
|
auth: GatewayAuthSchema.optional(),
|
|
467
474
|
heartbeat: HeartbeatConfigSchema.optional(),
|
|
475
|
+
webchat: GatewayWebchatConfigSchema.optional(),
|
|
468
476
|
maxSseConnections: z.number().optional(),
|
|
469
477
|
corsOrigins: z.array(z.string()).optional(),
|
|
470
478
|
/**
|
|
@@ -638,6 +646,7 @@ strict: z.boolean().optional() }).optional();
|
|
|
638
646
|
intervalMs: 18e5,
|
|
639
647
|
includeSystemPromptSection: false
|
|
640
648
|
},
|
|
649
|
+
webchat: { activityDetailDefault: "on" },
|
|
641
650
|
maxSseConnections: 100,
|
|
642
651
|
corsOrigins: [],
|
|
643
652
|
skillsMarketplaceProvider: "store",
|
|
@@ -1116,6 +1125,7 @@ workDiscoveryOnboarding: z.boolean().default(true) }).strict().default({ workDis
|
|
|
1116
1125
|
intervalMs: 18e5,
|
|
1117
1126
|
includeSystemPromptSection: false
|
|
1118
1127
|
},
|
|
1128
|
+
webchat: { activityDetailDefault: "on" },
|
|
1119
1129
|
maxSseConnections: 100,
|
|
1120
1130
|
corsOrigins: [],
|
|
1121
1131
|
skillsMarketplaceProvider: "store",
|
|
@@ -1183,4 +1193,4 @@ workDiscoveryOnboarding: z.boolean().default(true) }).strict().default({ workDis
|
|
|
1183
1193
|
}));
|
|
1184
1194
|
//#endregion
|
|
1185
1195
|
init_schema();
|
|
1186
|
-
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentTypedModelRoleSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CodeIntelligenceConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef };
|
|
1196
|
+
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentTypedModelRoleSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CodeIntelligenceConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { shouldSilence, stripHeartbeatToken } from "../../heartbeat/tokens.js";
|
|
4
|
-
import { appendCronEventLines } from "../../heartbeat/event-prompt.js";
|
|
5
4
|
import { isWithinActiveHours } from "../../heartbeat/active-hours.js";
|
|
6
5
|
import { isHeartbeatContentEmpty } from "../../heartbeat/content-check.js";
|
|
6
|
+
import { appendCronEventLines } from "../../heartbeat/event-prompt.js";
|
|
7
7
|
import { createHeartbeatWake } from "../../heartbeat/wake.js";
|
|
8
8
|
import { resolveHeartbeatMdPath } from "../workspace-heartbeat-path.js";
|
|
9
9
|
import { readFile } from "fs/promises";
|
|
@@ -252,6 +252,9 @@ export declare function buildSafeWebConfigPayload(service: GatewayService, optio
|
|
|
252
252
|
timezone?: string;
|
|
253
253
|
};
|
|
254
254
|
};
|
|
255
|
+
webchat: {
|
|
256
|
+
activityDetailDefault: "stream" | "on" | "off";
|
|
257
|
+
};
|
|
255
258
|
maxSseConnections: number;
|
|
256
259
|
channelConnectDeferMode: "explicit" | "off" | "auto";
|
|
257
260
|
channelConnectDeferIds: string[];
|
|
@@ -165,6 +165,7 @@ async function buildSafeWebConfigPayload(service, options = {}) {
|
|
|
165
165
|
isolatedSession: config.gateway?.heartbeat?.isolatedSession,
|
|
166
166
|
activeHours: config.gateway?.heartbeat?.activeHours
|
|
167
167
|
},
|
|
168
|
+
webchat: { activityDetailDefault: config.gateway?.webchat?.activityDetailDefault ?? "on" },
|
|
168
169
|
maxSseConnections: typeof config.gateway?.maxSseConnections === "number" ? config.gateway.maxSseConnections : 100,
|
|
169
170
|
channelConnectDeferMode: config.gateway?.channelConnectDeferMode ?? "auto",
|
|
170
171
|
channelConnectDeferIds: Array.isArray(config.gateway?.channelConnectDeferIds) ? config.gateway.channelConnectDeferIds : [],
|
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
import { Hono } from 'hono';
|
|
9
9
|
import type { GatewayService } from '../service.js';
|
|
10
10
|
import { type OAuthCredentials } from '../../auth/oauth/types.js';
|
|
11
|
+
export declare function resolveOAuthLoginMethodPreference(params: {
|
|
12
|
+
requestedMethod?: unknown;
|
|
13
|
+
supportedMethods?: readonly string[];
|
|
14
|
+
remote: boolean;
|
|
15
|
+
}): string | undefined;
|
|
11
16
|
export declare function createOAuthAsyncHandler(service: GatewayService): Hono<import("hono/dist/types/types.js").BlankEnv, import("hono/dist/types/types.js").BlankSchema, "/">;
|
|
12
17
|
export declare function getOAuthCredentialsFromCache(provider: string): OAuthCredentials | undefined;
|
|
13
18
|
export declare function setOAuthCredentialsToCache(provider: string, creds: OAuthCredentials): void;
|
|
@@ -28,6 +28,7 @@ function formatOAuthAsyncError(err) {
|
|
|
28
28
|
const OAUTH_PROVIDERS = getOAuthProviderInterfaces();
|
|
29
29
|
const oauthSessions = /* @__PURE__ */ new Map();
|
|
30
30
|
const SESSION_TTL_MS = 600 * 1e3;
|
|
31
|
+
const SESSION_EXPIRY_GRACE_MS = 3e4;
|
|
31
32
|
setInterval(() => {
|
|
32
33
|
const now = Date.now();
|
|
33
34
|
for (const [id, session] of oauthSessions.entries()) if (now > session.expiresAt) {
|
|
@@ -64,11 +65,21 @@ function requestLooksRemote(c) {
|
|
|
64
65
|
hostWithoutPort(c.req.header("host"))
|
|
65
66
|
].some((candidate) => candidate && !isLoopbackHost(candidate));
|
|
66
67
|
}
|
|
68
|
+
function resolveOAuthLoginMethodPreference(params) {
|
|
69
|
+
if (typeof params.requestedMethod === "string" && params.requestedMethod.trim()) {
|
|
70
|
+
const requested = params.requestedMethod.trim();
|
|
71
|
+
return !params.supportedMethods || params.supportedMethods.includes(requested) ? requested : void 0;
|
|
72
|
+
}
|
|
73
|
+
if (params.remote && params.supportedMethods?.includes("browser") && params.supportedMethods.includes("device_code")) return "device_code";
|
|
74
|
+
}
|
|
67
75
|
function preferredOAuthLoginMethod(params) {
|
|
68
|
-
if (typeof params.requestedMethod === "string" && params.requestedMethod.trim()) return params.requestedMethod.trim();
|
|
69
|
-
if (params.provider !== "openai-codex") return;
|
|
70
76
|
const publicHost = hostWithoutPort(resolveReverseProxyPublicUrl(params.service.currentConfig) ?? void 0);
|
|
71
|
-
|
|
77
|
+
const remote = Boolean(publicHost && !isLoopbackHost(publicHost) || requestLooksRemote(params.c));
|
|
78
|
+
return resolveOAuthLoginMethodPreference({
|
|
79
|
+
requestedMethod: params.requestedMethod,
|
|
80
|
+
supportedMethods: OAUTH_PROVIDERS[params.provider]?.loginMethods,
|
|
81
|
+
remote
|
|
82
|
+
});
|
|
72
83
|
}
|
|
73
84
|
function createOAuthAsyncHandler(service) {
|
|
74
85
|
const oauth = new Hono();
|
|
@@ -99,9 +110,9 @@ function createOAuthAsyncHandler(service) {
|
|
|
99
110
|
oauthSessions.set(sessionId, session);
|
|
100
111
|
runOAuthFlow(session, oauthProvider, service).catch((err) => {
|
|
101
112
|
log.error({
|
|
113
|
+
err,
|
|
102
114
|
sessionId,
|
|
103
|
-
provider
|
|
104
|
-
error: err
|
|
115
|
+
provider
|
|
105
116
|
}, "Background OAuth flow failed");
|
|
106
117
|
session.status = "failed";
|
|
107
118
|
session.error = err instanceof Error ? err.message : "OAuth flow failed";
|
|
@@ -220,6 +231,7 @@ async function runOAuthFlow(session, oauthProvider, _service) {
|
|
|
220
231
|
session.verificationUri = info.verificationUri;
|
|
221
232
|
session.instructions = `Enter code ${info.userCode}`;
|
|
222
233
|
session.message = `Open ${info.verificationUri} and enter code ${info.userCode}`;
|
|
234
|
+
if (info.expiresInSeconds) session.expiresAt = Math.max(session.expiresAt, Date.now() + info.expiresInSeconds * 1e3 + SESSION_EXPIRY_GRACE_MS);
|
|
223
235
|
},
|
|
224
236
|
onPrompt: async (prompt) => {
|
|
225
237
|
session.status = "waiting_code";
|
|
@@ -285,9 +297,9 @@ async function runOAuthFlow(session, oauthProvider, _service) {
|
|
|
285
297
|
session.status = "failed";
|
|
286
298
|
session.error = formatOAuthAsyncError(err);
|
|
287
299
|
log.error({
|
|
300
|
+
err,
|
|
288
301
|
sessionId: session.id,
|
|
289
|
-
provider: session.provider
|
|
290
|
-
error: err
|
|
302
|
+
provider: session.provider
|
|
291
303
|
}, "OAuth login failed");
|
|
292
304
|
}
|
|
293
305
|
} finally {
|
|
@@ -307,4 +319,4 @@ function deleteOAuthCredentialsFromCache(provider) {
|
|
|
307
319
|
oauthCredentialsCache.delete(provider);
|
|
308
320
|
}
|
|
309
321
|
//#endregion
|
|
310
|
-
export { createOAuthAsyncHandler, deleteOAuthCredentialsFromCache, getOAuthCredentialsFromCache, setOAuthCredentialsToCache };
|
|
322
|
+
export { createOAuthAsyncHandler, deleteOAuthCredentialsFromCache, getOAuthCredentialsFromCache, resolveOAuthLoginMethodPreference, setOAuthCredentialsToCache };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Covers heartbeat, bind/customBindHost/port, tailscale, auth (mode + token +
|
|
5
5
|
* password + rateLimit + trustedProxy), trustedProxies, allowRealIpFallback,
|
|
6
|
-
* dangerouslyAllowHostHeaderOriginFallback, security, share, siteShare, publicUrl,
|
|
6
|
+
* dangerouslyAllowHostHeaderOriginFallback, security, share, siteShare, publicUrl, webchat,
|
|
7
7
|
* corsOrigins, maxSseConnections, and channelConnectDefer{Mode,Ids,SkipIds}.
|
|
8
8
|
*
|
|
9
9
|
* Validation policy: each subsection that can reject rejects with a 400 and a
|
|
@@ -32,6 +32,15 @@ function parseDeferIdList(raw) {
|
|
|
32
32
|
return ids;
|
|
33
33
|
}
|
|
34
34
|
function applyGatewayPatch(config, body) {
|
|
35
|
+
if (body.gateway?.webchat?.activityDetailDefault !== void 0) {
|
|
36
|
+
const level = body.gateway.webchat.activityDetailDefault;
|
|
37
|
+
if (level !== "off" && level !== "on" && level !== "stream") return patchError("gateway.webchat.activityDetailDefault must be off, on, or stream");
|
|
38
|
+
const gw = ensureGateway(config);
|
|
39
|
+
gw.webchat = {
|
|
40
|
+
...gw.webchat ?? { activityDetailDefault: "on" },
|
|
41
|
+
activityDetailDefault: level
|
|
42
|
+
};
|
|
43
|
+
}
|
|
35
44
|
if (body.gateway?.heartbeat !== void 0 && typeof body.gateway.heartbeat === "object") {
|
|
36
45
|
const gw = ensureGateway(config);
|
|
37
46
|
if (!gw.heartbeat) gw.heartbeat = {
|
|
@@ -532,6 +532,8 @@ function registerGoalsRoutes(authenticated, deps) {
|
|
|
532
532
|
error: "Goal not found"
|
|
533
533
|
}, 404);
|
|
534
534
|
const patch = {};
|
|
535
|
+
let requestedProjectId;
|
|
536
|
+
let projectChanged = false;
|
|
535
537
|
if (typeof body.title === "string") patch.title = body.title;
|
|
536
538
|
if ("description" in body) patch.description = typeof body.description === "string" ? body.description : void 0;
|
|
537
539
|
const priority = parsePriority(body.priority);
|
|
@@ -547,10 +549,21 @@ function registerGoalsRoutes(authenticated, deps) {
|
|
|
547
549
|
ok: false,
|
|
548
550
|
error: "Project not found"
|
|
549
551
|
}, 404);
|
|
552
|
+
requestedProjectId = nextProjectId;
|
|
553
|
+
projectChanged = nextProjectId !== goal.projectId;
|
|
550
554
|
patch.projectId = nextProjectId;
|
|
551
555
|
}
|
|
552
556
|
const locale = normalizeGoalUiLocale(body.uiLocale);
|
|
553
557
|
if (locale) patch.uiLocale = locale;
|
|
558
|
+
if (projectChanged && goal.activeSessionKey) try {
|
|
559
|
+
if (requestedProjectId) deps.service.projects.attachSession(goal.activeSessionKey, requestedProjectId);
|
|
560
|
+
else deps.service.projects.detachSession(goal.activeSessionKey);
|
|
561
|
+
} catch (error) {
|
|
562
|
+
return c.json({
|
|
563
|
+
ok: false,
|
|
564
|
+
error: error instanceof Error ? error.message : String(error)
|
|
565
|
+
}, 404);
|
|
566
|
+
}
|
|
554
567
|
if (Object.keys(patch).length > 0) goal = goals.update(goalId, patch);
|
|
555
568
|
if (status) {
|
|
556
569
|
const previousStatus = goal?.status;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readLocalAppAcceptanceConfig } from "../../../local-apps/acceptance.js";
|
|
2
|
-
import { extensionAssetMimeType } from "../lib/extension-assets.js";
|
|
3
2
|
import { LOCAL_APP_RUNTIME_BRIDGE_HASH, injectLocalAppRuntimeBridge } from "../../../local-apps/preview-runtime-bridge.js";
|
|
3
|
+
import { extensionAssetMimeType } from "../lib/extension-assets.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,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 { acquireUpdateLock } from "../../../infra/update-lock.js";
|
|
5
4
|
import { normalizeUpdateChannel } from "../../../infra/update-channels.js";
|
|
5
|
+
import { acquireUpdateLock } from "../../../infra/update-lock.js";
|
|
6
|
+
import { formatUpdateApiResult, runGatewayUpdateWithPostSteps } from "../../../infra/update-runner.js";
|
|
6
7
|
import { getUpdateAvailable, runGatewayUpdateCheck } from "../../../infra/update-startup.js";
|
|
7
8
|
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();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { buildDefaultCorsOrigins, isAllInterfacesHost, isLoopbackHost, resolveEffectiveGatewayPort, resolveGatewayServiceListenPort } from "./host.js";
|
|
2
2
|
import { defaultGatewayBindMode, isContainerEnvironment, resolveGatewayBindHost, resolveGatewayBindHostSync, resolveGatewayBindMode, resolveGatewayEffectiveHost } from "../config/gateway-bind.js";
|
|
3
|
+
import { checkPortAvailable, forceFreePortAndWait, listPortListeners, parseLsofOutput } from "./ports.js";
|
|
3
4
|
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
4
5
|
import { resolveGatewayListenHost, resolveGatewayListenPlan } from "./listen.js";
|
|
5
6
|
import { buckets } from "./rate-limit/buckets.js";
|
|
@@ -13,7 +14,6 @@ import { createHonoApp } from "./hono/app.js";
|
|
|
13
14
|
import { GatewayServer } from "./server.js";
|
|
14
15
|
import { GatewayLockError, acquireGatewayLock } from "./lock.js";
|
|
15
16
|
import { runGatewayLoop } from "./run-loop.js";
|
|
16
|
-
import { checkPortAvailable, forceFreePortAndWait, listPortListeners, parseLsofOutput } from "./ports.js";
|
|
17
17
|
import { apiError, apiOk } from "./protocol.js";
|
|
18
18
|
import "./hono/index.js";
|
|
19
19
|
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";
|
|
4
5
|
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
5
6
|
import { restartGatewayProcessWithFreshPid } from "./respawn.js";
|
|
6
7
|
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
|
|
@@ -88,7 +88,8 @@ export declare class GatewaySessionsApi {
|
|
|
88
88
|
patchAgentConfig(sessionKey: string, body: {
|
|
89
89
|
thinkingLevel?: string;
|
|
90
90
|
model?: string | null;
|
|
91
|
-
|
|
91
|
+
activityDetailLevel?: string | null;
|
|
92
|
+
reasoningLevel?: string | null;
|
|
92
93
|
verboseLevel?: string;
|
|
93
94
|
workingDirectory?: string;
|
|
94
95
|
}): Promise<import("../../agent/session/session-config-service.js").PatchSessionAgentConfigResult>;
|
|
@@ -50,6 +50,11 @@ import { FocusService } from "../focuses/service.js";
|
|
|
50
50
|
import { processFocusMonitorRun } from "../focuses/run-processor.js";
|
|
51
51
|
import { startFocusReconciler } from "../focuses/reconciler.js";
|
|
52
52
|
import "../focuses/index.js";
|
|
53
|
+
import { LocalAppService } from "../local-apps/service.js";
|
|
54
|
+
import "../local-apps/index.js";
|
|
55
|
+
import { scheduleGatewayUpdateCheck } from "../infra/update-startup.js";
|
|
56
|
+
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
57
|
+
import { MobileNotificationService } from "../mobile/notification-service.js";
|
|
53
58
|
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
54
59
|
import { reconcileDreamingAutomations } from "./dreaming-automation-reconciler.js";
|
|
55
60
|
import { NotesStore } from "../notes/store.js";
|
|
@@ -75,13 +80,8 @@ import "./rate-limit/index.js";
|
|
|
75
80
|
import { assertGatewayRuntimeConfig } from "./runtime-config.js";
|
|
76
81
|
import { auditGatewayConfig } from "./security/audit.js";
|
|
77
82
|
import { ModelCatalogSyncService } from "../providers/model-catalog-sync-service.js";
|
|
78
|
-
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
79
|
-
import { MobileNotificationService } from "../mobile/notification-service.js";
|
|
80
|
-
import { LocalAppService } from "../local-apps/service.js";
|
|
81
|
-
import "../local-apps/index.js";
|
|
82
83
|
import { createRuntimeBrowserRecipeService } from "../browser/recipes/runtime-service.js";
|
|
83
84
|
import "../browser/recipes/index.js";
|
|
84
|
-
import { scheduleGatewayUpdateCheck } from "../infra/update-startup.js";
|
|
85
85
|
import { resolveChannelConnectDeferSet } from "./resolve-channel-connect-defer.js";
|
|
86
86
|
import { restartGatewayProcessWithFreshPid } from "./respawn.js";
|
|
87
87
|
import { GatewaySessionsApi } from "./service/sessions-api.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, shouldSilence, stripHeartbeatToken } from "./tokens.js";
|
|
2
|
-
import { appendCronEventLines } from "./event-prompt.js";
|
|
3
2
|
import { isWithinActiveHours } from "./active-hours.js";
|
|
4
3
|
import { isHeartbeatContentEmpty } from "./content-check.js";
|
|
4
|
+
import { appendCronEventLines } from "./event-prompt.js";
|
|
5
5
|
import { createHeartbeatWake } from "./wake.js";
|
|
6
6
|
export { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, appendCronEventLines, createHeartbeatWake, isHeartbeatContentEmpty, isWithinActiveHours, shouldSilence, stripHeartbeatToken };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { listPortListeners } from "../gateway/ports.js";
|
|
2
1
|
import { isGatewayArgv, parseProcCmdline } from "./gateway-process-argv.js";
|
|
2
|
+
import { listPortListeners } from "../gateway/ports.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
5
|
//#region src/infra/gateway-processes.ts
|
|
@@ -2,10 +2,10 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { init_paths, resolveConfigPath } from "../config/paths.js";
|
|
4
4
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
|
-
import { resolveGatewayService } from "../daemon/service.js";
|
|
6
5
|
import { isRestartEnabled } from "../config/commands.flags.js";
|
|
7
|
-
import {
|
|
6
|
+
import { resolveGatewayService } from "../daemon/service.js";
|
|
8
7
|
import { findVerifiedGatewayListenerPidsOnPortSync, signalVerifiedGatewayPidSync } from "./gateway-processes.js";
|
|
8
|
+
import { authorizeGatewaySigusr1Restart, writeGatewayRestartIntentSync } from "./restart.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";
|
|
4
2
|
import { readPackageName, readPackageVersion } from "./package-json.js";
|
|
5
3
|
import { createDefaultCommandRunner, runCommandWithTimeout } from "./run-command.js";
|
|
6
4
|
import { XOPC_PACKAGE_NAME, cleanupGlobalRenameDirs, createGlobalInstallEnv, detectGlobalInstallManagerForRoot, resolveGlobalInstallSpec, resolveGlobalInstallTarget } from "./update-global.js";
|
|
7
5
|
import { runGlobalPackageUpdateSteps } from "./package-update-steps.js";
|
|
8
6
|
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";
|
|
7
6
|
import { normalizeUpdateChannel } from "./update-channels.js";
|
|
8
7
|
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
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
4
|
-
import { gatewayCredentialAuthorization } from "../gateway/credential.js";
|
|
5
4
|
import { loadUndiciRuntimeDeps } from "../infra/undici-fetch.js";
|
|
6
5
|
import { toConversation } from "./channel-shared.js";
|
|
6
|
+
import { gatewayCredentialAuthorization } from "../gateway/credential.js";
|
|
7
7
|
import { createGatewayHttpClientFromConfig, resolveGatewayHttpBaseUrl } from "./gateway-http-client.js";
|
|
8
8
|
//#region src/mcp/channel-bridge.ts
|
|
9
9
|
init_loader();
|
|
@@ -5,10 +5,11 @@ import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync
|
|
|
5
5
|
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
6
6
|
import { init_model_ref, splitProviderModelRef } from "./model-ref.js";
|
|
7
7
|
import { ModelRegistry, getModelRegistry, init_model_registry, prewarmModelRegistry, resetModelRegistry } from "./model-registry.js";
|
|
8
|
-
import { CredentialResolver, hasCredentials, init_credentials
|
|
8
|
+
import { CredentialResolver, hasCredentials, init_credentials } from "../auth/credentials.js";
|
|
9
9
|
import { EXTENSION_PROVIDER_BASE_URL, init_constants } from "./constants.js";
|
|
10
10
|
import { getSupplementalModels, init_model_supplements } from "./model-supplements.js";
|
|
11
11
|
import { getProviderRegistry, init_plugin_registry } from "./plugin-registry.js";
|
|
12
|
+
import { init_provider_auth_service, resolveProviderApiKey } from "./provider-auth-service.js";
|
|
12
13
|
import { getModel, getModels, getProviders } from "@earendil-works/pi-ai/compat";
|
|
13
14
|
//#region src/providers/index.ts
|
|
14
15
|
/**
|
|
@@ -144,7 +145,7 @@ function getAllProviders() {
|
|
|
144
145
|
}
|
|
145
146
|
async function getApiKey(provider, credentialOptions) {
|
|
146
147
|
if (getProviderRegistry().has(provider)) return "extension-managed";
|
|
147
|
-
const credentialKey = await
|
|
148
|
+
const credentialKey = await resolveProviderApiKey(provider, credentialOptions);
|
|
148
149
|
if (credentialKey) return credentialKey;
|
|
149
150
|
const registryKey = getModelRegistry().getApiKey(provider);
|
|
150
151
|
if (registryKey) return registryKey;
|
|
@@ -320,6 +321,7 @@ var init_providers = __esmMin((() => {
|
|
|
320
321
|
init_model_supplements();
|
|
321
322
|
init_model_ref();
|
|
322
323
|
init_plugin_registry();
|
|
324
|
+
init_provider_auth_service();
|
|
323
325
|
OPENAI_CODEX_CANONICAL_BASE_URL = "https://chatgpt.com/backend-api/codex";
|
|
324
326
|
PROVIDER_META = {
|
|
325
327
|
"xopc-cloud": {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ModelRuntime } from '@earendil-works/pi-coding-agent';
|
|
2
|
+
import { CredentialResolver, type CredentialResolverOptions } from '../auth/credentials.js';
|
|
3
|
+
import { XopcModelCredentialStore } from '../auth/model-credential-store.js';
|
|
4
|
+
type ApiKeyResolver = Pick<CredentialResolver, 'resolveApiKey'>;
|
|
5
|
+
export interface ProviderAuthServiceOptions {
|
|
6
|
+
credentials?: XopcModelCredentialStore;
|
|
7
|
+
resolver?: ApiKeyResolver;
|
|
8
|
+
runtimeFactory?: (credentials: XopcModelCredentialStore) => Promise<ModelRuntime>;
|
|
9
|
+
}
|
|
10
|
+
/** Resolves request credentials while keeping OAuth refresh inside the shared persistent store. */
|
|
11
|
+
export declare class ProviderAuthService {
|
|
12
|
+
private readonly credentials;
|
|
13
|
+
private readonly resolver;
|
|
14
|
+
private readonly runtimeFactory;
|
|
15
|
+
private runtime;
|
|
16
|
+
constructor(options?: ProviderAuthServiceOptions);
|
|
17
|
+
resolveApiKey(providerId: string, signal?: AbortSignal): Promise<string | null>;
|
|
18
|
+
private getRuntime;
|
|
19
|
+
}
|
|
20
|
+
export declare function getProviderAuthService(): ProviderAuthService;
|
|
21
|
+
export declare function resolveProviderApiKey(providerId: string, credentialOptions?: CredentialResolverOptions): Promise<string | null>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { init_paths, resolveModelsJsonPath } from "../config/paths.js";
|
|
3
|
+
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
4
|
+
import { XopcModelCredentialStore, init_model_credential_store } from "../auth/model-credential-store.js";
|
|
5
|
+
import { init_register_runtime_providers, registerRuntimeProviders } from "./register-runtime-providers.js";
|
|
6
|
+
import { InMemoryModelsStore } from "@earendil-works/pi-ai";
|
|
7
|
+
import { ModelRuntime } from "@earendil-works/pi-coding-agent";
|
|
8
|
+
//#region src/providers/provider-auth-service.ts
|
|
9
|
+
async function createAuthRuntime(credentials) {
|
|
10
|
+
const runtime = await ModelRuntime.create({
|
|
11
|
+
credentials,
|
|
12
|
+
modelsPath: resolveModelsJsonPath(),
|
|
13
|
+
modelsStore: new InMemoryModelsStore()
|
|
14
|
+
});
|
|
15
|
+
registerRuntimeProviders(runtime);
|
|
16
|
+
return runtime;
|
|
17
|
+
}
|
|
18
|
+
function getProviderAuthService() {
|
|
19
|
+
defaultProviderAuthService ??= new ProviderAuthService();
|
|
20
|
+
return defaultProviderAuthService;
|
|
21
|
+
}
|
|
22
|
+
async function resolveProviderApiKey(providerId, credentialOptions) {
|
|
23
|
+
if (!credentialOptions) return await getProviderAuthService().resolveApiKey(providerId);
|
|
24
|
+
const resolver = new CredentialResolver(credentialOptions);
|
|
25
|
+
return await new ProviderAuthService({
|
|
26
|
+
credentials: new XopcModelCredentialStore(resolver),
|
|
27
|
+
resolver
|
|
28
|
+
}).resolveApiKey(providerId);
|
|
29
|
+
}
|
|
30
|
+
var ProviderAuthService, defaultProviderAuthService;
|
|
31
|
+
var init_provider_auth_service = __esmMin((() => {
|
|
32
|
+
init_credentials();
|
|
33
|
+
init_model_credential_store();
|
|
34
|
+
init_paths();
|
|
35
|
+
init_register_runtime_providers();
|
|
36
|
+
ProviderAuthService = class {
|
|
37
|
+
credentials;
|
|
38
|
+
resolver;
|
|
39
|
+
runtimeFactory;
|
|
40
|
+
runtime;
|
|
41
|
+
constructor(options = {}) {
|
|
42
|
+
const defaultResolver = new CredentialResolver();
|
|
43
|
+
this.resolver = options.resolver ?? defaultResolver;
|
|
44
|
+
this.credentials = options.credentials ?? new XopcModelCredentialStore(defaultResolver);
|
|
45
|
+
this.runtimeFactory = options.runtimeFactory ?? createAuthRuntime;
|
|
46
|
+
}
|
|
47
|
+
async resolveApiKey(providerId, signal) {
|
|
48
|
+
if ((await this.credentials.read(providerId, { signal }))?.type === "oauth") {
|
|
49
|
+
const runtime = await this.getRuntime();
|
|
50
|
+
const provider = runtime.getProvider(providerId);
|
|
51
|
+
if (provider?.auth.oauth && !provider.auth.apiKey) return (await runtime.getAuth(providerId, { signal }))?.auth.apiKey ?? null;
|
|
52
|
+
}
|
|
53
|
+
return await this.resolver.resolveApiKey(providerId);
|
|
54
|
+
}
|
|
55
|
+
getRuntime() {
|
|
56
|
+
this.runtime ??= this.runtimeFactory(this.credentials).catch((error) => {
|
|
57
|
+
this.runtime = void 0;
|
|
58
|
+
throw error;
|
|
59
|
+
});
|
|
60
|
+
return this.runtime;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}));
|
|
64
|
+
//#endregion
|
|
65
|
+
init_provider_auth_service();
|
|
66
|
+
export { ProviderAuthService, getProviderAuthService, init_provider_auth_service, resolveProviderApiKey };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ModelRuntime } from '@earendil-works/pi-coding-agent';
|
|
2
|
+
import { type ModelCatalogSnapshot } from './model-catalog-store.js';
|
|
3
|
+
type RuntimeProviderRegistrar = Pick<ModelRuntime, 'registerProvider'>;
|
|
4
|
+
/** Register dynamically discovered model providers, including their OAuth contract. */
|
|
5
|
+
export declare function registerRuntimeProviders(modelRuntime: RuntimeProviderRegistrar, catalog?: ModelCatalogSnapshot): void;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
|
|
3
|
+
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
4
|
+
import { XOPC_CLOUD_PROVIDER_ID, init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
|
|
5
|
+
//#region src/providers/register-runtime-providers.ts
|
|
6
|
+
function registerRuntimeProvider(modelRuntime, source) {
|
|
7
|
+
const oauthDefinition = getOAuthProviderDefinition(source.providerId);
|
|
8
|
+
const oauth = oauthDefinition?.oauthOnly ? {
|
|
9
|
+
name: oauthDefinition.displayName,
|
|
10
|
+
login: oauthDefinition.provider.login.bind(oauthDefinition.provider),
|
|
11
|
+
refreshToken: oauthDefinition.provider.refreshToken.bind(oauthDefinition.provider),
|
|
12
|
+
getApiKey: oauthDefinition.provider.getApiKey.bind(oauthDefinition.provider)
|
|
13
|
+
} : void 0;
|
|
14
|
+
modelRuntime.registerProvider(source.providerId, {
|
|
15
|
+
name: oauthDefinition?.displayName ?? source.providerId,
|
|
16
|
+
baseUrl: source.baseUrl,
|
|
17
|
+
api: source.api,
|
|
18
|
+
oauth,
|
|
19
|
+
models: source.models.filter((model) => model.availability === "available").map((model) => ({
|
|
20
|
+
id: model.id,
|
|
21
|
+
name: model.name,
|
|
22
|
+
reasoning: false,
|
|
23
|
+
input: ["text"],
|
|
24
|
+
cost: {
|
|
25
|
+
input: 0,
|
|
26
|
+
output: 0,
|
|
27
|
+
cacheRead: 0,
|
|
28
|
+
cacheWrite: 0
|
|
29
|
+
},
|
|
30
|
+
contextWindow: 128e3,
|
|
31
|
+
maxTokens: model.maxOutputTokens ?? 16384
|
|
32
|
+
}))
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/** Register dynamically discovered model providers, including their OAuth contract. */
|
|
36
|
+
function registerRuntimeProviders(modelRuntime, catalog = getModelCatalogStore().load()) {
|
|
37
|
+
for (const source of Object.values(catalog.sources)) registerRuntimeProvider(modelRuntime, source);
|
|
38
|
+
if (!catalog.sources["xopc-cloud"]) registerRuntimeProvider(modelRuntime, {
|
|
39
|
+
providerId: XOPC_CLOUD_PROVIDER_ID,
|
|
40
|
+
baseUrl: resolveXopcModelRouterUrl(),
|
|
41
|
+
api: "openai-completions",
|
|
42
|
+
etag: null,
|
|
43
|
+
recommendedModel: null,
|
|
44
|
+
lastSuccessAt: 0,
|
|
45
|
+
models: []
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
var init_register_runtime_providers = __esmMin((() => {
|
|
49
|
+
init_registry();
|
|
50
|
+
init_model_catalog_store();
|
|
51
|
+
init_xopc_cloud_config();
|
|
52
|
+
}));
|
|
53
|
+
//#endregion
|
|
54
|
+
init_register_runtime_providers();
|
|
55
|
+
export { init_register_runtime_providers, registerRuntimeProviders };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ProviderAuthService } from './provider-auth-service.js';
|
|
3
3
|
declare const accountSummarySchema: z.ZodObject<{
|
|
4
4
|
balance: z.ZodObject<{
|
|
5
5
|
credits: z.ZodNumber;
|
|
@@ -33,7 +33,7 @@ export declare class XopcCloudAccountService {
|
|
|
33
33
|
constructor(options?: {
|
|
34
34
|
fetchImpl?: typeof fetch;
|
|
35
35
|
routerUrl?: string;
|
|
36
|
-
credentials?: Pick<
|
|
36
|
+
credentials?: Pick<ProviderAuthService, 'resolveApiKey'>;
|
|
37
37
|
});
|
|
38
38
|
getSummary(days?: 1 | 7 | 30): Promise<XopcCloudAccountSummary | null>;
|
|
39
39
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
|
|
2
|
+
import { getProviderAuthService, init_provider_auth_service } from "./provider-auth-service.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
//#region src/providers/xopc-cloud-account-service.ts
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
init_provider_auth_service();
|
|
6
|
+
init_xopc_cloud_config();
|
|
6
7
|
const accountSummarySchema = z.object({
|
|
7
8
|
balance: z.object({
|
|
8
9
|
credits: z.number().int().nonnegative(),
|
|
@@ -41,8 +42,8 @@ var XopcCloudAccountService = class {
|
|
|
41
42
|
credentials;
|
|
42
43
|
constructor(options = {}) {
|
|
43
44
|
this.fetchImpl = options.fetchImpl ?? fetch;
|
|
44
|
-
this.routerUrl = (options.routerUrl
|
|
45
|
-
this.credentials = options.credentials ??
|
|
45
|
+
this.routerUrl = resolveXopcModelRouterUrl(options.routerUrl);
|
|
46
|
+
this.credentials = options.credentials ?? getProviderAuthService();
|
|
46
47
|
}
|
|
47
48
|
async getSummary(days = 7) {
|
|
48
49
|
const accessToken = await this.credentials.resolveApiKey("xopc-cloud");
|