@xopcai/xopc 0.0.373 → 0.0.374
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear--kDkSTqC.js → agent-avatar-dicebear-BrA20N2m.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-z4_2-Kn2.js → agent-defaults-settings-panel-BZrOdxou.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-BYndK83K.js → agent-plugin-dialog-B3ux1AhY.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-CVo96cx1.js → agents-CXlXFU6M.js} +3 -3
- package/dist/gateway/static/root/assets/{app-management-settings-panel-D9oOJKiH.js → app-management-settings-panel-BXahEVPm.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-B0-8Cdyv.js → appearance-settings-CE2qJMkD.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DasVc6i4.js → apps-page-DGVOnCxZ.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BlCNqy2i.js → automations-page-BWL7eT4_.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-C8ipDP05.js → automations-workspace-BxIShhkZ.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Cktlez6g.js → block-editor-3n446-mX.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-KRfDl8ej.js → browser-automations-page-BmTK7Gtn.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-BraQ4wnh.js → browser-settings-page-DBQ-WETQ.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-B3m8xGzd.js → capabilities-page-D-nQ6Zzi.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-VQ4fHuBV.js → capabilities-settings-panel-Dx1fpBmH.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-header-actions-f5Ido4Eg.js → capability-header-actions-BRMqvQVb.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-N4Vc2nEG.js → channels-DXfEP1FR.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-BwvTKwsn.js → chat-terminal-dock-BRdzCjWO.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-CAwUsKpw.js → computer-settings-page-BhCHMRpD.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-C0HuAMuH.js → connector-service-page-BXE8Z-Ll.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-BcBmW8JT.js → connectors-page-D9RZjhw8.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-DiQxRpe-.js → date-picker-BJ7N92wm.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-Ds0_BJbN.js → dependency-picker-gyxCM-hb.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-ZMEOYwrR.js → desktop-pet-B-WM4l-L.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DkyTqD07.js → desktop-pet-settings-usJqcew5.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CvaI5ZJZ.js → device-pairing-wizard-DoSR4DGk.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-Bfv93eK1.js → directory-picker-path-field-DqVlV2YH.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-JXKGtIdM.js → extension-page-CUule9SU.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-lsQ2xvbr.js → extension-settings-page-_OFukkEJ.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-7bG0AND1.js → fallback-models-CiSc3h8i.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-BpbcoPx9.js → gateway-settings-qSUrpS1h.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-BxctC0aJ.js → home-page-COjDsuzg.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-Bq8CazCb.js → imports-page-DdvIj-ZL.js} +1 -1
- package/dist/gateway/static/root/assets/{index-B40-KDN8.js → index-DEaVabvo.js} +6 -6
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-kkAevkl2.js → keyboard-shortcuts-settings-DbqFlNsF.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-abLaf1hW.js → local-app-workbench-page-REowUzkp.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-nwsnwYjK.js → local-apps-page-DdCMNn_z.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-BEgYS-Xg.js → logs-page-B_6fHDoi.js} +1 -1
- package/dist/gateway/static/root/assets/management-settings-D4vcSRE3.js +1 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-CCnfurBR.js → note-detail-panel-B7U6EbAi.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-page-D9u_znxM.js → notes-page-BzHVaH8j.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-BO3FoRej.js → page-context-capture-button-D7Y4vFRN.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-E6huhFk4.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-Dso2_hyl.js → product-open-page-CK_czbBx.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-CkvVb3EA.js → product-preview-content-CU6KlaVP.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-UjrrzE3H.js → project-detail-page-c3ye2bdq.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-C1h63P2M.js → projects-page-BA1UuuRF.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-BJifH8AB.js → remote-access-hub-D_FLVZAm.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-vG1wqcEb.js → runtime-tools-settings-panel-Cxjmwdyf.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-CwoAoYMX.js → scenes-page-Av47PHdM.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-BIsHdyz7.js → schema-form-IM7QeSm3.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-BcCLp3yU.js → sessions-page-Bol3ScEc.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DpCanqrD.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-z9Jlk0BL.js → settings-page-BeVtwwVd.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-CrpXECqe.js → setup-status-panel-zTmrMwMm.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-D9XpTJXP.js → shares-settings-Bkhkt_6M.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-DtPOf1aW.js → skill-api-Dgwc707w.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-Bq9-2b9U.js → skills-page-CFIte-vM.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-P7T729uD.js → system-settings-panel-Ck6zGDHb.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-CsB9AFx6.js → task-detail-page-C3ZPEZqw.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CuowqIZ7.js → tunnel-api-CjxMpAm2.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-avX3msoZ.js → usage-page-Dnhp9xQ4.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-DGDBWw7P.js → user-model-page-sx1lNWKf.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BgJNz2tH.js → work-discovery-overlay-CVd_y3K2.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-1I2q2J_U.js → workflow-run-setup-panel-Dwg40uGK.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-DhJl9pnO.js → workflows-page-BQR4JdXB.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-CnPBP1V_.js → xopc-cloud-account-card-CaKc_J7j.js} +1 -1
- package/dist/gateway/static/root/index.html +1 -1
- package/dist/package.js +1 -1
- package/dist/packages/realtime-protocol/src/voice.js +11 -0
- package/dist/src/agent/agent-manager.js +4 -4
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +2 -2
- package/dist/src/agent/embedded/run-turn.js +2 -2
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/service.js +3 -3
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +3 -3
- package/dist/src/agent-config/schema.d.ts +9 -0
- package/dist/src/agent-config/schema.js +1 -0
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/model-credential-store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/image-providers.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/gateway/shared.js +2 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +3 -3
- package/dist/src/computer/runtime.js +1 -1
- package/dist/src/config/gateway-bind.js +2 -1
- package/dist/src/config/index.js +5 -5
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.d.ts +8 -8
- package/dist/src/config/models-json.js +2 -2
- package/dist/src/config/schema.d.ts +13 -12
- package/dist/src/config/schema.js +7 -3
- package/dist/src/daemon/constants.js +14 -9
- package/dist/src/daemon/index.js +4 -1
- package/dist/src/daemon/install-plan.js +2 -1
- package/dist/src/daemon/launchd.js +2 -1
- package/dist/src/daemon/schtasks.js +2 -1
- package/dist/src/daemon/service-audit.js +2 -1
- package/dist/src/daemon/service.js +2 -1
- package/dist/src/daemon/systemd.js +2 -1
- package/dist/src/extensions/activation-context.js +1 -1
- package/dist/src/gateway/client-ip.js +2 -1
- package/dist/src/gateway/hono/app.js +2 -1
- package/dist/src/gateway/hono/lib/config-payload.js +2 -2
- package/dist/src/gateway/hono/middleware/auth.d.ts +3 -5
- package/dist/src/gateway/hono/middleware/auth.js +56 -14
- package/dist/src/gateway/hono/middleware/logger.js +2 -1
- package/dist/src/gateway/hono/middleware/public-device-rate-limit.d.ts +16 -0
- package/dist/src/gateway/hono/middleware/public-device-rate-limit.js +43 -0
- package/dist/src/gateway/hono/middleware/strict-rate-limit.js +3 -2
- package/dist/src/gateway/hono/oauth-async.js +2 -1
- package/dist/src/gateway/hono/routes/browser.js +2 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/config.js +2 -1
- package/dist/src/gateway/hono/routes/device-pairing-approval.d.ts +3 -8
- package/dist/src/gateway/hono/routes/device-pairing-approval.js +5 -20
- package/dist/src/gateway/hono/routes/devices.js +25 -9
- package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -0
- package/dist/src/gateway/hono/routes/models.js +3 -3
- package/dist/src/gateway/hono/routes/observability.js +1 -1
- package/dist/src/gateway/hono/routes/personal-agent.js +3 -2
- package/dist/src/gateway/hono/routes/public-gateway.js +6 -6
- package/dist/src/gateway/hono/routes/shares.js +2 -1
- package/dist/src/gateway/hono/routes/voice.js +2 -1
- package/dist/src/gateway/host.js +9 -4
- package/dist/src/gateway/index.js +8 -4
- package/dist/src/gateway/listen.js +2 -1
- package/dist/src/gateway/rate-limit/auth-policy.js +7 -11
- package/dist/src/gateway/rate-limit/buckets.d.ts +6 -0
- package/dist/src/gateway/rate-limit/buckets.js +211 -189
- package/dist/src/gateway/rate-limit/env-flags.js +4 -1
- package/dist/src/gateway/rate-limit/index.js +13 -4
- package/dist/src/gateway/runtime-config.js +5 -3
- package/dist/src/gateway/security/audit.js +3 -2
- package/dist/src/gateway/security/browser-session.js +2 -1
- package/dist/src/gateway/security/device-request-proof.d.ts +28 -0
- package/dist/src/gateway/security/device-request-proof.js +122 -0
- package/dist/src/gateway/security/loopback.js +7 -6
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service/session-command-service.js +1 -1
- package/dist/src/gateway/service.js +12 -10
- package/dist/src/gateway/tailscale-auth.js +2 -1
- package/dist/src/gateway/ws-security.js +2 -1
- package/dist/src/home-intelligence/generator.js +1 -1
- package/dist/src/infra/rate-limit/failure-limiter.js +78 -90
- package/dist/src/infra/rate-limit/index.js +11 -3
- package/dist/src/infra/rate-limit/keyed-store.js +52 -47
- package/dist/src/infra/rate-limit/rate-limiter.js +55 -58
- package/dist/src/infra/update-service-refresh.js +2 -1
- package/dist/src/notes/service.js +1 -1
- package/dist/src/observability/runtime.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +2 -2
- package/dist/src/personal-agent/reply-composer.js +2 -2
- package/dist/src/personal-agent/repository.d.ts +3 -0
- package/dist/src/personal-agent/repository.js +1 -0
- package/dist/src/personal-agent/service.d.ts +6 -2
- package/dist/src/personal-agent/service.js +4 -3
- package/dist/src/platform/client.d.ts +1 -1
- package/dist/src/platform/contracts.d.ts +1 -1
- package/dist/src/platform/index.js +1 -1
- package/dist/src/providers/index.js +4 -4
- package/dist/src/providers/model-registry.js +2 -2
- package/dist/src/providers/provider-auth-service.js +1 -1
- package/dist/src/providers/provider-disconnect-core.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/providers/xopc-cloud-catalog-coordinator.js +1 -1
- package/dist/src/realtime/runtime.js +6 -0
- package/dist/src/realtime/tickets.d.ts +1 -0
- package/dist/src/realtime/tickets.js +4 -0
- package/dist/src/remote-access/exposure-guards.js +2 -1
- package/dist/src/share/share-rate-limit.js +2 -1
- package/dist/src/share/share-url.js +2 -1
- package/dist/src/share/site-share-router.js +2 -1
- package/dist/src/storage/sqlite/device-access-repository.d.ts +7 -0
- package/dist/src/storage/sqlite/device-access-repository.js +22 -4
- package/dist/src/storage/sqlite/migrations/243_voice_opening_greetings.sql +12 -0
- package/dist/src/storage/sqlite/migrations/244_device_request_proofs.sql +8 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tasks/task-main-update-decision-service.js +2 -2
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/tunnel/broker-client.js +2 -0
- package/dist/src/tunnel/tunnel-config.js +2 -2
- package/dist/src/tunnel/tunnel-rate-limit.js +2 -1
- package/dist/src/utils/logger/redact.js +4 -1
- package/dist/src/voice/platform-streams.d.ts +6 -0
- package/dist/src/voice/platform-streams.js +43 -4
- package/dist/src/voice/realtime/agentEngine.js +138 -83
- package/dist/src/voice/realtime/engine.d.ts +6 -0
- package/dist/src/voice/realtime/opening-greeting.d.ts +12 -0
- package/dist/src/voice/realtime/opening-greeting.js +22 -0
- package/dist/src/voice/realtime/runtime.js +90 -1
- package/dist/src/voice/realtime/runtime.types.d.ts +4 -0
- package/dist/src/work-discovery/service.js +2 -2
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/management-settings-D_JQ6_X0.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-BJn6UHAF.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-D114UdRI.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_workspace_defaults, resolveDefaultAgentWorkspaceDir } from "../../config/workspace-defaults.js";
|
|
4
|
-
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
5
4
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
|
+
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
6
6
|
import { getExecutionEnvironmentForSession } from "../../execution-environments/subject.js";
|
|
7
7
|
import { effectiveWorkspacePathForSession, projectWorkspacePath } from "../../session/session-workspace.js";
|
|
8
8
|
import { getProjectForSession } from "../../projects/workspace.js";
|
|
@@ -2,13 +2,13 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { TaskRepository, init_task_repository } from "../../tasks/task-repository.js";
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "../../tasks/task-run-repository.js";
|
|
5
|
-
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
6
5
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
7
|
-
import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
|
|
8
|
-
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
9
6
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
7
|
+
import { getApiKey, init_providers, resolveModel } from "../../providers/index.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";
|
|
11
|
+
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
12
12
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
13
13
|
//#region src/agent/tasks/task-judge-service.ts
|
|
14
14
|
init_schema();
|
|
@@ -317,6 +317,9 @@ export declare const AgentProfileSchema: z.ZodObject<{
|
|
|
317
317
|
model: z.ZodString;
|
|
318
318
|
voice: z.ZodString;
|
|
319
319
|
}, z.core.$strict>>;
|
|
320
|
+
voiceCallPreferences: z.ZodOptional<z.ZodObject<{
|
|
321
|
+
openingGreetingEnabled: z.ZodBoolean;
|
|
322
|
+
}, z.core.$strict>>;
|
|
320
323
|
responsePreferences: z.ZodOptional<z.ZodObject<{
|
|
321
324
|
addressAs: z.ZodOptional<z.ZodString>;
|
|
322
325
|
guidance: z.ZodOptional<z.ZodString>;
|
|
@@ -365,6 +368,9 @@ export declare const AgentEntrySchema: z.ZodObject<{
|
|
|
365
368
|
model: z.ZodString;
|
|
366
369
|
voice: z.ZodString;
|
|
367
370
|
}, z.core.$strict>>;
|
|
371
|
+
voiceCallPreferences: z.ZodOptional<z.ZodObject<{
|
|
372
|
+
openingGreetingEnabled: z.ZodBoolean;
|
|
373
|
+
}, z.core.$strict>>;
|
|
368
374
|
responsePreferences: z.ZodOptional<z.ZodObject<{
|
|
369
375
|
addressAs: z.ZodOptional<z.ZodString>;
|
|
370
376
|
guidance: z.ZodOptional<z.ZodString>;
|
|
@@ -511,6 +517,9 @@ export declare const EffectiveAgentConfigSchema: z.ZodObject<{
|
|
|
511
517
|
model: z.ZodString;
|
|
512
518
|
voice: z.ZodString;
|
|
513
519
|
}, z.core.$strict>>;
|
|
520
|
+
voiceCallPreferences: z.ZodOptional<z.ZodObject<{
|
|
521
|
+
openingGreetingEnabled: z.ZodBoolean;
|
|
522
|
+
}, z.core.$strict>>;
|
|
514
523
|
responsePreferences: z.ZodOptional<z.ZodObject<{
|
|
515
524
|
addressAs: z.ZodOptional<z.ZodString>;
|
|
516
525
|
guidance: z.ZodOptional<z.ZodString>;
|
|
@@ -172,6 +172,7 @@ var init_schema = __esmMin((() => {
|
|
|
172
172
|
model: z.string().trim().min(1).max(200),
|
|
173
173
|
voice: z.string().trim().min(1).max(200)
|
|
174
174
|
}).strict().optional(),
|
|
175
|
+
voiceCallPreferences: z.object({ openingGreetingEnabled: z.boolean() }).strict().optional(),
|
|
175
176
|
responsePreferences: ResponsePreferencesSchema.optional(),
|
|
176
177
|
instructions: z.string().trim().min(1).optional()
|
|
177
178
|
}).strict();
|
|
@@ -1,10 +1,10 @@
|
|
|
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 { trackAiUsageStream } from "../usage/recorder.js";
|
|
7
6
|
import { isLocalModelBaseUrl, resolveModelCallApiKey, resolveModelCallOptions } from "../providers/model-call.js";
|
|
7
|
+
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
8
8
|
import { normalizeContext } from "@earendil-works/pi-ai";
|
|
9
9
|
//#region src/ai-assist/text-assist.ts
|
|
10
10
|
init_providers();
|
|
@@ -2,11 +2,11 @@ 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 { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
5
|
-
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
6
|
-
import { assertCurrentModelProvider, init_provider_policy } from "../providers/provider-policy.js";
|
|
7
5
|
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
6
|
+
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
8
7
|
import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
|
|
9
8
|
import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
|
|
9
|
+
import { assertCurrentModelProvider, init_provider_policy } from "../providers/provider-policy.js";
|
|
10
10
|
import { dirname, join } from "path";
|
|
11
11
|
import { mkdir, readFile, readdir, rm } from "fs/promises";
|
|
12
12
|
//#region src/auth/credentials.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { assertCurrentModelProvider, init_provider_policy, isRetiredModelProvider } from "../providers/provider-policy.js";
|
|
3
2
|
import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
|
|
3
|
+
import { assertCurrentModelProvider, init_provider_policy, isRetiredModelProvider } from "../providers/provider-policy.js";
|
|
4
4
|
import { CredentialResolver, init_credentials } from "./credentials.js";
|
|
5
5
|
//#region src/auth/model-credential-store.ts
|
|
6
6
|
function normalizeProviderId(providerId) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
3
|
-
import { assertCurrentModelProvider, init_provider_policy } from "../providers/provider-policy.js";
|
|
4
3
|
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
4
|
+
import { assertCurrentModelProvider, init_provider_policy } from "../providers/provider-policy.js";
|
|
5
5
|
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
//#region src/auth/sync-provider-auth.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 { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
4
3
|
import { init_paths, resolveConfigPath } from "../../config/paths.js";
|
|
4
|
+
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
5
5
|
import { commandRegistry } from "../registry.js";
|
|
6
6
|
import { parseConfigValue } from "../config-value.js";
|
|
7
7
|
import { getConfigValueAtPath, parseConfigPath, setConfigValueAtPath, unsetConfigValueAtPath } from "../config-paths.js";
|
|
@@ -53,7 +53,7 @@ async function checkDatabaseSchema(ctx) {
|
|
|
53
53
|
id: "database-schema",
|
|
54
54
|
label: "Database schema",
|
|
55
55
|
status: "pass",
|
|
56
|
-
message: `SQLite schema v${status.dbVersion} (current release
|
|
56
|
+
message: `SQLite schema v${status.dbVersion} (current release v244).`,
|
|
57
57
|
hints: []
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveModelsJsonPath } from "../../../../config/paths.js";
|
|
2
|
-
import { init_models_json, loadModelsJson } from "../../../../config/models-json.js";
|
|
3
2
|
import { CredentialResolver, init_credentials } from "../../../../auth/credentials.js";
|
|
3
|
+
import { init_models_json, loadModelsJson } from "../../../../config/models-json.js";
|
|
4
4
|
import { classifyHost } from "../../../../media-shared/http/private-network.js";
|
|
5
5
|
import "../../../../media-shared/http/index.js";
|
|
6
6
|
import { existsSync } from "node:fs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../../../agent-catalog/repository.js";
|
|
2
|
-
import { getAgentDefaultModelRef, init_schema, parseModelRef } from "../../../../config/schema.js";
|
|
3
2
|
import { PROVIDER_ENV_MAP, init_env_keys } from "../../../../providers/env-keys.js";
|
|
4
3
|
import { getModelOAuthProviderIds, init_registry } from "../../../../auth/oauth/registry.js";
|
|
5
4
|
import { CredentialResolver, init_credentials } from "../../../../auth/credentials.js";
|
|
5
|
+
import { getAgentDefaultModelRef, init_schema, parseModelRef } from "../../../../config/schema.js";
|
|
6
6
|
import { getDefaultAgentId, init_resolve_route } from "../../../../routing/resolve-route.js";
|
|
7
7
|
import { loadConfig } from "../../../../config/loader.js";
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { init_constants, resolveGatewayLaunchAgentLabel, resolveGatewaySystemdServiceName, resolveGatewayWindowsTaskName } from "../../../daemon/constants.js";
|
|
1
2
|
import { init_paths, resolveConfigPath } from "../../../config/paths.js";
|
|
2
|
-
import { resolveGatewayLaunchAgentLabel, resolveGatewaySystemdServiceName, resolveGatewayWindowsTaskName } from "../../../daemon/constants.js";
|
|
3
3
|
import { loadConfig } from "../../../config/loader.js";
|
|
4
4
|
import "../../../config/index.js";
|
|
5
5
|
//#region src/cli/commands/gateway/shared.ts
|
|
6
6
|
init_paths();
|
|
7
|
+
init_constants();
|
|
7
8
|
function parsePortFromArgs(programArguments) {
|
|
8
9
|
if (!programArguments?.length) return null;
|
|
9
10
|
for (let i = 0; i < programArguments.length; i += 1) {
|
|
@@ -2,8 +2,8 @@ import { creditDecimal } from "../../../packages/gateway-contract/src/cloud-cred
|
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
4
4
|
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
5
|
-
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
6
5
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
6
|
+
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
7
7
|
import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
|
|
8
8
|
import { XopcCloudAccountService } from "../../providers/xopc-cloud-account-service.js";
|
|
9
9
|
import { listImageProviderSpecs } from "../../../packages/image-providers/src/catalog.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../../agent-catalog/repository.js";
|
|
2
2
|
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
3
|
-
import {
|
|
3
|
+
import { getApiKeyFromEnv } from "../../../providers/env-keys.js";
|
|
4
4
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
5
|
+
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
6
|
+
import { getAgentDefaultModelRef, init_schema } from "../../../config/schema.js";
|
|
5
7
|
import { init_models_json, loadModelsJson, saveModelsJson } from "../../../config/models-json.js";
|
|
6
|
-
import { getApiKeyFromEnv } from "../../../providers/env-keys.js";
|
|
7
8
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
8
|
-
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
9
9
|
import { getAllProviders, getModelsByProvider, getProviderDisplayName, init_providers, providerSupportsApiKey, providerSupportsOAuth } from "../../../providers/index.js";
|
|
10
10
|
import { prepareUpdateGlobalDefaults } from "../../../gateway/global-defaults-admin.js";
|
|
11
11
|
import { discoverProviderModels, isProviderApiDiscoverable } from "../../../providers/model-discovery.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
3
4
|
import { COMPUTER_CONTROL_TOOL, ComputerAppSchema, ComputerObservationSchema, ComputerWindowSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
4
5
|
import { ComputerServiceLimitsSchema, computerModelProfile, init_model_policy } from "./model-policy.js";
|
|
5
6
|
import { getApiKey, init_providers, resolveModel } from "../providers/index.js";
|
|
6
7
|
import { rejectUnbudgetedCloudTransport } from "../providers/xopc-cloud-credit-budget.js";
|
|
7
|
-
import { resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
8
8
|
import { enterComputerControl, leaveComputerControl } from "./control-guard.js";
|
|
9
9
|
import { ComputerDiagnosticSchema, ComputerOperationError, computerDiagnostic, computerRecovery } from "./errors.js";
|
|
10
10
|
import { createComputerModelAdapter, predictComputerStep, readComputerJson } from "./model-adapter.js";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { init_host, isLoopbackHost } from "../gateway/host.js";
|
|
1
2
|
import { getTailnetIPv4Sync } from "../infra/tailscale.js";
|
|
2
|
-
import { isLoopbackHost } from "../gateway/host.js";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import net from "node:net";
|
|
5
5
|
//#region src/config/gateway-bind.ts
|
|
6
|
+
init_host();
|
|
6
7
|
function resolveGatewayBindMode(cfg, bindOverride) {
|
|
7
8
|
if (bindOverride) return bindOverride;
|
|
8
9
|
return cfg.gateway?.bind ?? defaultGatewayBindMode();
|
package/dist/src/config/index.js
CHANGED
|
@@ -2,14 +2,14 @@ import { ENV_VARS, XOPC_DB_FILENAME, resolveHomeDir, resolveStateDir, resolveXop
|
|
|
2
2
|
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
3
3
|
import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
|
|
4
4
|
import { resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
5
|
+
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, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
5
6
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
6
7
|
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
7
|
-
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewayScenesConfigSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, 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, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
8
|
-
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
9
|
-
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, 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";
|
|
8
|
+
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewayScenesConfigSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, 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, TunnelBrokerUrlSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
11
9
|
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
12
10
|
import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
11
|
+
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
12
|
+
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";
|
|
13
13
|
import { canonicalizeConfiguredMcpServer, normalizeConfiguredMcpServers } from "./mcp-config-normalize.js";
|
|
14
14
|
import { formatThinkingLevels, listThinkingLevels, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, thinkLevelToNumber } from "../agent/transcript/thinking-types.js";
|
|
15
15
|
import { assertConfigRewriteSafeForRunningGateway, loadConfig, saveConfig } from "./loader.js";
|
|
@@ -26,4 +26,4 @@ init_workspace_path();
|
|
|
26
26
|
init_models_json();
|
|
27
27
|
init_resolve_config_value();
|
|
28
28
|
//#endregion
|
|
29
|
-
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, BASE_RELOAD_RULES, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigHotReloader, ConfigSchema, ConnectorsConfigSchema, CustomModelSchema, ENV_VARS, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, FILENAMES, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewayScenesConfigSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelOverrideSchema, ModelsDevConfigSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProfileManager, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VercelGatewayRoutingSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WORKSPACE_FILES, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, XOPC_DB_FILENAME, applyConfigOverrides, assertConfigRewriteSafeForRunningGateway, buildReloadPlan, canonicalizeConfiguredMcpServer, clearConfigValueCache, createProfile, deleteProfile, diffConfigPaths, existsSync, expandWorkspacePathString, extractProfileAgentId, formatThinkingLevels, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, getAllowedCommands, getCacheStats, getConfigOverrides, getCurrentProfile, getDefaultModelValues, resolveModelsJsonPath as getModelsJsonPath, getProfileManager, getProfileNameFromDir, getSwitchCommand, getWorkspacePath, hasBundledExtensionManifest, listAgentProfileMarkdownDirs, listAgentWorkspaceDirs, listProfiles, listThinkingLevels, loadConfig, loadModelsJson, matchReloadRule, modelsJsonExists, normalizeConfiguredMcpServers, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, normalizeWorkspaceDir, parseModelRef, resetConfigOverrides, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAgentWorkspaceDir, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveConfigValue, resolveCredentialsDir, resolveDefaultAgentWorkspaceDir, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveHeaders, resolveHomeDir, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveProfileStateDir, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStateDir, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceRoot, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath, resolveXopcCloudCatalogCachePath, resolveXopcDatabasePath, saveConfig, saveModelsJson, setConfigOverride, testApiKeyResolution, thinkLevelToNumber, unsetConfigOverride, validateModelsConfig };
|
|
29
|
+
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, BASE_RELOAD_RULES, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigHotReloader, ConfigSchema, ConnectorsConfigSchema, CustomModelSchema, ENV_VARS, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, FILENAMES, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewayScenesConfigSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelOverrideSchema, ModelsDevConfigSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProfileManager, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TunnelBrokerUrlSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VercelGatewayRoutingSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WORKSPACE_FILES, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, XOPC_DB_FILENAME, applyConfigOverrides, assertConfigRewriteSafeForRunningGateway, buildReloadPlan, canonicalizeConfiguredMcpServer, clearConfigValueCache, createProfile, deleteProfile, diffConfigPaths, existsSync, expandWorkspacePathString, extractProfileAgentId, formatThinkingLevels, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, getAllowedCommands, getCacheStats, getConfigOverrides, getCurrentProfile, getDefaultModelValues, resolveModelsJsonPath as getModelsJsonPath, getProfileManager, getProfileNameFromDir, getSwitchCommand, getWorkspacePath, hasBundledExtensionManifest, listAgentProfileMarkdownDirs, listAgentWorkspaceDirs, listProfiles, listThinkingLevels, loadConfig, loadModelsJson, matchReloadRule, modelsJsonExists, normalizeConfiguredMcpServers, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, normalizeWorkspaceDir, parseModelRef, resetConfigOverrides, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAgentWorkspaceDir, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveConfigValue, resolveCredentialsDir, resolveDefaultAgentWorkspaceDir, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveHeaders, resolveHomeDir, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveProfileStateDir, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStateDir, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceRoot, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath, resolveXopcCloudCatalogCachePath, resolveXopcDatabasePath, saveConfig, saveModelsJson, setConfigOverride, testApiKeyResolution, thinkLevelToNumber, unsetConfigOverride, validateModelsConfig };
|
|
@@ -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_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
|
-
import { ConfigSchema, init_schema } from "./schema.js";
|
|
5
4
|
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
6
5
|
import { init_resolution, setActivePlatformDiscovery } from "../platform/resolution.js";
|
|
6
|
+
import { ConfigSchema, init_schema } from "./schema.js";
|
|
7
7
|
import { assertChannelPluginConfigs } from "./validate-channel-configs.js";
|
|
8
8
|
import { isGatewayConfigLockedByAnotherProcessSync } from "../gateway/lock.js";
|
|
9
9
|
import { dirname } from "path";
|
|
@@ -29,8 +29,8 @@ export declare const OpenAICompletionsCompatSchema: z.ZodObject<{
|
|
|
29
29
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
30
30
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
31
31
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
32
|
-
"ant-ling": "ant-ling";
|
|
33
32
|
openai: "openai";
|
|
33
|
+
"ant-ling": "ant-ling";
|
|
34
34
|
deepseek: "deepseek";
|
|
35
35
|
openrouter: "openrouter";
|
|
36
36
|
zai: "zai";
|
|
@@ -67,8 +67,8 @@ export declare const OpenAICompatSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
67
67
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
68
68
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
69
69
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
70
|
-
"ant-ling": "ant-ling";
|
|
71
70
|
openai: "openai";
|
|
71
|
+
"ant-ling": "ant-ling";
|
|
72
72
|
deepseek: "deepseek";
|
|
73
73
|
openrouter: "openrouter";
|
|
74
74
|
zai: "zai";
|
|
@@ -420,8 +420,8 @@ export declare const CustomModelSchema: z.ZodObject<{
|
|
|
420
420
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
421
421
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
422
422
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
423
|
-
"ant-ling": "ant-ling";
|
|
424
423
|
openai: "openai";
|
|
424
|
+
"ant-ling": "ant-ling";
|
|
425
425
|
deepseek: "deepseek";
|
|
426
426
|
openrouter: "openrouter";
|
|
427
427
|
zai: "zai";
|
|
@@ -490,8 +490,8 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
490
490
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
491
491
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
492
492
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
493
|
-
"ant-ling": "ant-ling";
|
|
494
493
|
openai: "openai";
|
|
494
|
+
"ant-ling": "ant-ling";
|
|
495
495
|
deepseek: "deepseek";
|
|
496
496
|
openrouter: "openrouter";
|
|
497
497
|
zai: "zai";
|
|
@@ -586,8 +586,8 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
586
586
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
587
587
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
588
588
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
589
|
-
"ant-ling": "ant-ling";
|
|
590
589
|
openai: "openai";
|
|
590
|
+
"ant-ling": "ant-ling";
|
|
591
591
|
deepseek: "deepseek";
|
|
592
592
|
openrouter: "openrouter";
|
|
593
593
|
zai: "zai";
|
|
@@ -656,8 +656,8 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
656
656
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
657
657
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
658
658
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
659
|
-
"ant-ling": "ant-ling";
|
|
660
659
|
openai: "openai";
|
|
660
|
+
"ant-ling": "ant-ling";
|
|
661
661
|
deepseek: "deepseek";
|
|
662
662
|
openrouter: "openrouter";
|
|
663
663
|
zai: "zai";
|
|
@@ -867,8 +867,8 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
867
867
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
868
868
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
869
869
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
870
|
-
"ant-ling": "ant-ling";
|
|
871
870
|
openai: "openai";
|
|
871
|
+
"ant-ling": "ant-ling";
|
|
872
872
|
deepseek: "deepseek";
|
|
873
873
|
openrouter: "openrouter";
|
|
874
874
|
zai: "zai";
|
|
@@ -937,8 +937,8 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
937
937
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
938
938
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
939
939
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
940
|
-
"ant-ling": "ant-ling";
|
|
941
940
|
openai: "openai";
|
|
941
|
+
"ant-ling": "ant-ling";
|
|
942
942
|
deepseek: "deepseek";
|
|
943
943
|
openrouter: "openrouter";
|
|
944
944
|
zai: "zai";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
3
|
-
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
4
3
|
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
5
|
-
import { init_model_policy, isComputerModel } from "../computer/model-policy.js";
|
|
6
4
|
import { assertCurrentModelProvider, init_provider_policy } from "../providers/provider-policy.js";
|
|
5
|
+
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
6
|
+
import { init_model_policy, isComputerModel } from "../computer/model-policy.js";
|
|
7
7
|
import { existsSync, readFileSync } from "fs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
//#region src/config/models-json.ts
|
|
@@ -501,6 +501,7 @@ export declare const TunnelConsentSchema: z.ZodObject<{
|
|
|
501
501
|
version: z.ZodString;
|
|
502
502
|
acceptedAt: z.ZodString;
|
|
503
503
|
}, z.core.$strip>;
|
|
504
|
+
export declare const TunnelBrokerUrlSchema: z.ZodString;
|
|
504
505
|
export declare const TunnelConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
505
506
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
506
507
|
brokerUrl: z.ZodDefault<z.ZodString>;
|
|
@@ -1190,15 +1191,15 @@ export declare const McpServerSchema: z.ZodObject<{
|
|
|
1190
1191
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1191
1192
|
exposure: z.ZodOptional<z.ZodEnum<{
|
|
1192
1193
|
direct: "direct";
|
|
1193
|
-
hidden: "hidden";
|
|
1194
|
-
deferred: "deferred";
|
|
1195
1194
|
codemode: "codemode";
|
|
1195
|
+
deferred: "deferred";
|
|
1196
|
+
hidden: "hidden";
|
|
1196
1197
|
}>>;
|
|
1197
1198
|
toolExposure: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
1198
1199
|
direct: "direct";
|
|
1199
|
-
hidden: "hidden";
|
|
1200
|
-
deferred: "deferred";
|
|
1201
1200
|
codemode: "codemode";
|
|
1201
|
+
deferred: "deferred";
|
|
1202
|
+
hidden: "hidden";
|
|
1202
1203
|
}>>>;
|
|
1203
1204
|
description: z.ZodOptional<z.ZodString>;
|
|
1204
1205
|
transport: z.ZodOptional<z.ZodNever>;
|
|
@@ -1253,15 +1254,15 @@ export declare const McpConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
1253
1254
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1254
1255
|
exposure: z.ZodOptional<z.ZodEnum<{
|
|
1255
1256
|
direct: "direct";
|
|
1256
|
-
hidden: "hidden";
|
|
1257
|
-
deferred: "deferred";
|
|
1258
1257
|
codemode: "codemode";
|
|
1258
|
+
deferred: "deferred";
|
|
1259
|
+
hidden: "hidden";
|
|
1259
1260
|
}>>;
|
|
1260
1261
|
toolExposure: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
1261
1262
|
direct: "direct";
|
|
1262
|
-
hidden: "hidden";
|
|
1263
|
-
deferred: "deferred";
|
|
1264
1263
|
codemode: "codemode";
|
|
1264
|
+
deferred: "deferred";
|
|
1265
|
+
hidden: "hidden";
|
|
1265
1266
|
}>>>;
|
|
1266
1267
|
description: z.ZodOptional<z.ZodString>;
|
|
1267
1268
|
transport: z.ZodOptional<z.ZodNever>;
|
|
@@ -1895,15 +1896,15 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1895
1896
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1896
1897
|
exposure: z.ZodOptional<z.ZodEnum<{
|
|
1897
1898
|
direct: "direct";
|
|
1898
|
-
hidden: "hidden";
|
|
1899
|
-
deferred: "deferred";
|
|
1900
1899
|
codemode: "codemode";
|
|
1900
|
+
deferred: "deferred";
|
|
1901
|
+
hidden: "hidden";
|
|
1901
1902
|
}>>;
|
|
1902
1903
|
toolExposure: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
1903
1904
|
direct: "direct";
|
|
1904
|
-
hidden: "hidden";
|
|
1905
|
-
deferred: "deferred";
|
|
1906
1905
|
codemode: "codemode";
|
|
1906
|
+
deferred: "deferred";
|
|
1907
|
+
hidden: "hidden";
|
|
1907
1908
|
}>>>;
|
|
1908
1909
|
description: z.ZodOptional<z.ZodString>;
|
|
1909
1910
|
transport: z.ZodOptional<z.ZodNever>;
|
|
@@ -42,7 +42,7 @@ function parseModelRef(ref) {
|
|
|
42
42
|
model: trimmed.slice(idx + 1).trim()
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
var AgentModelRefSchema, AgentImageGenerationModelSchema, AgentModelsSchema, BrowserDriverSchema, BrowserHostnameSchema, BrowserConfigSchema, SessionDmScopeSchema, SessionStorageConfigSchema, SessionResetModeSchema, SessionResetConfigSchema, SessionResetByTypeSchema, SessionScopeSchema, SessionConfigSchema, ChannelsConfigSchema, SearchProviderEntrySchema, WebSearchConfigSchema, WebsiteBlocklistSchema, WebToolsConfigSchema, ToolsConfigSchema, RuntimePreferenceSchema, RuntimeProvisionSchema, RuntimeVersionRequestSchema, LanguageRuntimeSchema, DEFAULT_RUNTIME_TOOLS_CONFIG, RuntimeToolsConfigSchema, GatewayAuthRateLimitSchema, GatewaySecuritySchema, GatewayTrustedProxySchema, GatewayAuthSchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayRemoteSchema, GatewayTlsSchema, GatewayModeSchema, GatewayChannelConnectDeferModeSchema, TunnelConsentSchema, TunnelConfigSchema, WorkspaceImportConfigSchema, WorkspaceConfigSchema, GatewayBindModeSchema, GatewayWebchatConfigSchema, GatewayScenesConfigSchema, 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, UpdateConfigSchema, CommandsConfigSchema, McpHttpUrlSchema, ConnectorSecretReferenceSchema, McpConfigScalarSchema, McpExposureSchema, McpOAuthConfigSchema, McpServerSchema, McpConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ConfigSchema;
|
|
45
|
+
var AgentModelRefSchema, AgentImageGenerationModelSchema, AgentModelsSchema, BrowserDriverSchema, BrowserHostnameSchema, BrowserConfigSchema, SessionDmScopeSchema, SessionStorageConfigSchema, SessionResetModeSchema, SessionResetConfigSchema, SessionResetByTypeSchema, SessionScopeSchema, SessionConfigSchema, ChannelsConfigSchema, SearchProviderEntrySchema, WebSearchConfigSchema, WebsiteBlocklistSchema, WebToolsConfigSchema, ToolsConfigSchema, RuntimePreferenceSchema, RuntimeProvisionSchema, RuntimeVersionRequestSchema, LanguageRuntimeSchema, DEFAULT_RUNTIME_TOOLS_CONFIG, RuntimeToolsConfigSchema, GatewayAuthRateLimitSchema, GatewaySecuritySchema, GatewayTrustedProxySchema, GatewayAuthSchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayRemoteSchema, GatewayTlsSchema, GatewayModeSchema, GatewayChannelConnectDeferModeSchema, TunnelConsentSchema, TunnelBrokerUrlSchema, TunnelConfigSchema, WorkspaceImportConfigSchema, WorkspaceConfigSchema, GatewayBindModeSchema, GatewayWebchatConfigSchema, GatewayScenesConfigSchema, 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, UpdateConfigSchema, CommandsConfigSchema, McpHttpUrlSchema, ConnectorSecretReferenceSchema, McpConfigScalarSchema, McpExposureSchema, McpOAuthConfigSchema, McpServerSchema, McpConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ConfigSchema;
|
|
46
46
|
var init_schema = __esmMin((() => {
|
|
47
47
|
init_config();
|
|
48
48
|
init_config$1();
|
|
@@ -393,9 +393,13 @@ strict: z.boolean().optional() }).optional();
|
|
|
393
393
|
version: z.string().min(1),
|
|
394
394
|
acceptedAt: z.string().min(1)
|
|
395
395
|
});
|
|
396
|
+
TunnelBrokerUrlSchema = z.string().url().refine((value) => {
|
|
397
|
+
const url = new URL(value);
|
|
398
|
+
return url.protocol === "https:" && !url.username && !url.password;
|
|
399
|
+
}, "Tunnel broker requires HTTPS without URL credentials");
|
|
396
400
|
TunnelConfigSchema = z.object({
|
|
397
401
|
enabled: z.boolean().default(false),
|
|
398
|
-
brokerUrl:
|
|
402
|
+
brokerUrl: TunnelBrokerUrlSchema.default("https://frp.xopc.ai/api"),
|
|
399
403
|
/** Broker register API secret. */
|
|
400
404
|
registrationSecret: z.string().min(1).optional(),
|
|
401
405
|
autoStart: z.boolean().default(false),
|
|
@@ -1142,4 +1146,4 @@ workDiscoveryOnboarding: z.boolean().default(true) }).strict().default({ workDis
|
|
|
1142
1146
|
}));
|
|
1143
1147
|
//#endregion
|
|
1144
1148
|
init_schema();
|
|
1145
|
-
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewayScenesConfigSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, 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, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef };
|
|
1149
|
+
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewayScenesConfigSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, 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, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TunnelBrokerUrlSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
1
2
|
import os from "node:os";
|
|
2
3
|
import path from "node:path";
|
|
3
4
|
//#region src/daemon/constants.ts
|
|
4
5
|
/**
|
|
5
6
|
* Daemon Constants - Service labels, paths, and configuration values
|
|
6
7
|
*/
|
|
7
|
-
const SERVICE_BASE_LABEL = "ai.xopc.gateway";
|
|
8
8
|
function resolveGatewayLaunchAgentLabel(profile) {
|
|
9
9
|
const normalized = normalizeProfile(profile);
|
|
10
10
|
return normalized ? `${SERVICE_BASE_LABEL}.${normalized}` : SERVICE_BASE_LABEL;
|
|
@@ -39,12 +39,17 @@ function normalizeProfile(profile) {
|
|
|
39
39
|
if (!trimmed || trimmed.toLowerCase() === "default") return null;
|
|
40
40
|
return trimmed;
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
var SERVICE_BASE_LABEL, DEFAULT_GATEWAY_PORT, LAUNCH_AGENT_THROTTLE_INTERVAL_SECONDS, LAUNCH_AGENT_EXIT_TIMEOUT_SECONDS, SYSTEMD_RESTART_SEC, SYSTEMD_START_LIMIT_BURST, SYSTEMD_START_LIMIT_INTERVAL_SEC, SERVICE_VERSION_ENV_KEY;
|
|
43
|
+
var init_constants = __esmMin((() => {
|
|
44
|
+
SERVICE_BASE_LABEL = "ai.xopc.gateway";
|
|
45
|
+
DEFAULT_GATEWAY_PORT = 18790;
|
|
46
|
+
LAUNCH_AGENT_THROTTLE_INTERVAL_SECONDS = 10;
|
|
47
|
+
LAUNCH_AGENT_EXIT_TIMEOUT_SECONDS = 20;
|
|
48
|
+
SYSTEMD_RESTART_SEC = 5;
|
|
49
|
+
SYSTEMD_START_LIMIT_BURST = 5;
|
|
50
|
+
SYSTEMD_START_LIMIT_INTERVAL_SEC = 60;
|
|
51
|
+
SERVICE_VERSION_ENV_KEY = "XOPC_SERVICE_VERSION";
|
|
52
|
+
}));
|
|
49
53
|
//#endregion
|
|
50
|
-
|
|
54
|
+
init_constants();
|
|
55
|
+
export { DEFAULT_GATEWAY_PORT, LAUNCH_AGENT_EXIT_TIMEOUT_SECONDS, LAUNCH_AGENT_THROTTLE_INTERVAL_SECONDS, SERVICE_VERSION_ENV_KEY, SYSTEMD_RESTART_SEC, SYSTEMD_START_LIMIT_BURST, SYSTEMD_START_LIMIT_INTERVAL_SEC, formatGatewayServiceDescription, init_constants, resolveGatewayLaunchAgentLabel, resolveGatewaySystemdServiceName, resolveGatewayWindowsTaskName, resolveLaunchAgentPlistPath, resolveSystemdUnitPath };
|
package/dist/src/daemon/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { DEFAULT_GATEWAY_PORT, LAUNCH_AGENT_EXIT_TIMEOUT_SECONDS, LAUNCH_AGENT_THROTTLE_INTERVAL_SECONDS, SERVICE_VERSION_ENV_KEY, SYSTEMD_RESTART_SEC, SYSTEMD_START_LIMIT_BURST, SYSTEMD_START_LIMIT_INTERVAL_SEC, formatGatewayServiceDescription, resolveGatewayLaunchAgentLabel, resolveGatewaySystemdServiceName, resolveGatewayWindowsTaskName, resolveLaunchAgentPlistPath, resolveSystemdUnitPath } from "./constants.js";
|
|
1
|
+
import { DEFAULT_GATEWAY_PORT, LAUNCH_AGENT_EXIT_TIMEOUT_SECONDS, LAUNCH_AGENT_THROTTLE_INTERVAL_SECONDS, SERVICE_VERSION_ENV_KEY, SYSTEMD_RESTART_SEC, SYSTEMD_START_LIMIT_BURST, SYSTEMD_START_LIMIT_INTERVAL_SEC, formatGatewayServiceDescription, init_constants, resolveGatewayLaunchAgentLabel, resolveGatewaySystemdServiceName, resolveGatewayWindowsTaskName, resolveLaunchAgentPlistPath, resolveSystemdUnitPath } from "./constants.js";
|
|
2
2
|
import { describeGatewayServiceRestart, getPlatformName, getServiceLabel, isDaemonAvailable, isDaemonAvailableAsync, resolveGatewayService, startGatewayService } from "./service.js";
|
|
3
3
|
import { buildGatewayInstallArgs, buildGatewayInstallPlan, validateInstallPlanProgram } from "./install-plan.js";
|
|
4
|
+
//#region src/daemon/index.ts
|
|
5
|
+
init_constants();
|
|
6
|
+
//#endregion
|
|
4
7
|
export { DEFAULT_GATEWAY_PORT, LAUNCH_AGENT_EXIT_TIMEOUT_SECONDS, LAUNCH_AGENT_THROTTLE_INTERVAL_SECONDS, SERVICE_VERSION_ENV_KEY, SYSTEMD_RESTART_SEC, SYSTEMD_START_LIMIT_BURST, SYSTEMD_START_LIMIT_INTERVAL_SEC, buildGatewayInstallArgs, buildGatewayInstallPlan, describeGatewayServiceRestart, formatGatewayServiceDescription, getPlatformName, getServiceLabel, isDaemonAvailable, isDaemonAvailableAsync, resolveGatewayLaunchAgentLabel, resolveGatewayService, resolveGatewaySystemdServiceName, resolveGatewayWindowsTaskName, resolveLaunchAgentPlistPath, resolveSystemdUnitPath, startGatewayService, validateInstallPlanProgram };
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { SERVICE_VERSION_ENV_KEY, formatGatewayServiceDescription } from "./constants.js";
|
|
4
|
+
import { SERVICE_VERSION_ENV_KEY, formatGatewayServiceDescription, init_constants } from "./constants.js";
|
|
5
5
|
import { homedir } from "node:os";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
@@ -14,6 +14,7 @@ import { fileURLToPath } from "node:url";
|
|
|
14
14
|
* supports binary runtime detection, and --foreground arg passing.
|
|
15
15
|
*/
|
|
16
16
|
init_logger();
|
|
17
|
+
init_constants();
|
|
17
18
|
init_package_version();
|
|
18
19
|
const log = createLogger("InstallPlan");
|
|
19
20
|
function resolveDefaultConfigPath() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { resolveGatewayLaunchAgentLabel, resolveLaunchAgentPlistPath as resolveLaunchAgentPlistPath$1 } from "./constants.js";
|
|
3
|
+
import { init_constants, resolveGatewayLaunchAgentLabel, resolveLaunchAgentPlistPath as resolveLaunchAgentPlistPath$1 } from "./constants.js";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { existsSync } from "node:fs";
|
|
@@ -18,6 +18,7 @@ import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
|
18
18
|
* - launchctl kickstart -k for restart
|
|
19
19
|
*/
|
|
20
20
|
init_logger();
|
|
21
|
+
init_constants();
|
|
21
22
|
const log = createLogger("LaunchdService");
|
|
22
23
|
function resolveGuiDomain() {
|
|
23
24
|
return `gui/${typeof process.getuid === "function" ? process.getuid() : 501}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { resolveGatewayWindowsTaskName } from "./constants.js";
|
|
3
|
+
import { init_constants, resolveGatewayWindowsTaskName } from "./constants.js";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -15,6 +15,7 @@ import { spawn, spawnSync } from "node:child_process";
|
|
|
15
15
|
* - Proper start/stop/restart lifecycle
|
|
16
16
|
*/
|
|
17
17
|
init_logger();
|
|
18
|
+
init_constants();
|
|
18
19
|
const log = createLogger("SchtasksService");
|
|
19
20
|
function resolveProfileFromEnv(env) {
|
|
20
21
|
return env?.XOPC_PROFILE?.trim() || void 0;
|