@xopcai/xopc 0.0.419 → 0.0.420
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/adapters/cli-login.js +3 -3
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.js +2 -2
- package/dist/extensions/telegram/src/outbound-sender.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +2 -2
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +2 -2
- package/dist/extensions/weixin/src/auth/accounts.js +12 -12
- package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
- package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
- package/dist/gateway/static/root/assets/{index-DS60ZSdQ.js → index-UCOlAnf-.js} +1 -1
- package/dist/gateway/static/root/index.html +1 -1
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +17 -17
- package/dist/src/agent/agent-scope.js +2 -2
- package/dist/src/agent/background-review/prompts.js +1 -1
- package/dist/src/agent/background-review/run-background-review.js +12 -12
- package/dist/src/agent/child-agent-factory.js +2 -2
- package/dist/src/agent/coding/repository-instructions.js +1 -1
- package/dist/src/agent/context/coordinator.js +2 -2
- package/dist/src/agent/context/execution-context.js +4 -4
- package/dist/src/agent/context/project-context.js +3 -3
- package/dist/src/agent/data-acquisition/service.js +1 -1
- package/dist/src/agent/embedded/codemode-extension.js +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.js +1 -1
- package/dist/src/agent/embedded/external-tool-discovery.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +5 -5
- package/dist/src/agent/embedded/run-turn.js +15 -15
- package/dist/src/agent/embedded/session-runner.js +4 -4
- package/dist/src/agent/embedded/session-tool-result-guard.js +2 -2
- package/dist/src/agent/embedded/tool-result-truncation.js +1 -1
- package/dist/src/agent/embedded/xopc-tools-bridge.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.js +3 -3
- package/dist/src/agent/external-tools/composio-provider.js +2 -2
- package/dist/src/agent/external-tools/endpoint-provider.js +4 -4
- package/dist/src/agent/external-tools/extension-provider.js +1 -1
- package/dist/src/agent/external-tools/gateway-tools.js +3 -3
- package/dist/src/agent/external-tools/memory-provider.js +1 -1
- package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/generation/runtime.js +1 -1
- package/dist/src/agent/image/index.js +1 -1
- package/dist/src/agent/image/load-image-media.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +3 -3
- package/dist/src/agent/inbound/inbound-loop.js +2 -2
- package/dist/src/agent/independent-execution.js +1 -1
- package/dist/src/agent/index.js +3 -3
- package/dist/src/agent/mcp/connection-drafts.js +1 -1
- package/dist/src/agent/memory/context-budget.js +1 -1
- package/dist/src/agent/memory/context-recovery.js +1 -1
- package/dist/src/agent/memory/index.js +1 -1
- package/dist/src/agent/orchestration/llm-turn-retry.js +1 -1
- package/dist/src/agent/prompt/response-language.js +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +4 -4
- package/dist/src/agent/prompt/system-prompt-params.js +1 -1
- package/dist/src/agent/sandbox/exec-policy.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +4 -4
- package/dist/src/agent/service/process-direct-streaming.js +7 -7
- package/dist/src/agent/service/webchat-tts.js +2 -2
- package/dist/src/agent/service.js +22 -22
- package/dist/src/agent/session/session-config-service.js +2 -2
- package/dist/src/agent/session/session-hydrator.js +1 -1
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/filesystem-watcher.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +2 -2
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
- package/dist/src/agent/skills/skill-manager.js +1 -1
- package/dist/src/agent/skills/skill-sources.js +1 -1
- package/dist/src/agent/source-context/index.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +8 -8
- package/dist/src/agent/tools/create-share-tool.js +3 -3
- package/dist/src/agent/tools/dataBatch.js +1 -1
- package/dist/src/agent/tools/delegate-tool.js +3 -3
- package/dist/src/agent/tools/exec-command.js +1 -1
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.js +18 -18
- package/dist/src/agent/tools/fetch-text.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +3 -3
- package/dist/src/agent/tools/index.js +5 -5
- package/dist/src/agent/tools/list-dir.js +1 -1
- package/dist/src/agent/tools/personal-attention-tool.js +2 -2
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-result-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-tool.js +4 -4
- package/dist/src/agent/tools/personal-result-tool.js +1 -1
- package/dist/src/agent/tools/personal-task-tool.js +6 -6
- package/dist/src/agent/tools/publish-artifacts.js +2 -2
- package/dist/src/agent/tools/read.js +2 -2
- package/dist/src/agent/tools/review-workspace.js +1 -1
- package/dist/src/agent/tools/send-media.js +1 -1
- package/dist/src/agent/tools/session-search-tool.js +1 -1
- package/dist/src/agent/tools/skills-tools.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +2 -2
- package/dist/src/agent/tools/tts-tool.js +1 -1
- package/dist/src/agent/tools/user-context-tool.js +2 -2
- package/dist/src/agent/tools/web.js +1 -1
- package/dist/src/agent/tools/write.js +2 -2
- package/dist/src/agent/tools/xopc-use-tool.js +5 -5
- package/dist/src/agent/transcript/index.js +2 -2
- package/dist/src/agent/transcript/transcript-hygiene.js +2 -2
- package/dist/src/agent-matching/delegation-service.js +1 -1
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +1 -1
- package/dist/src/auth/oauth/openai.js +1 -1
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/automations/domain/index.js +1 -1
- package/dist/src/automations/draft/automation-draft-service.js +1 -1
- package/dist/src/automations/index.js +2 -2
- package/dist/src/automations/service/action-executor.js +1 -1
- package/dist/src/browser/native-messaging-host.js +1 -1
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/capabilities/store-connector.js +1 -1
- package/dist/src/channels/attachments/voice-stt-webchat.js +2 -2
- package/dist/src/channels/index.js +2 -2
- package/dist/src/channels/outbound-sender.js +1 -1
- package/dist/src/channels/pairing/allow-from-file.js +9 -9
- package/dist/src/channels/pairing/pairing-store.js +6 -6
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +3 -3
- package/dist/src/chat-commands/builtins/session.js +1 -1
- package/dist/src/chat-commands/builtins/thinking.js +1 -1
- package/dist/src/chat-commands/builtins/tts.js +1 -1
- package/dist/src/chat-commands/context.js +1 -1
- package/dist/src/chat-commands/index.js +3 -3
- package/dist/src/cli/commands/agent.js +8 -8
- package/dist/src/cli/commands/config.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/doctor/checks/channel-plugins.js +1 -1
- package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +2 -2
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension.js +2 -2
- package/dist/src/cli/commands/image.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/mcp.js +2 -2
- package/dist/src/cli/commands/models.js +2 -2
- package/dist/src/cli/commands/onboard/channels/registry.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/project.js +1 -1
- package/dist/src/cli/commands/skills.js +2 -2
- package/dist/src/cli/commands/tunnel.js +4 -4
- package/dist/src/cli/extension-cli-register.js +6 -6
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +2 -2
- package/dist/src/cli/utils/session.js +1 -1
- package/dist/src/computer/flows.js +1 -1
- package/dist/src/computer/model-adapter.js +1 -1
- package/dist/src/computer/runtime.js +3 -3
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/connectors/cli/authorization.js +1 -1
- package/dist/src/connectors/composio-sessions.js +1 -1
- package/dist/src/connectors/composio.js +1 -1
- package/dist/src/connectors/connected-source-ingestion.js +3 -3
- package/dist/src/connectors/connected-source-understanding.js +5 -5
- package/dist/src/connectors/connection-recovery-service.js +4 -4
- package/dist/src/connectors/content-enrichment.js +1 -1
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/discussions/live-worker.js +1 -1
- package/dist/src/discussions/sealer.js +1 -1
- package/dist/src/endpoint-tools/index.js +1 -1
- package/dist/src/endpoint-tools/runtime.js +2 -2
- package/dist/src/extensions/activation-context.js +3 -3
- package/dist/src/extensions/agent-plugins/auth.js +1 -1
- package/dist/src/extensions/agent-plugins/skill-catalog.js +2 -2
- package/dist/src/extensions/agent-plugins/source-http-fetch.js +1 -1
- package/dist/src/extensions/api.js +3 -3
- package/dist/src/extensions/bundled-extension-activation.js +1 -1
- package/dist/src/extensions/index.js +3 -3
- package/dist/src/extensions/loader.js +2 -2
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/sdk/media.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/device-routes.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/global-defaults-admin.js +1 -1
- package/dist/src/gateway/hono/app.js +3 -3
- package/dist/src/gateway/hono/lib/config-payload.js +3 -3
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +4 -4
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +1 -1
- package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -1
- package/dist/src/gateway/hono/routes/home.js +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/memory-learning.js +3 -3
- package/dist/src/gateway/hono/routes/models.js +4 -4
- package/dist/src/gateway/hono/routes/notes.js +1 -1
- package/dist/src/gateway/hono/routes/phone-dependencies.js +1 -1
- package/dist/src/gateway/hono/routes/phone-setup.js +1 -1
- package/dist/src/gateway/hono/routes/phone.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +4 -4
- package/dist/src/gateway/hono/routes/runtime-tools.js +1 -1
- package/dist/src/gateway/hono/routes/session-command-handler.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +5 -5
- package/dist/src/gateway/hono/routes/sessions.js +3 -3
- package/dist/src/gateway/hono/routes/shares.js +2 -2
- package/dist/src/gateway/hono/routes/side-chats.js +1 -1
- package/dist/src/gateway/hono/routes/site-shares.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +7 -7
- package/dist/src/gateway/hono/routes/voice.js +7 -7
- package/dist/src/gateway/lock.js +11 -11
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/mobile-privacy.js +2 -2
- package/dist/src/gateway/ports.js +6 -6
- package/dist/src/gateway/provider-model-setup.js +1 -1
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +3 -3
- package/dist/src/gateway/service/config-coordinator.js +2 -2
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +4 -4
- package/dist/src/gateway/service/session-command-service.js +2 -2
- package/dist/src/gateway/service.js +42 -42
- package/dist/src/gateway/session-context-summary.js +4 -4
- package/dist/src/gateway/workspace-editor-path.js +2 -2
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/generator.js +2 -2
- package/dist/src/imports/inventory.js +2 -2
- package/dist/src/imports/productImport.js +1 -1
- package/dist/src/imports/runtime.js +1 -1
- package/dist/src/infra/gateway-processes.js +2 -2
- package/dist/src/infra/path-env.js +3 -3
- package/dist/src/infra/update-global.js +9 -9
- package/dist/src/knowledge/connected-knowledge-pipeline.js +1 -1
- package/dist/src/knowledge/index.js +1 -1
- package/dist/src/knowledge-memory/repository.js +1 -1
- package/dist/src/knowledge-memory/usage-policy.js +1 -1
- package/dist/src/local-apps/service.js +2 -2
- package/dist/src/mcp/gateway-http-client.js +1 -1
- package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
- package/dist/src/memory-learning/source-learning.js +5 -5
- package/dist/src/memory-learning/task-receipts.js +1 -1
- package/dist/src/notes/agent-context.js +4 -4
- package/dist/src/notes/index.js +1 -1
- package/dist/src/notes/service.js +3 -3
- package/dist/src/personal-agent/capability-service.js +2 -2
- package/dist/src/personal-agent/proactivity/routes.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +7 -7
- package/dist/src/personal-agent/prompt-context.js +7 -7
- package/dist/src/personal-agent/prompts.js +1 -1
- package/dist/src/personal-agent/reply-composer.js +10 -10
- package/dist/src/personal-agent/request-delivery.js +2 -2
- package/dist/src/personal-agent/request-service.js +8 -8
- package/dist/src/personal-agent/result-reader.js +1 -1
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/personal-agent/task-cancel.js +1 -1
- package/dist/src/phone/repository.js +1 -1
- package/dist/src/phone/runtime.js +4 -4
- package/dist/src/projects/index.js +1 -1
- package/dist/src/projects/project-agent-suggestion.js +1 -1
- package/dist/src/projects/project-service.js +1 -1
- package/dist/src/projects/project-skill-service.js +2 -2
- package/dist/src/projects/workspace.js +1 -1
- package/dist/src/providers/model-reference-auditor.js +1 -1
- package/dist/src/realtime/runtime.js +1 -1
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/routing/agent-session-key.js +1 -1
- package/dist/src/runtime-tools/phone-dependencies.js +2 -2
- package/dist/src/session/index.js +2 -2
- package/dist/src/session/init-session-turn.js +1 -1
- package/dist/src/session/resolve-session.js +1 -1
- package/dist/src/session/store.js +5 -5
- package/dist/src/session/thinking-resolve.js +1 -1
- package/dist/src/share/hosted-session-share.js +2 -2
- package/dist/src/share/session-share-service.js +1 -1
- package/dist/src/share/share-store.js +1 -1
- package/dist/src/share/share-thumbnail.js +1 -1
- package/dist/src/share/site-share-store.js +1 -1
- package/dist/src/storage/sqlite/connection.js +9 -9
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/home-query-service.js +1 -1
- package/dist/src/tasks/index.js +4 -4
- package/dist/src/tasks/task-allocation-service.js +6 -6
- package/dist/src/tasks/task-application-service.js +6 -6
- package/dist/src/tasks/task-collaboration-delivery.js +1 -1
- package/dist/src/tasks/task-context-assembler.js +2 -2
- package/dist/src/tasks/task-contract-planner.js +1 -1
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-handoff.js +5 -5
- package/dist/src/tasks/task-main-update-decision-service.js +3 -3
- package/dist/src/tasks/task-model-call.js +1 -1
- package/dist/src/tasks/task-research-result.js +4 -4
- package/dist/src/tasks/task-result-delivery-repository.js +1 -1
- package/dist/src/tasks/task-result-delivery-service.js +2 -2
- package/dist/src/tasks/task-run-coordinator.js +4 -4
- package/dist/src/tasks/task-run-dispatcher.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +11 -11
- package/dist/src/tui/backends/gateway-realtime-backend.js +2 -2
- package/dist/src/tui/extension-host/load-extensions.js +2 -2
- package/dist/src/tui/tui-commands.js +5 -5
- package/dist/src/tui/tui-picker-overlay.js +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +4 -4
- package/dist/src/tui/tui.js +4 -4
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/user-context/access-policy.js +2 -2
- package/dist/src/user-model/bootstrap.js +1 -1
- package/dist/src/user-model/capture/executor.js +1 -1
- package/dist/src/user-model/index.js +2 -2
- package/dist/src/user-model/usage-policy.js +1 -1
- package/dist/src/voice/realtime/memory-context.js +5 -5
- package/dist/src/voice/realtime/omniRoute.js +1 -1
- package/dist/src/voice/realtime/runtime.js +4 -4
- package/dist/src/voice/stt/index.js +2 -2
- package/dist/src/voice/stt/preflight.js +1 -1
- package/dist/src/voice/stt/providers/alibaba-transcription.js +1 -1
- package/dist/src/voice/stt/providers/bailian-plan-transcription.js +1 -1
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +1 -1
- package/dist/src/voice/stt/transcribe-core.js +1 -1
- package/dist/src/voice/tts/index.js +3 -3
- package/dist/src/voice/tts/merge-config.js +1 -1
- package/dist/src/voice/tts/payload.js +1 -1
- package/dist/src/voice/tts/providers/bailian-plan-speech.js +1 -1
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +1 -1
- package/dist/src/voice/tts/speak-core.js +1 -1
- package/dist/src/work-discovery/service.js +7 -7
- package/package.json +1 -1
|
@@ -5,12 +5,12 @@ import { sessionInputCommandSchema, sessionMaterializeCommandSchema } from "../.
|
|
|
5
5
|
import { parseUserTurnDocument, userTurnDocumentRefIds } from "../../../../packages/gateway-contract/src/user-turn-document.js";
|
|
6
6
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
7
7
|
import { endpointTurnClaimSchema, init_src as init_src$1 } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
8
|
+
import { validateWebchatAttachments, validateWebchatContent } from "../../chat-limits.js";
|
|
8
9
|
import { parseSlashCommand } from "../../../chat-commands/command-parse.js";
|
|
9
10
|
import { commandRegistry } from "../../../chat-commands/registry.js";
|
|
10
11
|
import "../../../chat-commands/index.js";
|
|
11
|
-
import { deviceTurnSourceContext, endpointClaimBelongsToPrincipal } from "../../../endpoint-tools/turn-context.js";
|
|
12
|
-
import { validateWebchatAttachments, validateWebchatContent } from "../../chat-limits.js";
|
|
13
12
|
import { isVoiceLikeAttachment } from "../../../channels/attachments/voice-stt-webchat.js";
|
|
13
|
+
import { deviceTurnSourceContext, endpointClaimBelongsToPrincipal } from "../../../endpoint-tools/turn-context.js";
|
|
14
14
|
import { SessionCommandError, getSessionInputReceipt, isConversationDeleted, retrySessionPreparation } from "../../../storage/sqlite/session-creation-repository.js";
|
|
15
15
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
16
16
|
import { browserPageContextToAgentContext } from "../../../agent/source-context/browser-page.js";
|
|
@@ -7,16 +7,16 @@ import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
|
7
7
|
import { endpointTurnClaimSchema, init_src as init_src$1 } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
8
8
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
9
9
|
import "../../../capabilities/runtime/dispatcher.js";
|
|
10
|
-
import { parseTurnContextRefs } from "../../../agent/source-context/types.js";
|
|
11
10
|
import { init_providers, resolveModel } from "../../../providers/index.js";
|
|
11
|
+
import { getModelThinking } from "../../../providers/model-thinking.js";
|
|
12
|
+
import { parseTurnContextRefs } from "../../../agent/source-context/types.js";
|
|
13
|
+
import { validateWebchatAttachments, validateWebchatContent } from "../../chat-limits.js";
|
|
14
|
+
import { isTaskDestructiveCommand } from "../../../session/reset-triggers.js";
|
|
12
15
|
import { parseSlashCommand } from "../../../chat-commands/command-parse.js";
|
|
13
16
|
import { commandRegistry } from "../../../chat-commands/registry.js";
|
|
14
17
|
import "../../../chat-commands/index.js";
|
|
15
|
-
import { deviceTurnSourceContext, endpointClaimBelongsToPrincipal } from "../../../endpoint-tools/turn-context.js";
|
|
16
|
-
import { validateWebchatAttachments, validateWebchatContent } from "../../chat-limits.js";
|
|
17
|
-
import { isTaskDestructiveCommand } from "../../../session/reset-triggers.js";
|
|
18
|
-
import { getModelThinking } from "../../../providers/model-thinking.js";
|
|
19
18
|
import { isVoiceLikeAttachment } from "../../../channels/attachments/voice-stt-webchat.js";
|
|
19
|
+
import { deviceTurnSourceContext, endpointClaimBelongsToPrincipal } from "../../../endpoint-tools/turn-context.js";
|
|
20
20
|
import { withModelConfigLock } from "../../../session/model-config-lock.js";
|
|
21
21
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
22
22
|
import { browserPageContextToAgentContext } from "../../../agent/source-context/browser-page.js";
|
|
@@ -3,11 +3,11 @@ import { SessionDiscoveryQuerySchema } from "../../../../packages/gateway-contra
|
|
|
3
3
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
4
4
|
import "../../../session/types.js";
|
|
5
5
|
import { SidebarLayoutConflictError, getSidebarLayout, replaceSidebarLayout, sortBySidebarLayout } from "../../../storage/sqlite/sidebar-layout-repository.js";
|
|
6
|
-
import { isPersonalConversation } from "../../../personal-agent/repository.js";
|
|
7
6
|
import { summarizeAiUsageByConversations } from "../../../storage/sqlite/ai-usage-repository.js";
|
|
8
|
-
import {
|
|
9
|
-
import { evictEmbeddedSessionRunner } from "../../../agent/embedded/session-runner.js";
|
|
7
|
+
import { isPersonalConversation } from "../../../personal-agent/repository.js";
|
|
10
8
|
import { messagesToClientHistory } from "../../../session/client-history.js";
|
|
9
|
+
import { evictEmbeddedSessionRunner } from "../../../agent/embedded/session-runner.js";
|
|
10
|
+
import { SessionEnvironmentService } from "../../../execution-environments/session-environment-service.js";
|
|
11
11
|
import { deleteMediaUrisNoLongerReferenced } from "../../../media/session-references.js";
|
|
12
12
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
13
13
|
import { createGatewayRouteLogger, logRouteError } from "../lib/route-logger.js";
|
|
@@ -3,8 +3,6 @@ import { loadCompactionSourceSnapshot } from "../../../storage/sqlite/transcript
|
|
|
3
3
|
import "../../../storage/sqlite/index.js";
|
|
4
4
|
import { FileServiceError } from "../../../files/file-service.js";
|
|
5
5
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
6
|
-
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
7
|
-
import { getGatewayFileSpaceService } from "../../file-space-service.js";
|
|
8
6
|
import { SHARE_CONFIG_DEFAULTS } from "../../../share/share-types.js";
|
|
9
7
|
import { resolveSiteShareConfig } from "../../../share/site-share-config.js";
|
|
10
8
|
import { logShareAudit } from "../../../share/share-audit.js";
|
|
@@ -15,8 +13,10 @@ import { SessionShareService, SessionShareSnapshotConflictError } from "../../..
|
|
|
15
13
|
import { HostedPublicationPublisher, HostedSessionShareBuilder, HostedShareAuthorizationError, HostedShareBindingStore, HostedShareRemoteError } from "../../../share/hosted-session-share.js";
|
|
16
14
|
import { HostedStaticSitePublicationBuilder } from "../../../share/hosted-static-site-publication.js";
|
|
17
15
|
import { publishHostedStaticSite } from "../../../share/hosted-static-site-publish.js";
|
|
16
|
+
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
18
17
|
import { audienceDefaults, cleanupStagedSite, decideShareKind, forgetStagedSite, makeDescription, makeTitle, probeShareTarget, rememberStagedSite, stageSingleHtmlAsSite } from "../../../share/share-auto.js";
|
|
19
18
|
import { deleteThumbnail, placeholderSvg, readThumbnail, scheduleThumbnail, thumbnailContentType, thumbnailExists } from "../../../share/share-thumbnail.js";
|
|
19
|
+
import { getGatewayFileSpaceService } from "../../file-space-service.js";
|
|
20
20
|
import { SHARED_HTML_CSP } from "../../security/csp.js";
|
|
21
21
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
22
22
|
import { renderFolderLandingPage, renderShareExpiredPage, renderShareLandingPage, renderSnapshotShareLandingPage } from "../../../share/share-landing.js";
|
|
@@ -2,8 +2,8 @@ import { chooseModelThinking } from "../../../../packages/gateway-contract/src/m
|
|
|
2
2
|
import { clarificationSubmissionSchema } from "../../../../packages/gateway-contract/src/clarifications.js";
|
|
3
3
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
4
4
|
import { init_providers, resolveModel } from "../../../providers/index.js";
|
|
5
|
-
import { validateWebchatAttachments, validateWebchatContent } from "../../chat-limits.js";
|
|
6
5
|
import { getModelThinking } from "../../../providers/model-thinking.js";
|
|
6
|
+
import { validateWebchatAttachments, validateWebchatContent } from "../../chat-limits.js";
|
|
7
7
|
import { validateSideChatSelections } from "../../side-chat/context-snapshot.js";
|
|
8
8
|
import { SideChatError, parseThinkingLevel } from "../../side-chat/manager.js";
|
|
9
9
|
import "../../side-chat/index.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
2
|
-
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
3
2
|
import { resolveSiteShareConfig } from "../../../share/site-share-config.js";
|
|
4
3
|
import { getSiteShareStore } from "../../../share/site-share-store.js";
|
|
5
4
|
import { resolveSiteShareUrl } from "../../../share/share-url.js";
|
|
5
|
+
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
6
6
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
//#region src/gateway/hono/routes/site-shares.ts
|
|
@@ -8,8 +8,8 @@ import { TaskRepository, init_task_repository } from "../../../tasks/task-reposi
|
|
|
8
8
|
import { TaskRunRepository, init_task_run_repository } from "../../../tasks/task-run-repository.js";
|
|
9
9
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
10
10
|
import "../../../capabilities/runtime/dispatcher.js";
|
|
11
|
-
import { TaskCollaborationRepository } from "../../../tasks/task-collaboration-repository.js";
|
|
12
11
|
import { TaskConversationRepository } from "../../../tasks/task-conversation-repository.js";
|
|
12
|
+
import { TaskCollaborationRepository } from "../../../tasks/task-collaboration-repository.js";
|
|
13
13
|
import { TaskCriterionReviewRepository } from "../../../tasks/task-criterion-review-repository.js";
|
|
14
14
|
import { TaskContextMutationOutputSchema } from "../../../tasks/capabilities/relations.js";
|
|
15
15
|
import { TaskDeleteOutputSchema } from "../../../tasks/capabilities/management.js";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { init_transaction, runSqliteWriteTransaction } from "../../../storage/sqlite/transaction.js";
|
|
2
2
|
import { createCollaborationRule, getCollaborationRule, listCollaborationRules, setCollaborationRuleStatus } from "../../../storage/sqlite/collaboration-rule-repository.js";
|
|
3
|
+
import { getActiveUnderstandingConsent } from "../../../user-context/sources/consent-repository.js";
|
|
4
|
+
import { KnowledgeReviewConflictError, deleteKnowledgeItem, getKnowledgeItem, listKnowledgeItems, reviewKnowledgeItem, searchKnowledgeItems } from "../../../knowledge-memory/repository.js";
|
|
5
|
+
import "../../../knowledge-memory/index.js";
|
|
6
|
+
import { createPriorityWindow, createUserGoal, listPriorityWindows, listUserGoals, setUserGoalStatus, updatePriorityWindow, updateUserGoal } from "../../../user-model/goals.js";
|
|
3
7
|
import { deleteUserAssertion, getAssertionSlot, getUserAssertion, listUserAssertionSources, listUserAssertions, reconcileAssertion, setAssertionStatus, setUserAssertionScope } from "../../../user-model/repository.js";
|
|
4
|
-
import { applyUserProfilePatch, getUserProfileSnapshot } from "../../../user-model/profile.js";
|
|
5
8
|
import { listActionRuleSuggestions } from "../../../user-model/action-rule-suggestions.js";
|
|
6
|
-
import { createPriorityWindow, createUserGoal, listPriorityWindows, listUserGoals, setUserGoalStatus, updatePriorityWindow, updateUserGoal } from "../../../user-model/goals.js";
|
|
7
9
|
import { listUserAssertionEdges, listUserModelObservations } from "../../../user-model/observation-repository.js";
|
|
10
|
+
import { applyUserProfilePatch, getUserProfileSnapshot } from "../../../user-model/profile.js";
|
|
8
11
|
import { bootstrapUserModel } from "../../../user-model/bootstrap.js";
|
|
9
|
-
import { getActiveUnderstandingConsent } from "../../../user-context/sources/consent-repository.js";
|
|
10
12
|
import { canUseAssertion } from "../../../user-model/usage-policy.js";
|
|
11
13
|
import "../../../user-model/index.js";
|
|
12
|
-
import { listUnderstandingSourceGrants } from "../../../user-context/sources/repository.js";
|
|
13
|
-
import { KnowledgeReviewConflictError, deleteKnowledgeItem, getKnowledgeItem, listKnowledgeItems, reviewKnowledgeItem, searchKnowledgeItems } from "../../../knowledge-memory/repository.js";
|
|
14
|
-
import "../../../knowledge-memory/index.js";
|
|
15
|
-
import { getExecutionContextAudit, recordExecutionContextFeedback } from "../../../agent/context/audit.js";
|
|
16
14
|
import { listMemoryMaintenanceRuns } from "../../../memory-maintenance/service.js";
|
|
17
15
|
import "../../../memory-maintenance/index.js";
|
|
16
|
+
import { getExecutionContextAudit, recordExecutionContextFeedback } from "../../../agent/context/audit.js";
|
|
17
|
+
import { listUnderstandingSourceGrants } from "../../../user-context/sources/repository.js";
|
|
18
18
|
import { registerMemoryLearningRoutes } from "./memory-learning.js";
|
|
19
19
|
import { userInfo } from "node:os";
|
|
20
20
|
//#region src/gateway/hono/routes/user-model.ts
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { isPersonalConversation } from "../../../personal-agent/repository.js";
|
|
2
1
|
import { init_model_usage, withModelUsageOrigin } from "../../../providers/model-usage.js";
|
|
3
2
|
import { voiceSelectionSchema } from "../../../../packages/realtime-protocol/src/voice-catalog.js";
|
|
4
3
|
import { VOICE_TIMING_METRICS, createVoiceSessionRequestSchema, init_voice } from "../../../../packages/realtime-protocol/src/voice.js";
|
|
5
4
|
import { getDefaultModelSync, init_providers, resolveModel } from "../../../providers/index.js";
|
|
6
5
|
import { completeWithResolvedCredentials } from "../../../providers/model-call.js";
|
|
6
|
+
import { isPersonalConversation } from "../../../personal-agent/repository.js";
|
|
7
7
|
import { PlatformVoiceError } from "../../../voice/platform-streams.js";
|
|
8
|
-
import { resolveTtsProviderConfigSlice } from "../../../voice/tts/config-slice.js";
|
|
9
|
-
import { isTTSAvailable, resolveSpeechProvider } from "../../../voice/tts/factory.js";
|
|
10
|
-
import { mergeTtsConfigFromAppConfig } from "../../../voice/tts/merge-config.js";
|
|
11
|
-
import { speak, speakStream } from "../../../voice/tts/speak-core.js";
|
|
12
8
|
import { resolveSttProviderConfigSlice } from "../../../voice/stt/config-slice.js";
|
|
13
9
|
import { resolveSTTProviderChain } from "../../../voice/stt/factory.js";
|
|
14
|
-
import { isSTTAvailable } from "../../../voice/stt/availability.js";
|
|
15
|
-
import "../../../voice/tts/index.js";
|
|
16
10
|
import { STTTranscriptionError, transcribe } from "../../../voice/stt/transcribe-core.js";
|
|
11
|
+
import { isSTTAvailable } from "../../../voice/stt/availability.js";
|
|
17
12
|
import { mergeSttConfigFromAppConfig } from "../../../voice/stt/config.js";
|
|
18
13
|
import "../../../voice/stt/index.js";
|
|
14
|
+
import { resolveTtsProviderConfigSlice } from "../../../voice/tts/config-slice.js";
|
|
15
|
+
import { isTTSAvailable, resolveSpeechProvider } from "../../../voice/tts/factory.js";
|
|
16
|
+
import { speak, speakStream } from "../../../voice/tts/speak-core.js";
|
|
17
|
+
import { mergeTtsConfigFromAppConfig } from "../../../voice/tts/merge-config.js";
|
|
19
18
|
import { listSttProvidersForApi } from "../../../voice/stt/list-providers.js";
|
|
19
|
+
import "../../../voice/tts/index.js";
|
|
20
20
|
import { withModelConfigLock } from "../../../session/model-config-lock.js";
|
|
21
21
|
import { getSessionPreparation } from "../../../storage/sqlite/session-creation-repository.js";
|
|
22
22
|
import { resolveOmniRoute } from "../../../voice/realtime/omniRoute.js";
|
package/dist/src/gateway/lock.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import fs from "node:fs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
|
-
import fs from "node:fs/promises";
|
|
4
|
+
import fs$1 from "node:fs/promises";
|
|
5
5
|
import net from "node:net";
|
|
6
6
|
import { homedir } from "os";
|
|
7
7
|
//#region src/gateway/lock.ts
|
|
@@ -29,7 +29,7 @@ function resolveGatewayLockPath(configPath) {
|
|
|
29
29
|
function isGatewayConfigLockedByAnotherProcessSync(configPath, currentPid = process.pid) {
|
|
30
30
|
const lockPath = resolveGatewayLockPath(configPath);
|
|
31
31
|
try {
|
|
32
|
-
const parsed = JSON.parse(
|
|
32
|
+
const parsed = JSON.parse(fs.readFileSync(lockPath, "utf8"));
|
|
33
33
|
if (typeof parsed.pid !== "number" || parsed.pid === currentPid || parsed.configPath !== configPath) return false;
|
|
34
34
|
if (!isPidAlive(parsed.pid)) return false;
|
|
35
35
|
if (process.platform !== "linux" || !Number.isFinite(parsed.startTime)) return true;
|
|
@@ -69,7 +69,7 @@ function isPidAlive(pid) {
|
|
|
69
69
|
function readLinuxStartTime(pid) {
|
|
70
70
|
if (process.platform !== "linux") return null;
|
|
71
71
|
try {
|
|
72
|
-
const raw =
|
|
72
|
+
const raw = fs.readFileSync(`/proc/${pid}/stat`, "utf8").trim();
|
|
73
73
|
const closeParen = raw.lastIndexOf(")");
|
|
74
74
|
if (closeParen < 0) return null;
|
|
75
75
|
const fields = raw.slice(closeParen + 1).trim().split(/\s+/);
|
|
@@ -81,7 +81,7 @@ function readLinuxStartTime(pid) {
|
|
|
81
81
|
}
|
|
82
82
|
async function readLockPayload(lockPath) {
|
|
83
83
|
try {
|
|
84
|
-
const raw = await fs.readFile(lockPath, "utf8");
|
|
84
|
+
const raw = await fs$1.readFile(lockPath, "utf8");
|
|
85
85
|
const parsed = JSON.parse(raw);
|
|
86
86
|
if (typeof parsed.pid !== "number") return null;
|
|
87
87
|
if (typeof parsed.createdAt !== "string") return null;
|
|
@@ -117,11 +117,11 @@ async function acquireGatewayLock(configPath, opts = {}) {
|
|
|
117
117
|
const staleMs = opts.staleMs ?? DEFAULT_STALE_MS;
|
|
118
118
|
const port = opts.port;
|
|
119
119
|
const lockPath = resolveGatewayLockPath(configPath);
|
|
120
|
-
await fs.mkdir(path.dirname(lockPath), { recursive: true });
|
|
120
|
+
await fs$1.mkdir(path.dirname(lockPath), { recursive: true });
|
|
121
121
|
const startedAt = Date.now();
|
|
122
122
|
let lastPayload = null;
|
|
123
123
|
while (Date.now() - startedAt < timeoutMs) try {
|
|
124
|
-
const handle = await fs.open(lockPath, "wx");
|
|
124
|
+
const handle = await fs$1.open(lockPath, "wx");
|
|
125
125
|
const startTime = process.platform === "linux" ? readLinuxStartTime(process.pid) : null;
|
|
126
126
|
const payload = {
|
|
127
127
|
pid: process.pid,
|
|
@@ -136,7 +136,7 @@ async function acquireGatewayLock(configPath, opts = {}) {
|
|
|
136
136
|
configPath,
|
|
137
137
|
release: async () => {
|
|
138
138
|
await handle.close().catch(() => void 0);
|
|
139
|
-
await fs.rm(lockPath, { force: true });
|
|
139
|
+
await fs$1.rm(lockPath, { force: true });
|
|
140
140
|
console.log(`[GatewayLock] Lock released: lockPath=${lockPath}`);
|
|
141
141
|
}
|
|
142
142
|
};
|
|
@@ -147,7 +147,7 @@ async function acquireGatewayLock(configPath, opts = {}) {
|
|
|
147
147
|
const ownerStatus = ownerPid ? await resolveOwnerStatus(ownerPid, lastPayload, port) : "unknown";
|
|
148
148
|
if (ownerStatus === "dead" && ownerPid) {
|
|
149
149
|
console.warn(`[GatewayLock] Cleaning up stale gateway lock: pid=${ownerPid}`);
|
|
150
|
-
await fs.rm(lockPath, { force: true });
|
|
150
|
+
await fs$1.rm(lockPath, { force: true });
|
|
151
151
|
continue;
|
|
152
152
|
}
|
|
153
153
|
if (ownerStatus !== "alive") {
|
|
@@ -157,14 +157,14 @@ async function acquireGatewayLock(configPath, opts = {}) {
|
|
|
157
157
|
stale = Number.isFinite(createdAt) ? Date.now() - createdAt > staleMs : false;
|
|
158
158
|
}
|
|
159
159
|
if (!stale) try {
|
|
160
|
-
const st = await fs.stat(lockPath);
|
|
160
|
+
const st = await fs$1.stat(lockPath);
|
|
161
161
|
stale = Date.now() - st.mtimeMs > staleMs;
|
|
162
162
|
} catch {
|
|
163
163
|
stale = false;
|
|
164
164
|
}
|
|
165
165
|
if (stale) {
|
|
166
166
|
console.warn(`[GatewayLock] Removing stale lock file: lockPath=${lockPath}`);
|
|
167
|
-
await fs.rm(lockPath, { force: true });
|
|
167
|
+
await fs$1.rm(lockPath, { force: true });
|
|
168
168
|
continue;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TaskRepository, init_task_repository } from "../tasks/task-repository.js";
|
|
2
|
-
import { TaskContextRepository } from "../tasks/task-context-repository.js";
|
|
3
2
|
import { resolveMediaReference } from "../media/media-reference.js";
|
|
4
3
|
import { FileServiceError } from "../files/file-service.js";
|
|
5
4
|
import { pendingTranscriptReferencesMediaUri } from "../agent/inbound/attachment-pipeline.js";
|
|
5
|
+
import { TaskContextRepository } from "../tasks/task-context-repository.js";
|
|
6
6
|
import { messagesReferenceMediaUri, taskResultReferencesMediaUri } from "../media/session-references.js";
|
|
7
7
|
//#region src/gateway/media-access.ts
|
|
8
8
|
init_task_repository();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getProviderRegistry, init_plugin_registry } from "../providers/plugin-registry.js";
|
|
2
2
|
import { PROVIDER_META, getAvailableModels, init_providers } from "../providers/index.js";
|
|
3
|
-
import { resolveSpeechProviderChain } from "../voice/tts/factory.js";
|
|
4
|
-
import { mergeTtsConfigFromAppConfig } from "../voice/tts/merge-config.js";
|
|
5
3
|
import { resolveSTTProviderChain } from "../voice/stt/factory.js";
|
|
6
4
|
import { mergeSttConfigFromAppConfig } from "../voice/stt/config.js";
|
|
5
|
+
import { resolveSpeechProviderChain } from "../voice/tts/factory.js";
|
|
6
|
+
import { mergeTtsConfigFromAppConfig } from "../voice/tts/merge-config.js";
|
|
7
7
|
import { getVoiceProviderMetadata } from "../voice/metadata/registry.js";
|
|
8
8
|
import "../voice/metadata/index.js";
|
|
9
9
|
import { getImageGenerationCatalog } from "./image-generation-setup.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import
|
|
3
|
+
import fs from "node:fs";
|
|
4
4
|
import { execFileSync } from "node:child_process";
|
|
5
5
|
import net from "node:net";
|
|
6
6
|
//#region src/gateway/ports.ts
|
|
@@ -54,7 +54,7 @@ function listPortListenersViaProc(port) {
|
|
|
54
54
|
for (const procFile of ["/proc/net/tcp", "/proc/net/tcp6"]) {
|
|
55
55
|
let content;
|
|
56
56
|
try {
|
|
57
|
-
content =
|
|
57
|
+
content = fs.readFileSync(procFile, "utf-8");
|
|
58
58
|
} catch {
|
|
59
59
|
continue;
|
|
60
60
|
}
|
|
@@ -68,7 +68,7 @@ function listPortListenersViaProc(port) {
|
|
|
68
68
|
if (inodeSet.size === 0) return results;
|
|
69
69
|
let pidDirs;
|
|
70
70
|
try {
|
|
71
|
-
pidDirs =
|
|
71
|
+
pidDirs = fs.readdirSync("/proc").filter((name) => /^\d+$/.test(name));
|
|
72
72
|
} catch {
|
|
73
73
|
return results;
|
|
74
74
|
}
|
|
@@ -76,14 +76,14 @@ function listPortListenersViaProc(port) {
|
|
|
76
76
|
const fdDir = `/proc/${pidStr}/fd`;
|
|
77
77
|
let fds;
|
|
78
78
|
try {
|
|
79
|
-
fds =
|
|
79
|
+
fds = fs.readdirSync(fdDir);
|
|
80
80
|
} catch {
|
|
81
81
|
continue;
|
|
82
82
|
}
|
|
83
83
|
for (const fd of fds) {
|
|
84
84
|
let target;
|
|
85
85
|
try {
|
|
86
|
-
target =
|
|
86
|
+
target = fs.readlinkSync(`${fdDir}/${fd}`);
|
|
87
87
|
} catch {
|
|
88
88
|
continue;
|
|
89
89
|
}
|
|
@@ -93,7 +93,7 @@ function listPortListenersViaProc(port) {
|
|
|
93
93
|
if (!results.some((p) => p.pid === pid)) {
|
|
94
94
|
let command;
|
|
95
95
|
try {
|
|
96
|
-
command =
|
|
96
|
+
command = fs.readFileSync(`/proc/${pidStr}/comm`, "utf-8").trim();
|
|
97
97
|
} catch {}
|
|
98
98
|
results.push({
|
|
99
99
|
pid,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getProviderSetupProfile, init_profiles, isInteractiveOnlyProvider } from "../providers/setup/profiles.js";
|
|
2
2
|
import { getModelCatalogStore, init_model_catalog_store } from "../providers/model-catalog-store.js";
|
|
3
3
|
import { getAllModels, getAllProviders, getModelsByProvider, getProviderDisplayName, init_providers, isProviderConfigured, isProviderConfiguredSync, providerSupportsOAuth } from "../providers/index.js";
|
|
4
|
+
import { getImageGenerationProvider } from "../agent/image/generation/provider-registry.js";
|
|
4
5
|
import { listSttProvidersForApi } from "../voice/stt/list-providers.js";
|
|
5
6
|
import { listGlobalDefaults } from "./global-defaults-admin.js";
|
|
6
|
-
import { getImageGenerationProvider } from "../agent/image/generation/provider-registry.js";
|
|
7
7
|
import { getRecommendedModelsForProvider } from "../providers/presentation.js";
|
|
8
8
|
import { listTtsProvidersForApi } from "../voice/tts/list-providers.js";
|
|
9
9
|
import { readSetupVoiceState } from "../providers/setup/voice.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ensureXopcCliOnPath } from "../infra/path-env.js";
|
|
2
1
|
import { resolveGatewayBindHost, resolveGatewayListenHosts } from "../config/gateway-bind.js";
|
|
2
|
+
import { ensureXopcCliOnPath } from "../infra/path-env.js";
|
|
3
3
|
import { resolveGatewayListenPlan } from "./listen.js";
|
|
4
4
|
import { GatewayService } from "./service.js";
|
|
5
5
|
import { handleSiteShareUpgrade } from "../share/site-share-router.js";
|
|
@@ -8,12 +8,12 @@ import { TaskRepository, init_task_repository } from "../../tasks/task-repositor
|
|
|
8
8
|
import { createClarificationWait, getClarification, getClarificationSnapshot, resolveClarification, supersedeActiveClarification } from "../../storage/sqlite/clarification-wait-repository.js";
|
|
9
9
|
import { init_connection_wait_repository, onConnectionWaitChanged } from "../../storage/sqlite/connection-wait-repository.js";
|
|
10
10
|
import "../../storage/sqlite/index.js";
|
|
11
|
+
import { AgentRunCancelledError } from "../../agent/orchestration/run-termination.js";
|
|
11
12
|
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
12
|
-
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
13
13
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
14
|
-
import {
|
|
15
|
-
import { AgentRunCancelledError } from "../../agent/orchestration/run-termination.js";
|
|
14
|
+
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
16
15
|
import { reserveEmbeddedRunCancellation } from "../../agent/embedded/runs.js";
|
|
16
|
+
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
17
17
|
import { EphemeralClarificationWaiter } from "../ephemeral-clarification-waiter.js";
|
|
18
18
|
import { describeActiveExecution } from "./active-execution.js";
|
|
19
19
|
import { runGatewayAgent } from "./run-gateway-agent.js";
|
|
@@ -3,12 +3,12 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { getModelRegistry } from "../../providers/model-registry.js";
|
|
4
4
|
import { init_providers } from "../../providers/index.js";
|
|
5
5
|
import { configureTracing } from "../../observability/runtime.js";
|
|
6
|
+
import { evictAllEmbeddedSessionRunners } from "../../agent/embedded/session-runner.js";
|
|
7
|
+
import { reloadImageGenerationProviders } from "../../agent/image/generation/provider-registry.js";
|
|
6
8
|
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
7
9
|
import { ConfigHotReloader } from "../../config/reload.js";
|
|
8
10
|
import "../../config/index.js";
|
|
9
11
|
import { computeExtensionActivationPatch } from "../../extensions/bundled-extension-activation.js";
|
|
10
|
-
import { reloadImageGenerationProviders } from "../../agent/image/generation/provider-registry.js";
|
|
11
|
-
import { evictAllEmbeddedSessionRunners } from "../../agent/embedded/session-runner.js";
|
|
12
12
|
import { sanitizeTunnelConfig } from "../../tunnel/tunnel-config.js";
|
|
13
13
|
import { isDeepStrictEqual } from "node:util";
|
|
14
14
|
//#region src/gateway/service/config-coordinator.ts
|
|
@@ -3,12 +3,12 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
4
|
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
5
5
|
import { init_paths, resolveExtensionsDir } from "../../config/paths.js";
|
|
6
|
-
import { createSkillConfigManager } from "../../agent/skills/config.js";
|
|
7
|
-
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "../../agent/skills/workspace-skills-dir.js";
|
|
8
6
|
import { getExtensionLockfileManager } from "../../extensions/lockfile.js";
|
|
9
7
|
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
10
8
|
import { removeSkillsLockEntry } from "../../agent/skills/hub-lock.js";
|
|
11
9
|
import { deleteManagedSkill, installSkillFromZip, listManagedSkillDirs } from "../../agent/skills/managed-store.js";
|
|
10
|
+
import { createSkillConfigManager } from "../../agent/skills/config.js";
|
|
11
|
+
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "../../agent/skills/workspace-skills-dir.js";
|
|
12
12
|
import { normalizeSkillInstallTarget } from "../../agent/skills/install-target.js";
|
|
13
13
|
import { pluginSkillPreview, withPluginSkillCatalog } from "../../extensions/agent-plugins/skill-catalog.js";
|
|
14
14
|
import { isAgentPluginArchive, withAgentPluginArchive } from "../../extensions/agent-plugins/sources.js";
|
|
@@ -11,14 +11,14 @@ import { getConnectionResumeInput, init_connection_wait_repository, isConnection
|
|
|
11
11
|
import "../../storage/sqlite/index.js";
|
|
12
12
|
import { getConversationRouting } from "../../storage/sqlite/conversation-repository.js";
|
|
13
13
|
import { init_session_key } from "../../routing/session-key.js";
|
|
14
|
+
import { resolveAgentTurnTimeoutMs } from "../../agent/orchestration/run-agent-turn-with-timeout.js";
|
|
14
15
|
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
15
|
-
import { prependEnvelopeTimestamp } from "../../channels/envelope-timestamp.js";
|
|
16
16
|
import { recordPersonalPerformance } from "../../personal-agent/performance.js";
|
|
17
|
-
import "../chat-limits.js";
|
|
18
|
-
import { resolveAgentTurnTimeoutMs } from "../../agent/orchestration/run-agent-turn-with-timeout.js";
|
|
19
|
-
import { formatAgentRunErrorForClient } from "../../agent/client-error-format.js";
|
|
20
17
|
import { resolveExecutionContext } from "../../tasks/execution-context.js";
|
|
21
18
|
import { TaskRunCoordinator } from "../../tasks/task-run-coordinator.js";
|
|
19
|
+
import { formatAgentRunErrorForClient } from "../../agent/client-error-format.js";
|
|
20
|
+
import "../chat-limits.js";
|
|
21
|
+
import { prependEnvelopeTimestamp } from "../../channels/envelope-timestamp.js";
|
|
22
22
|
import { ChatStreamMapper } from "../chat-stream/mapper.js";
|
|
23
23
|
import { markdownNotificationPreview } from "../../notifications/plain-text.js";
|
|
24
24
|
import { resolveWebchatConversationId } from "../resolve-webchat-session-key.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
2
2
|
import { init_session_repository } from "../../storage/sqlite/session-repository.js";
|
|
3
|
+
import { resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession } from "../../config/agent-profile.js";
|
|
4
|
+
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
3
5
|
import { getPersonalAgentByConversation } from "../../personal-agent/repository.js";
|
|
4
6
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
5
|
-
import { resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession } from "../../config/agent-profile.js";
|
|
6
7
|
import "../../projects/index.js";
|
|
7
|
-
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
8
8
|
import { getModelThinking } from "../../providers/model-thinking.js";
|
|
9
9
|
import { withModelConfigLock } from "../../session/model-config-lock.js";
|
|
10
10
|
import { SessionCommandError, acceptSessionCommand, getSessionPreparation, matchSessionInputReceipt, sessionCommandHash } from "../../storage/sqlite/session-creation-repository.js";
|
|
@@ -21,57 +21,73 @@ import { init_session_repository, listSessionMetadata, patchSessionMetadata } fr
|
|
|
21
21
|
import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
22
22
|
import "../storage/sqlite/index.js";
|
|
23
23
|
import { init_agent_scope, listAgentEntries, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
24
|
+
import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../config/paths.js";
|
|
25
|
+
import { init_config, resolveKnowledgeReadPolicy } from "../user-context/config.js";
|
|
26
|
+
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
26
27
|
import { init_agent_session_key, resolveAgentMainConversationId } from "../routing/agent-session-key.js";
|
|
27
28
|
import { init_session_key, resolveConversationId, sanitizeSegment } from "../routing/session-key.js";
|
|
29
|
+
import { listKnowledgeItems } from "../knowledge-memory/repository.js";
|
|
30
|
+
import "../knowledge-memory/index.js";
|
|
31
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
32
|
+
import { resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
33
|
+
import { prewarmModelRegistry } from "../providers/model-registry.js";
|
|
34
|
+
import { init_providers, providers_exports } from "../providers/index.js";
|
|
35
|
+
import { AI_USAGE_RETENTION_MS, markStaleAiUsageEventsUnknown, pruneAiUsageEvents } from "../storage/sqlite/ai-usage-repository.js";
|
|
36
|
+
import { flushTracing } from "../observability/runtime.js";
|
|
37
|
+
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
28
38
|
import { getPersonalAgentByConversation } from "../personal-agent/repository.js";
|
|
39
|
+
import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
40
|
+
import { TaskAllocationRepository } from "../tasks/task-allocation-repository.js";
|
|
29
41
|
import { stopPersonalResultPreparations } from "../personal-agent/result-reader.js";
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { buildUserAssertionAgentContext } from "../agent/source-context/user-assertion-context.js";
|
|
42
|
+
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
43
|
+
import { getEmbeddedExecutionSession } from "../agent/embedded/execution-context.js";
|
|
33
44
|
import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
|
|
34
45
|
import { ProjectService } from "../projects/project-service.js";
|
|
35
|
-
import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../config/paths.js";
|
|
36
|
-
import { init_config, resolveKnowledgeReadPolicy } from "../user-context/config.js";
|
|
37
|
-
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
38
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
39
46
|
import { resolveProjectAgentId } from "../projects/project-agent.js";
|
|
40
|
-
import { resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
41
47
|
import "../projects/index.js";
|
|
48
|
+
import { onTaskResultQueued } from "../tasks/task-result-delivery-repository.js";
|
|
49
|
+
import { runMemoryMaintenance } from "../memory-maintenance/service.js";
|
|
50
|
+
import "../memory-maintenance/index.js";
|
|
51
|
+
import { RealtimeExtensionBrowserProvider } from "../browser/providers/realtime-extension.js";
|
|
52
|
+
import { drainEmbeddedSessionRunnerShutdowns, evictAllEmbeddedSessionRunners } from "../agent/embedded/session-runner.js";
|
|
53
|
+
import { buildNoteAgentContext } from "../notes/agent-context.js";
|
|
42
54
|
import { NotesStore } from "../notes/store.js";
|
|
55
|
+
import { NotesService } from "../notes/service.js";
|
|
56
|
+
import { LocalAppService } from "../local-apps/service.js";
|
|
57
|
+
import { buildResultAgentContext } from "../agent/source-context/result-context.js";
|
|
58
|
+
import { buildTaskAgentContext } from "../agent/source-context/task-context.js";
|
|
59
|
+
import { buildUserAssertionAgentContext } from "../agent/source-context/user-assertion-context.js";
|
|
43
60
|
import { assertTaskHandoffAccess, getTaskHandoff } from "../tasks/task-handoff.js";
|
|
44
|
-
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
45
|
-
import { onTaskResultQueued } from "../tasks/task-result-delivery-repository.js";
|
|
46
61
|
import { TaskApplicationService } from "../tasks/task-application-service.js";
|
|
47
|
-
import { prewarmModelRegistry } from "../providers/model-registry.js";
|
|
48
|
-
import { init_providers, providers_exports } from "../providers/index.js";
|
|
49
|
-
import { AI_USAGE_RETENTION_MS, markStaleAiUsageEventsUnknown, pruneAiUsageEvents } from "../storage/sqlite/ai-usage-repository.js";
|
|
50
|
-
import { flushTracing } from "../observability/runtime.js";
|
|
51
62
|
import { AutomationService } from "../automations/service/automation-service.js";
|
|
63
|
+
import { TaskSignalService } from "../tasks/task-signal-service.js";
|
|
64
|
+
import { createProductDispatcher } from "../capabilities/runtime/product.js";
|
|
52
65
|
import "../automations/index.js";
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
66
|
+
import { assertTaskExecutorReady } from "../tasks/task-execution-capabilities.js";
|
|
67
|
+
import { TaskRunDispatcher } from "../tasks/task-run-dispatcher.js";
|
|
68
|
+
import "../tasks/index.js";
|
|
69
|
+
import { drainPersonalResultReads } from "../personal-agent/result-read-continuations.js";
|
|
55
70
|
import { areExtensionsGloballyDisabled } from "../extensions/discover-extensions.js";
|
|
71
|
+
import { SessionIndex } from "../session/manager.js";
|
|
72
|
+
import "../session/index.js";
|
|
73
|
+
import { ExtensionLoader } from "../extensions/loader.js";
|
|
56
74
|
import { buildExtensionMetadataSnapshot } from "../extensions/extension-metadata-snapshot.js";
|
|
75
|
+
import "../extensions/index.js";
|
|
57
76
|
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot } from "../channels/catalog/channel-catalog-service.js";
|
|
58
77
|
import { loadConfig, saveConfig } from "../config/loader.js";
|
|
59
|
-
import {
|
|
78
|
+
import { MessageBus, MessageBusShutdownError } from "../infra/bus/queue.js";
|
|
79
|
+
import "../infra/bus/index.js";
|
|
80
|
+
import { collectMediaUrisFromMessages, deleteMediaUris } from "../media/session-references.js";
|
|
81
|
+
import { AgentService } from "../agent/service.js";
|
|
82
|
+
import { bootstrapApplicationStateSync } from "../bootstrap/application-state.js";
|
|
60
83
|
import { setPairingBroadcastSink } from "../channels/pairing/pairing-events.js";
|
|
61
84
|
import { registerClarificationChannelRuntime } from "./clarify-runtime.js";
|
|
62
85
|
import { ChannelManager } from "../channels/manager.js";
|
|
63
86
|
import { ChatPreviewService } from "../chat-previews/service.js";
|
|
64
87
|
import "../chat-previews/index.js";
|
|
65
88
|
import { configureGatewayHttpProxy } from "../infra/http-proxy-env.js";
|
|
66
|
-
import { MessageBus, MessageBusShutdownError } from "../infra/bus/queue.js";
|
|
67
|
-
import "../infra/bus/index.js";
|
|
68
|
-
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
69
89
|
import "../config/index.js";
|
|
70
|
-
import { ExtensionLoader } from "../extensions/loader.js";
|
|
71
|
-
import "../extensions/index.js";
|
|
72
90
|
import { ManagedComposioEventPoller } from "../connectors/composio-managed-events.js";
|
|
73
|
-
import { listKnowledgeItems } from "../knowledge-memory/repository.js";
|
|
74
|
-
import "../knowledge-memory/index.js";
|
|
75
91
|
import { startConnectedKnowledgeCoordinator } from "../knowledge/coordinator.js";
|
|
76
92
|
import "../knowledge/index.js";
|
|
77
93
|
import { PersonalReplyComposer } from "../personal-agent/reply-composer.js";
|
|
@@ -94,7 +110,6 @@ import { reconcileHomeIntelligenceAutomation } from "./home-intelligence-automat
|
|
|
94
110
|
import { createPhoneSetupService } from "./hono/routes/phone-setup.js";
|
|
95
111
|
import { BrowserSetupService } from "../browser/setup/service.js";
|
|
96
112
|
import { PhoneStreamGateway } from "../phone/stream-gateway.js";
|
|
97
|
-
import { drainPersonalResultReads } from "../personal-agent/result-read-continuations.js";
|
|
98
113
|
import { PersonalProactivityService } from "../personal-agent/proactivity/service.js";
|
|
99
114
|
import { reconcilePersonalProactivityAutomation } from "../personal-agent/proactivity/automation.js";
|
|
100
115
|
import { createBackgroundTask } from "../infra/background-task.js";
|
|
@@ -105,21 +120,6 @@ import { WorkDiscoveryService } from "../work-discovery/service.js";
|
|
|
105
120
|
import { buildVoiceMemoryContext } from "../voice/realtime/memory-context.js";
|
|
106
121
|
import { buildVoicePersonaContext } from "../voice/realtime/persona-context.js";
|
|
107
122
|
import { voiceMemoryBudget, voicePersonaBudget } from "../voice/realtime/conversation-context.js";
|
|
108
|
-
import { drainEmbeddedSessionRunnerShutdowns, evictAllEmbeddedSessionRunners } from "../agent/embedded/session-runner.js";
|
|
109
|
-
import { SessionIndex } from "../session/manager.js";
|
|
110
|
-
import "../session/index.js";
|
|
111
|
-
import { collectMediaUrisFromMessages, deleteMediaUris } from "../media/session-references.js";
|
|
112
|
-
import { runMemoryMaintenance } from "../memory-maintenance/service.js";
|
|
113
|
-
import "../memory-maintenance/index.js";
|
|
114
|
-
import { buildNoteAgentContext } from "../notes/agent-context.js";
|
|
115
|
-
import { NotesService } from "../notes/service.js";
|
|
116
|
-
import { LocalAppService } from "../local-apps/service.js";
|
|
117
|
-
import { TaskSignalService } from "../tasks/task-signal-service.js";
|
|
118
|
-
import { createProductDispatcher } from "../capabilities/runtime/product.js";
|
|
119
|
-
import { assertTaskExecutorReady } from "../tasks/task-execution-capabilities.js";
|
|
120
|
-
import { TaskRunDispatcher } from "../tasks/task-run-dispatcher.js";
|
|
121
|
-
import "../tasks/index.js";
|
|
122
|
-
import { AgentService } from "../agent/service.js";
|
|
123
123
|
import "../notes/index.js";
|
|
124
124
|
import { EphemeralSideChatManager } from "./side-chat/manager.js";
|
|
125
125
|
import { SideChatRunService } from "./side-chat/run-service.js";
|
|
@@ -6,14 +6,14 @@ import { TaskRepository, init_task_repository } from "../tasks/task-repository.j
|
|
|
6
6
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
7
7
|
import { getCurrentTranscriptId, init_session_repository } from "../storage/sqlite/session-repository.js";
|
|
8
8
|
import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
9
|
-
import { TaskOriginRepository } from "../tasks/task-origin-repository.js";
|
|
10
|
-
import { isSessionSourceBinding } from "../agent/source-context/types.js";
|
|
11
|
-
import { ProjectStore } from "../projects/project-store.js";
|
|
12
9
|
import { runExec } from "../infra/exec.js";
|
|
13
10
|
import { getExecutionEnvironmentForSession } from "../execution-environments/subject.js";
|
|
14
11
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
15
|
-
import {
|
|
12
|
+
import { ProjectStore } from "../projects/project-store.js";
|
|
13
|
+
import { TaskOriginRepository } from "../tasks/task-origin-repository.js";
|
|
16
14
|
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
15
|
+
import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
|
|
16
|
+
import { isSessionSourceBinding } from "../agent/source-context/types.js";
|
|
17
17
|
import { realpath, stat } from "node:fs/promises";
|
|
18
18
|
//#region src/gateway/session-context-summary.ts
|
|
19
19
|
init_session_repository();
|