@xopcai/xopc 0.0.418 → 0.0.419
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-fKpEKELX.js → index-DS60ZSdQ.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 +44 -44
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path, { relative, resolve } from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import fsSync from "node:fs";
|
|
3
3
|
//#region src/gateway/workspace-editor-path.ts
|
|
4
4
|
/** Resolve a workspace-relative POSIX path safely (no `..`, stays under root). */
|
|
5
5
|
function resolveWorkspaceSafePath(workspaceRoot, rel) {
|
|
@@ -20,7 +20,7 @@ function isPathUnderWorkspace(workspaceRoot, absPath) {
|
|
|
20
20
|
function normalizeComparablePath(input) {
|
|
21
21
|
let resolved = resolve(input);
|
|
22
22
|
try {
|
|
23
|
-
resolved =
|
|
23
|
+
resolved = fsSync.realpathSync.native(resolved);
|
|
24
24
|
} catch {}
|
|
25
25
|
return process.platform === "win32" ? resolved.toLowerCase() : resolved;
|
|
26
26
|
}
|
|
@@ -7,8 +7,8 @@ import { init_model_policy, isComputerModel, isDedicatedComputerProfile } from "
|
|
|
7
7
|
import { voiceSupportsMode } from "../../packages/realtime-protocol/src/voice-catalog.js";
|
|
8
8
|
import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
|
|
9
9
|
import { getModelCatalogStore, init_model_catalog_store } from "../providers/model-catalog-store.js";
|
|
10
|
-
import { phoneModelProfile } from "../phone/model-adapter.js";
|
|
11
10
|
import { compareCatalogModels } from "../providers/model-catalog-ranking.js";
|
|
11
|
+
import { phoneModelProfile } from "../phone/model-adapter.js";
|
|
12
12
|
import { prepareUpdateGlobalDefaults } from "./global-defaults-admin.js";
|
|
13
13
|
//#region src/gateway/xopc-cloud-capability-setup.ts
|
|
14
14
|
init_voice();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
2
|
-
import { resolveModelSelector } from "../config/agent-model-intents.js";
|
|
3
2
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
4
|
-
import { completeWithResolvedCredentials, isLocalModelBaseUrl } from "../providers/model-call.js";
|
|
5
3
|
import { extractAssistantText, getAssistantMessageErrorReason } from "../providers/model-response.js";
|
|
4
|
+
import { completeWithResolvedCredentials, isLocalModelBaseUrl } from "../providers/model-call.js";
|
|
5
|
+
import { resolveModelSelector } from "../config/agent-model-intents.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/home-intelligence/generator.ts
|
|
8
8
|
init_agent_scope();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { ProjectService } from "../projects/project-service.js";
|
|
1
2
|
import { init_paths, resolveSkillsDir } from "../config/paths.js";
|
|
3
|
+
import { resolveWorkspaceSkillsDir } from "../agent/skills/workspace-skills-dir.js";
|
|
2
4
|
import { listKnowledgeItems } from "../knowledge-memory/repository.js";
|
|
3
5
|
import "../knowledge-memory/index.js";
|
|
4
|
-
import { ProjectService } from "../projects/project-service.js";
|
|
5
|
-
import { resolveWorkspaceSkillsDir } from "../agent/skills/workspace-skills-dir.js";
|
|
6
6
|
import { ImportError } from "./types.js";
|
|
7
7
|
import { digest } from "./files.js";
|
|
8
8
|
import { canonicalTarget } from "./planner.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
2
|
import { init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
3
|
-
import { init_paths } from "../config/paths.js";
|
|
4
3
|
import { ProjectService } from "../projects/project-service.js";
|
|
4
|
+
import { init_paths } from "../config/paths.js";
|
|
5
5
|
import { ImportError } from "./types.js";
|
|
6
6
|
import { digest, fileHash, readRegularFile, readTree } from "./files.js";
|
|
7
7
|
import { importContextDocument } from "./contextImport.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
|
-
import { init_paths, resolveBundledSkillsDir, resolveSkillsDir } from "../config/paths.js";
|
|
3
2
|
import { ProjectService } from "../projects/project-service.js";
|
|
3
|
+
import { init_paths, resolveBundledSkillsDir, resolveSkillsDir } from "../config/paths.js";
|
|
4
4
|
import { resolveWorkspaceSkillsDir } from "../agent/skills/workspace-skills-dir.js";
|
|
5
5
|
import { loadSkills } from "../agent/skills/index.js";
|
|
6
6
|
import { ProjectTrustStore } from "../project-trust/trust-store.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { listPortListeners } from "../gateway/ports.js";
|
|
2
2
|
import { isGatewayArgv, parseProcCmdline } from "./gateway-process-argv.js";
|
|
3
|
-
import
|
|
3
|
+
import fsSync from "node:fs";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
5
|
//#region src/infra/gateway-processes.ts
|
|
6
6
|
function readGatewayProcessArgsSync(pid) {
|
|
7
7
|
if (process.platform === "linux") try {
|
|
8
|
-
return parseProcCmdline(
|
|
8
|
+
return parseProcCmdline(fsSync.readFileSync(`/proc/${pid}/cmdline`, "utf8"));
|
|
9
9
|
} catch {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveBrewPathDirs } from "./brew.js";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fsSync from "node:fs";
|
|
5
5
|
//#region src/infra/path-env.ts
|
|
6
6
|
function isTruthyEnvValue(value) {
|
|
7
7
|
if (!value) return false;
|
|
@@ -10,7 +10,7 @@ function isTruthyEnvValue(value) {
|
|
|
10
10
|
}
|
|
11
11
|
function isExecutable(filePath) {
|
|
12
12
|
try {
|
|
13
|
-
|
|
13
|
+
fsSync.accessSync(filePath, fsSync.constants.X_OK);
|
|
14
14
|
return true;
|
|
15
15
|
} catch {
|
|
16
16
|
return false;
|
|
@@ -18,7 +18,7 @@ function isExecutable(filePath) {
|
|
|
18
18
|
}
|
|
19
19
|
function isDirectory(dirPath) {
|
|
20
20
|
try {
|
|
21
|
-
return
|
|
21
|
+
return fsSync.statSync(dirPath).isDirectory();
|
|
22
22
|
} catch {
|
|
23
23
|
return false;
|
|
24
24
|
}
|
|
@@ -4,8 +4,8 @@ import { readPackageVersion } from "./package-json.js";
|
|
|
4
4
|
import { createDefaultCommandRunner } from "./run-command.js";
|
|
5
5
|
import { verifyInstalledGatewayRuntime } from "./package-runtime-check.js";
|
|
6
6
|
import path from "node:path";
|
|
7
|
-
import
|
|
8
|
-
import fs
|
|
7
|
+
import fsSync from "node:fs";
|
|
8
|
+
import fs from "node:fs/promises";
|
|
9
9
|
//#region src/infra/update-global.ts
|
|
10
10
|
const XOPC_PACKAGE_NAME = "@xopcai/xopc";
|
|
11
11
|
const GLOBAL_RENAME_PREFIX = ".";
|
|
@@ -19,7 +19,7 @@ const NPM_GLOBAL_INSTALL_OMIT_OPTIONAL_FLAGS = ["--omit=optional", ...NPM_GLOBAL
|
|
|
19
19
|
const GLOBAL_DETECT_TIMEOUT_MS = 15e3;
|
|
20
20
|
async function pathExists(targetPath) {
|
|
21
21
|
try {
|
|
22
|
-
await fs
|
|
22
|
+
await fs.access(targetPath);
|
|
23
23
|
return true;
|
|
24
24
|
} catch {
|
|
25
25
|
return false;
|
|
@@ -27,7 +27,7 @@ async function pathExists(targetPath) {
|
|
|
27
27
|
}
|
|
28
28
|
async function tryRealpath(targetPath) {
|
|
29
29
|
try {
|
|
30
|
-
return await fs
|
|
30
|
+
return await fs.realpath(targetPath);
|
|
31
31
|
} catch {
|
|
32
32
|
return path.resolve(targetPath);
|
|
33
33
|
}
|
|
@@ -50,14 +50,14 @@ function resolvePreferredNpmCommand(pkgRoot) {
|
|
|
50
50
|
const prefix = inferNpmPrefixFromPackageRoot(pkgRoot);
|
|
51
51
|
if (!prefix) return null;
|
|
52
52
|
const candidate = process.platform === "win32" ? path.join(prefix, "npm.cmd") : path.join(prefix, "bin", "npm");
|
|
53
|
-
return
|
|
53
|
+
return fsSync.existsSync(candidate) ? candidate : null;
|
|
54
54
|
}
|
|
55
55
|
function resolveNpmFromExecPath() {
|
|
56
56
|
const execPath = process.execPath?.trim();
|
|
57
57
|
if (!execPath) return null;
|
|
58
58
|
const binDir = path.dirname(execPath);
|
|
59
59
|
const candidate = process.platform === "win32" ? path.join(binDir, "npm.cmd") : path.join(binDir, "npm");
|
|
60
|
-
return
|
|
60
|
+
return fsSync.existsSync(candidate) ? candidate : null;
|
|
61
61
|
}
|
|
62
62
|
function resolvePreferredGlobalManagerCommand(manager, pkgRoot) {
|
|
63
63
|
if (manager !== "npm") return manager;
|
|
@@ -206,7 +206,7 @@ async function cleanupGlobalRenameDirs(params) {
|
|
|
206
206
|
const prefix = `${GLOBAL_RENAME_PREFIX}${name}-`;
|
|
207
207
|
let entries = [];
|
|
208
208
|
try {
|
|
209
|
-
entries = await fs
|
|
209
|
+
entries = await fs.readdir(root);
|
|
210
210
|
} catch {
|
|
211
211
|
return { removed };
|
|
212
212
|
}
|
|
@@ -214,8 +214,8 @@ async function cleanupGlobalRenameDirs(params) {
|
|
|
214
214
|
if (!entry.startsWith(prefix)) continue;
|
|
215
215
|
const target = path.join(root, entry);
|
|
216
216
|
try {
|
|
217
|
-
if (!(await fs
|
|
218
|
-
await fs
|
|
217
|
+
if (!(await fs.lstat(target)).isDirectory()) continue;
|
|
218
|
+
await fs.rm(target, {
|
|
219
219
|
recursive: true,
|
|
220
220
|
force: true
|
|
221
221
|
});
|
|
@@ -7,9 +7,9 @@ import { claimKnowledgeSourceItems, completeKnowledgeSourceItemSynthesis, pruneB
|
|
|
7
7
|
import "../storage/sqlite/index.js";
|
|
8
8
|
import { clearMemoryAudit } from "../user-context/memory-suppression.js";
|
|
9
9
|
import { getActiveUnderstandingConsent } from "../user-context/sources/consent-repository.js";
|
|
10
|
+
import { consentFilteredText } from "../user-context/sources/consent-fields.js";
|
|
10
11
|
import { listKnowledgeItems, transitionKnowledgeStatus, writeKnowledgeItem } from "../knowledge-memory/repository.js";
|
|
11
12
|
import "../knowledge-memory/index.js";
|
|
12
|
-
import { consentFilteredText } from "../user-context/sources/consent-fields.js";
|
|
13
13
|
import { randomUUID } from "node:crypto";
|
|
14
14
|
//#region src/knowledge/connected-knowledge-pipeline.ts
|
|
15
15
|
init_transaction();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConnectedKnowledgePipeline } from "./connected-knowledge-pipeline.js";
|
|
2
1
|
import { KnowledgeIngestionService, SqliteKnowledgeSourceStateStore } from "./ingestion-service.js";
|
|
2
|
+
import { ConnectedKnowledgePipeline } from "./connected-knowledge-pipeline.js";
|
|
3
3
|
import { startConnectedKnowledgeCoordinator } from "./coordinator.js";
|
|
4
4
|
import { LocalFolderKnowledgeSourceAdapter } from "./local-folder-adapter.js";
|
|
5
5
|
export { ConnectedKnowledgePipeline, KnowledgeIngestionService, LocalFolderKnowledgeSourceAdapter, SqliteKnowledgeSourceStateStore, startConnectedKnowledgeCoordinator };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_search_text, memorySearchQuery } from "./search-text.js";
|
|
2
2
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
3
3
|
import { validateScope } from "../user-model/domain.js";
|
|
4
|
-
import { inferMemorySensitivity } from "../agent/memory/sensitivity.js";
|
|
5
4
|
import { clearMemoryAudit, isMemorySuppressed, memoryFingerprint, restoreMemory, suppressMemory } from "../user-context/memory-suppression.js";
|
|
5
|
+
import { inferMemorySensitivity } from "../agent/memory/sensitivity.js";
|
|
6
6
|
import { canUseKnowledge, knowledgeContentSources } from "./usage-policy.js";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
8
|
//#region src/knowledge-memory/repository.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
3
3
|
import { init_session_repository } from "../storage/sqlite/session-repository.js";
|
|
4
|
-
import { isOwnerIdentity } from "../user-context/identity-bindings.js";
|
|
5
4
|
import { getUnderstandingConsent } from "../user-context/sources/consent-repository.js";
|
|
5
|
+
import { isOwnerIdentity } from "../user-context/identity-bindings.js";
|
|
6
6
|
//#region src/knowledge-memory/usage-policy.ts
|
|
7
7
|
init_transaction();
|
|
8
8
|
init_session_repository();
|
|
@@ -6,10 +6,10 @@ import { afterSqliteCommit, init_transaction, runSqliteWriteTransaction } from "
|
|
|
6
6
|
import { ExtensionCapabilityBindingsSchema, extensionCapabilityPermissions } from "../../packages/gateway-contract/src/extension-capabilities.js";
|
|
7
7
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
8
8
|
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
9
|
-
import { init_paths, resolveExtensionsDir } from "../config/paths.js";
|
|
10
9
|
import { slugifyProjectName } from "../projects/project-store.js";
|
|
11
|
-
import { LocalAppStore } from "./store.js";
|
|
12
10
|
import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
|
|
11
|
+
import { init_paths, resolveExtensionsDir } from "../config/paths.js";
|
|
12
|
+
import { LocalAppStore } from "./store.js";
|
|
13
13
|
import { validateLocalAppCapabilityContracts } from "./capabilities/contracts.js";
|
|
14
14
|
import { buildLocalAppFixGuidance } from "./fix-guidance.js";
|
|
15
15
|
import { readLocalAppAcceptanceConfig } from "./acceptance.js";
|
|
@@ -2,8 +2,8 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { CapabilityErrorCodeSchema } from "../../packages/gateway-contract/src/capabilities.js";
|
|
4
4
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
5
|
-
import { resolveGatewayLocalClientHost } from "../config/gateway-bind.js";
|
|
6
5
|
import { loadConfig } from "../config/loader.js";
|
|
6
|
+
import { resolveGatewayLocalClientHost } from "../config/gateway-bind.js";
|
|
7
7
|
import { createGatewayCredential, gatewayCredentialAuthorization } from "../gateway/credential.js";
|
|
8
8
|
import { fetch } from "undici";
|
|
9
9
|
//#region src/mcp/gateway-http-client.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerMediaUnderstandingProvider } from "./registry.js";
|
|
2
1
|
import { normalizeBaseUrl, postMultipartRequest } from "../media-shared/http/provider-http.js";
|
|
3
2
|
import "../media-shared/http/index.js";
|
|
3
|
+
import { registerMediaUnderstandingProvider } from "./registry.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
//#region src/media-understanding/openai-compatible-audio.ts
|
|
6
6
|
/**
|
|
@@ -2,16 +2,16 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
4
4
|
import { claimContextExtractionRun, finishContextExtractionRun } from "../storage/sqlite/context-extraction-repository.js";
|
|
5
|
-
import { init_config, resolveKnowledgeReadPolicy } from "../user-context/config.js";
|
|
6
|
-
import { learningPolicyHash } from "./repository.js";
|
|
7
5
|
import { getActiveUnderstandingConsent, getUnderstandingConsent } from "../user-context/sources/consent-repository.js";
|
|
8
|
-
import {
|
|
6
|
+
import { init_config, resolveKnowledgeReadPolicy } from "../user-context/config.js";
|
|
9
7
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
10
8
|
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
11
|
-
import { isLoopbackModel } from "../providers/local-model.js";
|
|
12
|
-
import { ConnectedKnowledgePipeline } from "../knowledge/connected-knowledge-pipeline.js";
|
|
13
9
|
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
10
|
+
import { resolveModelSelector } from "../config/agent-model-intents.js";
|
|
11
|
+
import { ConnectedKnowledgePipeline } from "../knowledge/connected-knowledge-pipeline.js";
|
|
14
12
|
import { extractionInputHash } from "../user-context/extraction/registry.js";
|
|
13
|
+
import { learningPolicyHash } from "./repository.js";
|
|
14
|
+
import { isLoopbackModel } from "../providers/local-model.js";
|
|
15
15
|
import { WorkCandidateSchema } from "./work-candidate.js";
|
|
16
16
|
import { applyWorkCandidates } from "./work-capture.js";
|
|
17
17
|
import { randomUUID } from "node:crypto";
|
|
@@ -2,10 +2,10 @@ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "
|
|
|
2
2
|
import { createContextEvidence } from "../storage/sqlite/context-evidence-repository.js";
|
|
3
3
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
4
4
|
import { init_session_repository } from "../storage/sqlite/session-repository.js";
|
|
5
|
-
import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
|
|
6
5
|
import { inferMemorySensitivity } from "../agent/memory/sensitivity.js";
|
|
7
6
|
import { writeKnowledgeItem } from "../knowledge-memory/repository.js";
|
|
8
7
|
import "../knowledge-memory/index.js";
|
|
8
|
+
import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
10
|
//#region src/memory-learning/task-receipts.ts
|
|
11
11
|
init_session_repository();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { getNoteAgentContextRecord, upsertNoteAgentContextRecord } from "../storage/sqlite/note-agent-context-repository.js";
|
|
2
2
|
import "../storage/sqlite/index.js";
|
|
3
|
-
import { extractDocumentText } from "../document-understanding/extract.js";
|
|
4
|
-
import { resolveImageModelConfigForTool } from "../agent/image/tool-model-config.js";
|
|
5
|
-
import { describeImagesWithFallback } from "../agent/image/understanding/runtime.js";
|
|
6
|
-
import { transcribe } from "../voice/stt/transcribe-core.js";
|
|
7
3
|
import { isSTTAvailable } from "../voice/stt/availability.js";
|
|
4
|
+
import { transcribe } from "../voice/stt/transcribe-core.js";
|
|
8
5
|
import { mergeSttConfigFromAppConfig } from "../voice/stt/config.js";
|
|
9
6
|
import "../voice/stt/index.js";
|
|
7
|
+
import { extractDocumentText } from "../document-understanding/extract.js";
|
|
8
|
+
import { resolveImageModelConfigForTool } from "../agent/image/tool-model-config.js";
|
|
9
|
+
import { describeImagesWithFallback } from "../agent/image/understanding/runtime.js";
|
|
10
10
|
import { extname } from "node:path";
|
|
11
11
|
import { readFile } from "node:fs/promises";
|
|
12
12
|
//#region src/notes/agent-context.ts
|
package/dist/src/notes/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { buildNoteAgentContext, buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact } from "./agent-context.js";
|
|
2
1
|
import { resolveNoteMediaDir, resolveNotesDir } from "./paths.js";
|
|
3
2
|
import { NotesStore } from "./store.js";
|
|
3
|
+
import { buildNoteAgentContext, buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact } from "./agent-context.js";
|
|
4
4
|
import { NotesService } from "./service.js";
|
|
5
5
|
export { NotesService, NotesStore, buildNoteAgentContext, buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact, resolveNoteMediaDir, resolveNotesDir };
|
|
@@ -6,13 +6,13 @@ import { buildNoteAttachmentRef } from "./attachment-ref.js";
|
|
|
6
6
|
import { parseNoteMarkdown } from "./note-markdown.js";
|
|
7
7
|
import { listNoteProjectSummaries } from "../storage/sqlite/notes-repository.js";
|
|
8
8
|
import { changedFieldsFromPatch, emitActivity, previewText, systemActivityActor, systemActivitySource } from "../activity/emitter.js";
|
|
9
|
+
import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
|
|
10
|
+
import { revokeNoteShareRecords } from "../share/note-share-revocation.js";
|
|
11
|
+
import { NotesStore } from "./store.js";
|
|
9
12
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
10
13
|
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
11
|
-
import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
|
|
12
14
|
import { partitionAttachmentsByReference } from "./note-attachment-sync.js";
|
|
13
15
|
import { buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact } from "./agent-context.js";
|
|
14
|
-
import { revokeNoteShareRecords } from "../share/note-share-revocation.js";
|
|
15
|
-
import { NotesStore } from "./store.js";
|
|
16
16
|
import { createHash, randomUUID } from "node:crypto";
|
|
17
17
|
//#region src/notes/service.ts
|
|
18
18
|
init_providers();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getConnectorInstallation, init_connector_repository, listConnectorConnections } from "../storage/sqlite/connector-repository.js";
|
|
2
2
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
3
|
-
import { isPersonalConversation } from "./repository.js";
|
|
4
3
|
import { canAccessConnectorAccount, currentAccountConnections } from "../connectors/account-access.js";
|
|
5
4
|
import { connectorPrincipalForSession } from "../connectors/principal.js";
|
|
6
|
-
import {
|
|
5
|
+
import { isPersonalConversation } from "./repository.js";
|
|
7
6
|
import { assessSpecialist } from "../agent-matching/service.js";
|
|
7
|
+
import { connectionCandidates, resolveConnectionCandidate } from "../connectors/connection-candidates.js";
|
|
8
8
|
//#region src/personal-agent/capability-service.ts
|
|
9
9
|
init_repository();
|
|
10
10
|
init_connector_repository();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PersonalFeedbackSchema, PersonalProactivitySettingsSchema, PersonalStrategyRollbackSchema } from "../../../packages/gateway-contract/src/personal-proactivity.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
-
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
4
3
|
import { getPersonalAgent } from "../repository.js";
|
|
4
|
+
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
5
5
|
import { getProactivitySettings, listInterestCandidates, patchAttention, patchProactivitySettings, provenanceDetail, recordFeedback, rollbackStrategy, strategyState } from "./repository.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/personal-agent/proactivity/routes.ts
|
|
@@ -6,16 +6,16 @@ import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
|
6
6
|
import { init_session_instance_repository, readCurrentTranscriptId } from "../../storage/sqlite/session-instance-repository.js";
|
|
7
7
|
import { appendTranscriptEntry } from "../../storage/sqlite/transcript-repository.js";
|
|
8
8
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
9
|
-
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
10
|
-
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
11
|
-
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
12
|
-
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
13
|
-
import { getPersonalAgent } from "../repository.js";
|
|
14
9
|
import { emitSessionTranscriptUpdate } from "../../session/transcript-events.js";
|
|
10
|
+
import { getPersonalAgent } from "../repository.js";
|
|
15
11
|
import { DurableState } from "../../storage/sqlite/durable-state.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
12
|
+
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
13
|
+
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
14
|
+
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
18
15
|
import { personalConversationState } from "../conversation-state.js";
|
|
16
|
+
import { PERSONAL_PERSONA_GUIDANCE } from "../persona.js";
|
|
17
|
+
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
18
|
+
import { enqueueDue, enqueueWakeup, getAttention, getAttentionSources, getProactivitySettings, isQuiet, listAttention, localDay, preparationStrategy, recordFeedback, reserveModelCall, saveAttention, sourceFingerprint, userText } from "./repository.js";
|
|
19
19
|
import { randomUUID } from "node:crypto";
|
|
20
20
|
import { z } from "zod";
|
|
21
21
|
//#region src/personal-agent/proactivity/service.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { isXopcDatabaseOpen } from "../storage/sqlite/connection.js";
|
|
2
2
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
3
3
|
import "../storage/sqlite/index.js";
|
|
4
|
-
import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
|
|
5
|
-
import { isKnowledgeCurrent, knowledgeItemAllowed, listKnowledgeItems } from "../knowledge-memory/repository.js";
|
|
6
|
-
import "../knowledge-memory/index.js";
|
|
7
4
|
import { getActiveAssertionForSlot } from "../user-model/repository.js";
|
|
8
|
-
import { getProjectForSession } from "../projects/workspace.js";
|
|
9
|
-
import { canUseAssertion } from "../user-model/usage-policy.js";
|
|
10
|
-
import "../user-model/index.js";
|
|
11
5
|
import { isPersonalConversation } from "./repository.js";
|
|
12
|
-
import { TaskOriginRepository } from "../tasks/task-origin-repository.js";
|
|
13
6
|
import { listPersonalResults } from "./result-reader.js";
|
|
7
|
+
import { TaskOriginRepository } from "../tasks/task-origin-repository.js";
|
|
8
|
+
import { canUseAssertion } from "../user-model/usage-policy.js";
|
|
9
|
+
import "../user-model/index.js";
|
|
10
|
+
import { getProjectForSession } from "../projects/workspace.js";
|
|
11
|
+
import { isKnowledgeCurrent, knowledgeItemAllowed, listKnowledgeItems } from "../knowledge-memory/repository.js";
|
|
12
|
+
import "../knowledge-memory/index.js";
|
|
13
|
+
import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
|
|
14
14
|
//#region src/personal-agent/prompt-context.ts
|
|
15
15
|
const clip = (value, limit) => value && (value.length > limit ? `${value.slice(0, limit - 1)}…` : value);
|
|
16
16
|
/** Keep complete JSON records and identifiers, even when the snapshot is incomplete. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PERSONAL_DEFAULT_STYLE_RULES } from "./default-style.js";
|
|
2
|
+
import { PERSONAL_REPLY_EXAMPLES, PERSONAL_REPLY_STYLE_RULES } from "./reply-style.js";
|
|
2
3
|
import { PERSONAL_EMOTIONAL_STYLE_RULE, PERSONAL_IDENTITY_CONTINUITY_RULE } from "./persona.js";
|
|
3
4
|
import { PERSONAL_COMMUNICATION_RULES, PERSONAL_RELIABILITY_RULES } from "./communication.js";
|
|
4
|
-
import { PERSONAL_REPLY_EXAMPLES, PERSONAL_REPLY_STYLE_RULES } from "./reply-style.js";
|
|
5
5
|
//#region src/personal-agent/prompts.ts
|
|
6
6
|
const DELEGATION_RULES = [
|
|
7
7
|
"Answer directly when your capabilities suffice. Otherwise call personal_task(command=\"submit\") with a short objective. For a self-contained current request send {command:\"submit\", objective:\"short outcome\", useOriginalRequest:true}; command is required. With this mode, the host copies its entire stored text, including exact constraints. Preserve sourceRefs and explicitly requested Agent/Skills. Use a concise complete description instead when earlier conversation must be synthesized. Submit before reading materials. The background Task Router selects and starts the executor. After the tool succeeds, reply only with a short confirmation such as \"Submitted; I will report the result here.\" in the conversation language, then finish. Do not restate any task details, files, requirements or acceptance criteria, and do not wait for the worker. Remain available for conversation.",
|
|
@@ -10,23 +10,23 @@ import { appendTranscriptEntry, loadLlmMessagesForSession } from "../storage/sql
|
|
|
10
10
|
import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
11
11
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
12
12
|
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
13
|
-
import { init_providers, resolveModel } from "../providers/index.js";
|
|
14
|
-
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
15
|
-
import { extractAssistantText, getAssistantMessageErrorReason } from "../providers/model-response.js";
|
|
16
|
-
import { getPersonalAgentByConversation } from "./repository.js";
|
|
17
13
|
import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
18
|
-
import {
|
|
19
|
-
import { loadProfileBootstrapFiles } from "../agent/bootstrap/load-bootstrap-files.js";
|
|
14
|
+
import { getPersonalAgentByConversation } from "./repository.js";
|
|
20
15
|
import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
|
|
16
|
+
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
17
|
+
import { TaskCriterionReviewRepository } from "../tasks/task-criterion-review-repository.js";
|
|
21
18
|
import { hasPersonalResultFileLinks, sanitizePersonalResultFileLinks } from "./result-file-links.js";
|
|
22
19
|
import { taskInstructionSequence } from "../tasks/task-instruction-sequence.js";
|
|
23
|
-
import "../
|
|
24
|
-
import {
|
|
20
|
+
import { init_providers, resolveModel } from "../providers/index.js";
|
|
21
|
+
import { extractAssistantText, getAssistantMessageErrorReason } from "../providers/model-response.js";
|
|
22
|
+
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
25
23
|
import { PERSONAL_DEFAULT_STYLE_RULES } from "./default-style.js";
|
|
26
|
-
import {
|
|
24
|
+
import { recordPersonalPerformance } from "./performance.js";
|
|
25
|
+
import "../tasks/task-research-result.js";
|
|
27
26
|
import { PERSONAL_REPLY_EXAMPLES, PERSONAL_REPLY_STYLE_RULES } from "./reply-style.js";
|
|
28
|
-
import { TaskCriterionReviewRepository } from "../tasks/task-criterion-review-repository.js";
|
|
29
27
|
import { personalConversationState } from "./conversation-state.js";
|
|
28
|
+
import { PERSONAL_PERSONA_GUIDANCE } from "./persona.js";
|
|
29
|
+
import { loadProfileBootstrapFiles } from "../agent/bootstrap/load-bootstrap-files.js";
|
|
30
30
|
import { randomUUID } from "node:crypto";
|
|
31
31
|
import { z } from "zod";
|
|
32
32
|
//#region src/personal-agent/reply-composer.ts
|
|
@@ -7,11 +7,11 @@ import { init_session_instance_repository, readCurrentTranscriptId } from "../st
|
|
|
7
7
|
import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
|
|
8
8
|
import { getPersonalRequest, init_request_repository, updatePersonalRequest } from "./request-repository.js";
|
|
9
9
|
import { appendTranscriptEntry, loadLlmMessagesForSession } from "../storage/sqlite/transcript-repository.js";
|
|
10
|
-
import { getPersonalAgentByConversation } from "./repository.js";
|
|
11
10
|
import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
11
|
+
import { getPersonalAgentByConversation } from "./repository.js";
|
|
12
12
|
import { warmPersonalResult } from "./result-reader.js";
|
|
13
|
-
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
14
13
|
import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
|
|
14
|
+
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
15
15
|
import { PersonalRequestResultSchema, renderPersonalRequestResult } from "./request-result.js";
|
|
16
16
|
import { enqueuePersonalReply } from "./reply-composer.js";
|
|
17
17
|
//#region src/personal-agent/request-delivery.ts
|
|
@@ -12,21 +12,21 @@ import { getConnectorAccount, init_connector_account_repository } from "../stora
|
|
|
12
12
|
import { getConnectorConnection, getConnectorInstallation, init_connector_repository, listConnectorConnections } from "../storage/sqlite/connector-repository.js";
|
|
13
13
|
import { cancelConnectionObjective, init_connection_wait_repository, publishConnectionWait, requireSessionConnection } from "../storage/sqlite/connection-wait-repository.js";
|
|
14
14
|
import { getUserProfileSnapshot } from "../user-model/profile.js";
|
|
15
|
-
import { isPersonalConversation } from "./repository.js";
|
|
16
15
|
import { resolveTaskLocale } from "../tasks/task-language.js";
|
|
17
16
|
import { canAccessConnectorAccount } from "../connectors/account-access.js";
|
|
18
17
|
import { connectorPrincipalForSession } from "../connectors/principal.js";
|
|
19
|
-
import {
|
|
18
|
+
import { isPersonalConversation } from "./repository.js";
|
|
20
19
|
import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
|
|
21
|
-
import { defineTaskContract } from "../tasks/task-contract-definition.js";
|
|
22
|
-
import { abortEmbeddedRun } from "../agent/embedded/runs.js";
|
|
23
|
-
import { PERSONAL_WORKER_RESULT_GUIDANCE } from "./communication.js";
|
|
24
|
-
import { resolveResponseLanguageForSession } from "../agent/prompt/response-language.js";
|
|
25
20
|
import { TaskApplicationService } from "../tasks/task-application-service.js";
|
|
26
|
-
import { assessSpecialist } from "../agent-matching/service.js";
|
|
27
|
-
import { personalCapabilities } from "./capability-service.js";
|
|
28
21
|
import { AgentSelectionRepository, selectionRequestHash } from "../agent-matching/selection-repository.js";
|
|
22
|
+
import { assessSpecialist } from "../agent-matching/service.js";
|
|
29
23
|
import { assertSpecialistEligible } from "../agent-matching/delegation-service.js";
|
|
24
|
+
import { resolveConnectionCandidate } from "../connectors/connection-candidates.js";
|
|
25
|
+
import { defineTaskContract } from "../tasks/task-contract-definition.js";
|
|
26
|
+
import { personalCapabilities } from "./capability-service.js";
|
|
27
|
+
import { PERSONAL_WORKER_RESULT_GUIDANCE } from "./communication.js";
|
|
28
|
+
import { resolveResponseLanguageForSession } from "../agent/prompt/response-language.js";
|
|
29
|
+
import { abortEmbeddedRun } from "../agent/embedded/runs.js";
|
|
30
30
|
import { createHash, randomUUID } from "node:crypto";
|
|
31
31
|
//#region src/personal-agent/request-service.ts
|
|
32
32
|
init_src();
|
|
@@ -7,10 +7,10 @@ import { init_session_instance_repository, readCurrentTranscriptId } from "../st
|
|
|
7
7
|
import { init_request_repository, personalRequestForTask } from "./request-repository.js";
|
|
8
8
|
import { getConnectorAccount, init_connector_account_repository } from "../storage/sqlite/connector-account-repository.js";
|
|
9
9
|
import { getConnectorConnection, getConnectorInstallation, init_connector_repository } from "../storage/sqlite/connector-repository.js";
|
|
10
|
-
import { isPersonalConversation } from "./repository.js";
|
|
11
10
|
import { canAccessConnectorAccount } from "../connectors/account-access.js";
|
|
12
11
|
import { connectorPrincipalForSession } from "../connectors/principal.js";
|
|
13
12
|
import { resolveMediaReference } from "../media/media-reference.js";
|
|
13
|
+
import { isPersonalConversation } from "./repository.js";
|
|
14
14
|
import { createRequire } from "node:module";
|
|
15
15
|
import { existsSync } from "node:fs";
|
|
16
16
|
import { fileURLToPath } from "node:url";
|
|
@@ -4,8 +4,8 @@ import { setSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
|
4
4
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
5
5
|
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
6
6
|
import { createConversation, init_conversation_repository } from "../storage/sqlite/conversation-repository.js";
|
|
7
|
-
import { getAvailableModels, init_providers } from "../providers/index.js";
|
|
8
7
|
import { getPersonalAgent, personalAgentId } from "./repository.js";
|
|
8
|
+
import { getAvailableModels, init_providers } from "../providers/index.js";
|
|
9
9
|
import { PERSONAL_MAIN_TOOL_IDS, PERSONAL_READ_TOOL_ALIASES } from "./policy.js";
|
|
10
10
|
import { getModelThinking } from "../providers/model-thinking.js";
|
|
11
11
|
import { personalInstructions } from "./prompts.js";
|
|
@@ -6,8 +6,8 @@ import { TaskRepository, init_task_repository } from "../tasks/task-repository.j
|
|
|
6
6
|
import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
|
|
7
7
|
import { TaskAllocationRepository } from "../tasks/task-allocation-repository.js";
|
|
8
8
|
import { TaskOriginRepository } from "../tasks/task-origin-repository.js";
|
|
9
|
-
import { abortEmbeddedRun, getEmbeddedRunByConversationId } from "../agent/embedded/runs.js";
|
|
10
9
|
import { TaskApplicationService } from "../tasks/task-application-service.js";
|
|
10
|
+
import { abortEmbeddedRun, getEmbeddedRunByConversationId } from "../agent/embedded/runs.js";
|
|
11
11
|
//#region src/personal-agent/task-cancel.ts
|
|
12
12
|
init_transaction();
|
|
13
13
|
init_task_repository();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PhoneDeviceSchema, PhoneError, init_contracts } from "./contracts.js";
|
|
2
|
-
import { normalizePhoneAppAccess } from "./app-access.js";
|
|
3
2
|
import { DurableState } from "../storage/sqlite/durable-state.js";
|
|
3
|
+
import { normalizePhoneAppAccess } from "./app-access.js";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
//#region src/phone/repository.ts
|
|
6
6
|
init_contracts();
|
|
@@ -3,6 +3,10 @@ import { init_logger } from "../utils/logger.js";
|
|
|
3
3
|
import { MOCK_PHONE_MODEL, PhoneError, PhoneInputSchema, init_contracts } from "./contracts.js";
|
|
4
4
|
import { resolveEffectiveAgentConfigForAgent } from "../config/agent-profile.js";
|
|
5
5
|
import { phoneAllowsApp, phoneAppAccess } from "./app-access.js";
|
|
6
|
+
import { advancePhonePlan, buildPhonePlan, createPhonePlanState } from "./planning.js";
|
|
7
|
+
import { canDispatchPhoneAction, observationSignature, phoneCompletionSatisfied } from "./reliability.js";
|
|
8
|
+
import { groundPhoneCoordinateAction, resolvePhoneSemanticAction } from "./semantic-controls.js";
|
|
9
|
+
import { createPhoneModel, isAboutScreen } from "./model-adapter.js";
|
|
6
10
|
import { nativePhoneOutput, updatePhoneFeedback } from "./task-feedback.js";
|
|
7
11
|
import { PhoneFrameCache, PhoneOperationBudget } from "./live-state.js";
|
|
8
12
|
import { PhoneInteractiveSession } from "./interactive-session.js";
|
|
@@ -10,10 +14,6 @@ import { LocalScrcpyProvider } from "./scrcpy.js";
|
|
|
10
14
|
import { AdbPhoneDriver, resolveAdbPath } from "./adb-driver.js";
|
|
11
15
|
import { CloudPhones } from "./cloud-phones.js";
|
|
12
16
|
import { WirelessPhones } from "./wireless.js";
|
|
13
|
-
import { advancePhonePlan, buildPhonePlan, createPhonePlanState } from "./planning.js";
|
|
14
|
-
import { canDispatchPhoneAction, observationSignature, phoneCompletionSatisfied } from "./reliability.js";
|
|
15
|
-
import { groundPhoneCoordinateAction, resolvePhoneSemanticAction } from "./semantic-controls.js";
|
|
16
|
-
import { createPhoneModel, isAboutScreen } from "./model-adapter.js";
|
|
17
17
|
import { PhoneRepository } from "./repository.js";
|
|
18
18
|
import { confirmPhoneFocusRecovery, phoneBackRecovery, phoneUnfocusedTypingHint, preparePhoneFocusRecovery } from "./recovery.js";
|
|
19
19
|
import { createPhoneNumericEntry, nextPhoneNumericEntry } from "./numeric-entry.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ProjectStore, slugifyProjectName } from "./project-store.js";
|
|
2
|
-
import { getProjectForSession, getProjectWorkspacePathForSession, resolveProjectWorkspacePath } from "./workspace.js";
|
|
3
2
|
import { ProjectWorkspaceConflictError, ProjectWorkspaceMissingError, canonicalWorkspacePath, ensureWorkspaceDirectory, inferProjectNameFromWorkspaceRoot, isPathSameOrInsideWorkspace, isSafeAutoCreateWorkspaceRoot, resolveWorkspaceProjectRoot, workspaceDirectoryExists } from "./workspace-project.js";
|
|
4
3
|
import { inferProjectExecutionMode, inferProjectKind } from "./project-kind.js";
|
|
5
4
|
import { bindSessionToProject, bindSessionsToProject, listProjectConversationIds, moveSessionToProject, unbindSessionFromProject } from "./session-bind.js";
|
|
@@ -10,4 +9,5 @@ import { CODING_PROJECT_AGENT_ID, inferSuggestedProjectDefaultAgentId, suggestPr
|
|
|
10
9
|
import { buildProjectLoopOverview } from "./project-loop.js";
|
|
11
10
|
import { bindAutomationToProject } from "./automation-bind.js";
|
|
12
11
|
import { bindKnowledgeItemToProject } from "./knowledge-bind.js";
|
|
12
|
+
import { getProjectForSession, getProjectWorkspacePathForSession, resolveProjectWorkspacePath } from "./workspace.js";
|
|
13
13
|
export { CODING_PROJECT_AGENT_ID, ProjectDeletionBlockedError, ProjectService, ProjectSkillError, ProjectSkillService, ProjectStore, ProjectWorkspaceConflictError, ProjectWorkspaceInUseError, ProjectWorkspaceInvalidError, ProjectWorkspaceMissingError, bindAutomationToProject, bindKnowledgeItemToProject, bindSessionToProject, bindSessionsToProject, buildProjectLoopOverview, canonicalWorkspacePath, ensureWorkspaceDirectory, getProjectForSession, getProjectWorkspacePathForSession, inferProjectExecutionMode, inferProjectKind, inferProjectNameFromWorkspaceRoot, inferSuggestedProjectDefaultAgentId, isPathSameOrInsideWorkspace, isSafeAutoCreateWorkspaceRoot, isValidProjectAgentId, listProjectConversationIds, moveSessionToProject, normalizeProjectAgentId, resolveProjectAgentId, resolveProjectWorkspacePath, resolveWorkspaceProjectRoot, slugifyProjectName, suggestProjectDefaultAgentId, unbindSessionFromProject, workspaceDirectoryExists };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { agentExists, init_resolve_route } from "../routing/resolve-route.js";
|
|
2
1
|
import { inferProjectKind } from "./project-kind.js";
|
|
2
|
+
import { agentExists, init_resolve_route } from "../routing/resolve-route.js";
|
|
3
3
|
//#region src/projects/project-agent-suggestion.ts
|
|
4
4
|
init_resolve_route();
|
|
5
5
|
const CODING_PROJECT_AGENT_ID = "coder";
|