@xopcai/xopc 0.0.430 → 0.0.431
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-C5BhE5cA.js → index-BmUSsdwn.js} +6 -6
- package/dist/gateway/static/root/index.html +1 -1
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +18 -18
- 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/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 +6 -6
- package/dist/src/agent/embedded/run-turn.js +19 -19
- package/dist/src/agent/embedded/session-runner.js +4 -4
- package/dist/src/agent/embedded/session-tool-result-guard.js +1 -1
- package/dist/src/agent/embedded/xopc-tools-bridge.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.js +4 -4
- package/dist/src/agent/external-tools/composio-provider.js +4 -4
- package/dist/src/agent/external-tools/endpoint-provider.js +6 -6
- 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/inbound/attachment-pipeline.js +2 -2
- package/dist/src/agent/inbound/inbound-loop.js +2 -2
- package/dist/src/agent/independent-execution.js +2 -2
- package/dist/src/agent/index.js +3 -3
- package/dist/src/agent/mcp/connection-drafts.js +1 -1
- package/dist/src/agent/mcp/connection-setup.js +1 -1
- package/dist/src/agent/mcp/conversation-setup.js +1 -1
- package/dist/src/agent/mcp/discovery.js +2 -2
- package/dist/src/agent/mcp/transport.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 +3 -3
- 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 +6 -6
- package/dist/src/agent/service/process-direct-streaming.js +6 -6
- 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/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- 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-manage-ops.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 +2 -2
- 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 +19 -19
- package/dist/src/agent/tools/fetch-text.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +2 -2
- package/dist/src/agent/tools/index.js +4 -4
- 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 +5 -5
- package/dist/src/agent/tools/phone-use-tool.js +1 -1
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/read.js +1 -1
- 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/skill-manage-tool.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 +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +12 -12
- package/dist/src/agent/transcript/index.js +2 -2
- package/dist/src/agent/transcript/transcript-hygiene.js +2 -2
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/agent-catalog/repository.js +1 -1
- 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/api/routes.js +2 -2
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/capabilities/write.js +1 -1
- package/dist/src/automations/configuration-conversation.js +1 -1
- package/dist/src/automations/delivery/delivery-router.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 +2 -2
- package/dist/src/automations/service/automation-service.js +2 -2
- package/dist/src/browser/native-messaging-host.js +1 -1
- package/dist/src/browser/providers/browser-ext-install.js +2 -2
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/capabilities/store-connector.js +2 -2
- package/dist/src/channels/attachments/voice-stt-webchat.js +1 -1
- package/dist/src/channels/index.js +1 -1
- 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 +2 -2
- 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 +7 -7
- package/dist/src/cli/commands/agents.js +1 -1
- 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 +1 -1
- 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/models.js +3 -3
- package/dist/src/cli/commands/onboard/channels/registry.js +1 -1
- package/dist/src/cli/commands/onboard/model.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 +5 -5
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +3 -3
- 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 +4 -4
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/index.js +3 -3
- 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 +2 -2
- 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/connectors/instances.js +1 -1
- package/dist/src/connectors/runtime-adapter-registry.js +2 -2
- 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/execution-environments/local-worktree-manager.js +1 -1
- 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 +3 -3
- package/dist/src/extensions/agent-plugins/source-http-fetch.js +1 -1
- package/dist/src/extensions/agent-plugins/validation.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 +2 -2
- package/dist/src/gateway/device-routes.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/global-defaults-admin.js +2 -2
- package/dist/src/gateway/hono/app.js +2 -2
- package/dist/src/gateway/hono/lib/config-payload.js +2 -2
- package/dist/src/gateway/hono/oauth-async.js +1 -1
- package/dist/src/gateway/hono/routes/agent-plugins.js +1 -1
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- 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/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.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/location-sharing.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 +3 -3
- package/dist/src/gateway/hono/routes/phone-dependencies.js +1 -1
- package/dist/src/gateway/hono/routes/phone-setup.js +2 -2
- package/dist/src/gateway/hono/routes/phone.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +5 -5
- 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 +1 -1
- package/dist/src/gateway/hono/routes/side-chats.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +2 -2
- 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/image-generation-setup.js +1 -1
- 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 +2 -2
- 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 +5 -5
- package/dist/src/gateway/service/session-command-service.js +2 -2
- package/dist/src/gateway/service/session-input-coordinator.js +1 -1
- package/dist/src/gateway/service.js +45 -45
- package/dist/src/gateway/session-context-summary.js +4 -4
- package/dist/src/gateway/session-reset-service.js +1 -1
- package/dist/src/gateway/workspace-editor-path.js +2 -2
- package/dist/src/gateway/xopc-cloud-capability-setup.js +4 -4
- package/dist/src/home-intelligence/generator.js +2 -2
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/imports/importService.js +1 -1
- 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 +3 -3
- 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 +2 -2
- package/dist/src/personal-agent/reply-composer.js +9 -9
- package/dist/src/personal-agent/request-delivery.js +2 -2
- package/dist/src/personal-agent/request-service.js +7 -7
- package/dist/src/personal-agent/result-reader.js +1 -1
- package/dist/src/personal-agent/service.js +2 -2
- package/dist/src/phone/model-adapter.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 +2 -2
- package/dist/src/projects/project-agent-suggestion.js +1 -1
- package/dist/src/projects/project-service.js +2 -2
- 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/runtime-tools/archive.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-proxy.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 +2 -2
- package/dist/src/tasks/home-query-service.js +1 -1
- package/dist/src/tasks/index.js +5 -5
- package/dist/src/tasks/task-allocation-service.js +5 -5
- package/dist/src/tasks/task-application-service.js +5 -5
- 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 +2 -2
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-handoff.js +4 -4
- 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 +3 -3
- package/dist/src/tasks/task-run-dispatcher.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +12 -12
- package/dist/src/tui/backends/gateway-realtime-backend.js +2 -2
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- 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 +3 -3
- 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/persona-context.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,8 +1,8 @@
|
|
|
1
1
|
import { withoutCloudCreditBudget } from "../providers/xopc-cloud-credit-budget.js";
|
|
2
2
|
import { withoutEmbeddedExecutionSession } from "./embedded/execution-context.js";
|
|
3
|
-
import { withoutSearchCache } from "./tools/search/cache.js";
|
|
4
|
-
import { withoutDataToolPermissions } from "./tools/dataBatch.js";
|
|
5
3
|
import { withoutDelegationScope } from "./orchestration/delegation-scope.js";
|
|
4
|
+
import { withoutDataToolPermissions } from "./tools/dataBatch.js";
|
|
5
|
+
import { withoutSearchCache } from "./tools/search/cache.js";
|
|
6
6
|
//#region src/agent/independent-execution.ts
|
|
7
7
|
/** Discard caller-owned execution scopes before resolving the target Agent. */
|
|
8
8
|
function runInIndependentAgentExecution(run) {
|
package/dist/src/agent/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { extractToolCallsFromAssistant, extractToolResultId, sanitizeToolCallId, sanitizeToolCallIdsForCloudCodeAssist } from "./transcript/tool-call-id.js";
|
|
2
|
-
import { makeMissingToolResult, repairToolUseResultPairing, sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolResultDetails } from "./transcript/session-transcript-repair.js";
|
|
3
1
|
import { resolveTranscriptPolicy } from "./transcript/transcript-policy.js";
|
|
4
2
|
import { dropThinkingBlocks } from "./transcript/thinking.js";
|
|
3
|
+
import { extractToolCallsFromAssistant, extractToolResultId, sanitizeToolCallId, sanitizeToolCallIdsForCloudCodeAssist } from "./transcript/tool-call-id.js";
|
|
4
|
+
import { makeMissingToolResult, repairToolUseResultPairing, sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolResultDetails } from "./transcript/session-transcript-repair.js";
|
|
5
5
|
import { applySessionTranscriptHygiene, applySessionTranscriptHygieneForPersistence, applySessionTranscriptHygieneWithPolicy, resolvePolicyForModel, tryApplySessionTranscriptHygiene, tryApplySessionTranscriptHygieneForPersistence } from "./transcript/transcript-hygiene.js";
|
|
6
|
-
import { AgentService } from "./service.js";
|
|
7
6
|
import { createResponseMessage, createSignalMessage, createTaskMessage, isValidIPCMessage } from "./ipc/types.js";
|
|
8
7
|
import { AgentInbox } from "./ipc/inbox.js";
|
|
9
8
|
import { AgentBus } from "./ipc/bus.js";
|
|
10
9
|
import { AgentSocketClient, AgentSocketServer, isSocketAvailable } from "./ipc/socket.js";
|
|
11
10
|
import "./ipc/index.js";
|
|
11
|
+
import { AgentService } from "./service.js";
|
|
12
12
|
import { stripToolMessages } from "./transcript/strip-tool-messages.js";
|
|
13
13
|
import "./transcript/index.js";
|
|
14
14
|
export { AgentBus, AgentInbox, AgentService, AgentSocketClient, AgentSocketServer, applySessionTranscriptHygiene, applySessionTranscriptHygieneForPersistence, applySessionTranscriptHygieneWithPolicy, createResponseMessage, createSignalMessage, createTaskMessage, dropThinkingBlocks, extractToolCallsFromAssistant, extractToolResultId, isSocketAvailable, isValidIPCMessage, makeMissingToolResult, repairToolUseResultPairing, resolvePolicyForModel, resolveTranscriptPolicy, sanitizeToolCallId, sanitizeToolCallIdsForCloudCodeAssist, sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolMessages, stripToolResultDetails, tryApplySessionTranscriptHygiene, tryApplySessionTranscriptHygieneForPersistence };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { McpServerSchema, init_schema } from "../../config/schema.js";
|
|
2
|
+
import { getWorkspacePath } from "../../config/workspace-path-helpers.js";
|
|
2
3
|
import { isManagedConnectorServer } from "../../connectors/materialize.js";
|
|
3
4
|
import { createNativeMcpCredentials } from "./credential-store.js";
|
|
4
5
|
import { loadMergedMcpConfig } from "./config.js";
|
|
5
6
|
import { discoverMcpTools } from "./tool-catalog.js";
|
|
6
|
-
import { getWorkspacePath } from "../../config/workspace-path-helpers.js";
|
|
7
7
|
import { cancelMcpAuthorization, getMcpAuthorization, probeMcpConnection, startMcpAuthorization, submitMcpRedirect } from "./connection-setup.js";
|
|
8
8
|
import { createHash, randomUUID } from "node:crypto";
|
|
9
9
|
//#region src/agent/mcp/connection-drafts.ts
|
|
@@ -8,8 +8,8 @@ import { retryAfter } from "./transport.js";
|
|
|
8
8
|
import { McpAuthenticationRequiredError, discoverMcpTools, signInNativeMcp } from "./tool-catalog.js";
|
|
9
9
|
import { classifyMcpConnectionError } from "./connection-errors.js";
|
|
10
10
|
import { createHash, randomUUID } from "node:crypto";
|
|
11
|
-
import { Agent } from "undici";
|
|
12
11
|
import { lookup } from "node:dns";
|
|
12
|
+
import { Agent } from "undici";
|
|
13
13
|
//#region src/agent/mcp/connection-setup.ts
|
|
14
14
|
init_logger();
|
|
15
15
|
const log = createLogger("McpConnectionSetup");
|
|
@@ -3,9 +3,9 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { getActiveConnectionWait, init_connection_wait_repository } from "../../storage/sqlite/connection-wait-repository.js";
|
|
4
4
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
5
5
|
import { init_session_repository } from "../../storage/sqlite/session-repository.js";
|
|
6
|
+
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
6
7
|
import { connectorPrincipalForSession } from "../../connectors/principal.js";
|
|
7
8
|
import { DurableState } from "../../storage/sqlite/durable-state.js";
|
|
8
|
-
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
9
9
|
import { connectorSecretProviderId } from "../../connectors/secret-store.js";
|
|
10
10
|
import { isManagedConnectorServer } from "../../connectors/materialize.js";
|
|
11
11
|
import { classifyMcpConnectionError } from "./connection-errors.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getSessionMetadata, init_session_read_repository } from "../../storage/sqlite/session-read-repository.js";
|
|
2
2
|
import { loadTranscriptRowsForSession } from "../../storage/sqlite/transcript-repository.js";
|
|
3
|
-
import { DurableState } from "../../storage/sqlite/durable-state.js";
|
|
4
3
|
import { checkUrlSafety } from "../tools/url-safety.js";
|
|
5
|
-
import {
|
|
4
|
+
import { DurableState } from "../../storage/sqlite/durable-state.js";
|
|
6
5
|
import { SearchProviderRegistry } from "../tools/search/registry.js";
|
|
7
6
|
import { resolveWebSearchConfig } from "../tools/search/resolve-config.js";
|
|
7
|
+
import { fetchPublicText } from "../tools/fetch-text.js";
|
|
8
8
|
import { extractReadableText } from "../tools/web.js";
|
|
9
9
|
import { connectionPlanSchema } from "./setup-plan.js";
|
|
10
10
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { checkUrlSafety } from "../tools/url-safety.js";
|
|
2
2
|
import { mcpStdioSupervisor } from "../../process/mcp-stdio-supervisor.js";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
|
-
import { Agent, fetch } from "undici";
|
|
5
4
|
import { lookup } from "node:dns";
|
|
5
|
+
import { Agent, fetch } from "undici";
|
|
6
6
|
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
7
7
|
import { StdioTransport, StreamableHttpTransport } from "@earendil-works/pi-mcp";
|
|
8
8
|
//#region src/agent/mcp/transport.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { buildUserContextBlock, sanitizeUserContextFenceEscapes } from "./context-fence.js";
|
|
2
1
|
import { isMemorySubsystemEnabled } from "./memory-config.js";
|
|
3
2
|
import { extractAgentUserPlainText } from "./user-message-text.js";
|
|
3
|
+
import { buildUserContextBlock, sanitizeUserContextFenceEscapes } from "./context-fence.js";
|
|
4
4
|
import { MemoryManager } from "./manager.js";
|
|
5
5
|
import { discoverMemoryPlugins } from "./plugin-discovery.js";
|
|
6
6
|
import { createMemoryManagerFromConfig } from "./create-memory-manager.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isTransientProviderErrorMessage } from "../../providers/model-response.js";
|
|
2
|
-
import { canResumeAfterModelFailure } from "./turn-recovery.js";
|
|
3
2
|
import { isContextOverflowError } from "./context-overflow.js";
|
|
3
|
+
import { canResumeAfterModelFailure } from "./turn-recovery.js";
|
|
4
4
|
//#region src/agent/orchestration/llm-turn-retry.ts
|
|
5
5
|
function isTransientLlmErrorMessage(message) {
|
|
6
6
|
return isTransientProviderErrorMessage(message);
|
|
@@ -2,8 +2,8 @@ import { isXopcDatabaseOpen } from "../../storage/sqlite/connection.js";
|
|
|
2
2
|
import { TaskRepository, init_task_repository } from "../../tasks/task-repository.js";
|
|
3
3
|
import { getSessionConfig } from "../../storage/sqlite/config-repository.js";
|
|
4
4
|
import "../../storage/sqlite/index.js";
|
|
5
|
-
import { resolveTaskLocale } from "../../tasks/task-language.js";
|
|
6
5
|
import { init_response_language, resolveResponseLanguage } from "../../i18n/response-language.js";
|
|
6
|
+
import { resolveTaskLocale } from "../../tasks/task-language.js";
|
|
7
7
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
8
8
|
//#region src/agent/prompt/response-language.ts
|
|
9
9
|
init_response_language();
|
|
@@ -6,14 +6,14 @@ import { getInteractionState } from "../../storage/sqlite/interaction-state-repo
|
|
|
6
6
|
import { DEFAULT_USER_TRUST_LEVEL } from "../../user-context/trust-policy.js";
|
|
7
7
|
import { getUserTrustPolicy } from "../../storage/sqlite/user-trust-repository.js";
|
|
8
8
|
import "../../storage/sqlite/index.js";
|
|
9
|
+
import { appendStablePromptSection } from "./cache-boundary.js";
|
|
9
10
|
import { getUserTimezone } from "../../user-model/repository.js";
|
|
10
11
|
import "../../user-model/index.js";
|
|
11
|
-
import { appendStablePromptSection } from "./cache-boundary.js";
|
|
12
|
-
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
13
|
-
import { buildTtsSystemPromptHint } from "../../voice/tts/directives.js";
|
|
14
12
|
import { resolveResponseLanguageForSession } from "./response-language.js";
|
|
15
13
|
import { resolveSystemPromptBuildParams } from "./system-prompt-params.js";
|
|
16
14
|
import { buildSystemPrompt } from "./system-prompt.js";
|
|
15
|
+
import { buildTtsSystemPromptHint } from "../../voice/tts/directives.js";
|
|
16
|
+
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
17
17
|
import { getConversationalConfigurationGuide } from "./conversational-configuration-guide.js";
|
|
18
18
|
//#region src/agent/prompt/service-prompt-builder.ts
|
|
19
19
|
init_logger();
|
|
@@ -2,8 +2,8 @@ import { PACKAGE_VERSION, init_package_version } from "../../package-version.js"
|
|
|
2
2
|
import { getConversationRouting } from "../../storage/sqlite/conversation-repository.js";
|
|
3
3
|
import { isCronConversationId, isSubagentConversationId } from "../../routing/agent-session-key.js";
|
|
4
4
|
import { init_session_key } from "../../routing/session-key.js";
|
|
5
|
-
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
6
5
|
import { normalizePromptSection } from "./cache-boundary.js";
|
|
6
|
+
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
7
7
|
import { listChannelPlugins } from "../../channels/plugins/registry.js";
|
|
8
8
|
//#region src/agent/prompt/system-prompt-params.ts
|
|
9
9
|
init_package_version();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { prepareSafeToolEnv } from "./sanitize-env-vars.js";
|
|
4
3
|
import { validatePath, validateWritePath } from "./path-policy.js";
|
|
4
|
+
import { prepareSafeToolEnv } from "./sanitize-env-vars.js";
|
|
5
5
|
import { auditCommand, validateCommand } from "./command-validator.js";
|
|
6
6
|
import { DEFAULT_SANDBOX_CONFIG } from "./types.js";
|
|
7
7
|
import { resolve } from "node:path";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { getConnectionResumeInput, init_connection_wait_repository } from "../../storage/sqlite/connection-wait-repository.js";
|
|
2
2
|
import { getClarificationResumeInput } from "../../storage/sqlite/clarification-wait-repository.js";
|
|
3
3
|
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
4
|
-
import { parseSlashCommand } from "../../chat-commands/command-parse.js";
|
|
5
|
-
import { personalCommandRejection } from "../../chat-commands/personal-command-policy.js";
|
|
6
|
-
import { commandRegistry } from "../../chat-commands/registry.js";
|
|
7
|
-
import "../../chat-commands/index.js";
|
|
8
4
|
import { phoneResumeForRun } from "../../phone/assistance.js";
|
|
5
|
+
import { buildDelegatedTaskDirective, buildTaskExecutionDirective } from "../../tasks/task-context-assembler.js";
|
|
6
|
+
import { getMcpSetupResumeInput } from "../mcp/continuation-input.js";
|
|
9
7
|
import { resolveImageHandlingStrategy } from "../image/vision-detection.js";
|
|
10
8
|
import { hydrateUserTurnForLlm } from "../inbound/attachment-pipeline.js";
|
|
11
9
|
import { shouldSkipResetOverlapCommand } from "../../session/reset-triggers.js";
|
|
12
|
-
import {
|
|
10
|
+
import { parseSlashCommand } from "../../chat-commands/command-parse.js";
|
|
11
|
+
import { personalCommandRejection } from "../../chat-commands/personal-command-policy.js";
|
|
12
|
+
import { commandRegistry } from "../../chat-commands/registry.js";
|
|
13
|
+
import "../../chat-commands/index.js";
|
|
13
14
|
import { getTaskContinuation } from "../../tasks/task-continuation.js";
|
|
14
15
|
import { runEmbeddedTurnForSession } from "../embedded/run-for-session.js";
|
|
15
16
|
import { injectSourceContextsIntoUserMessage } from "../source-context/injector.js";
|
|
16
|
-
import { buildDelegatedTaskDirective, buildTaskExecutionDirective } from "../../tasks/task-context-assembler.js";
|
|
17
17
|
import crypto from "node:crypto";
|
|
18
18
|
//#region src/agent/service/direct-turn-helpers.ts
|
|
19
19
|
/**
|
|
@@ -5,23 +5,23 @@ import { getConnectionResumeInput, init_connection_wait_repository } from "../..
|
|
|
5
5
|
import { readAgentMessageContent } from "../memory/agent-message-access.js";
|
|
6
6
|
import { getClarificationResumeInput } from "../../storage/sqlite/clarification-wait-repository.js";
|
|
7
7
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
8
|
-
import { init_agent_session_key, resolveAgentMainConversationId } from "../../routing/agent-session-key.js";
|
|
9
|
-
import { isSessionSourceBinding, summarizeSourceContext } from "../source-context/types.js";
|
|
10
8
|
import { init_model_usage, modelUsageOriginFromTurn, withModelUsageOrigin } from "../../providers/model-usage.js";
|
|
11
|
-
import {
|
|
9
|
+
import { init_agent_session_key, resolveAgentMainConversationId } from "../../routing/agent-session-key.js";
|
|
10
|
+
import { phoneResumeForRun } from "../../phone/assistance.js";
|
|
12
11
|
import { mergeSttConfigFromAppConfig } from "../../voice/stt/config.js";
|
|
13
12
|
import "../../voice/stt/index.js";
|
|
13
|
+
import { isSessionSourceBinding, summarizeSourceContext } from "../source-context/types.js";
|
|
14
|
+
import { getMcpSetupResumeInput } from "../mcp/continuation-input.js";
|
|
14
15
|
import { abortEmbeddedRun } from "../embedded/runs.js";
|
|
15
|
-
import { phoneResumeForRun } from "../../phone/assistance.js";
|
|
16
16
|
import { clearPendingTranscriptUserMessage, setPendingTranscriptUserMessage } from "../inbound/attachment-pipeline.js";
|
|
17
|
+
import { formatAgentRunErrorForClient } from "../client-error-format.js";
|
|
17
18
|
import { resolveConfiguredActivityDetailDefault, resolveEffectiveReasoningLevel } from "../../session/thinking-resolve.js";
|
|
18
19
|
import { initSessionTurn } from "../../session/init-session-turn.js";
|
|
19
20
|
import "../../session/index.js";
|
|
20
|
-
import { getMcpSetupResumeInput } from "../mcp/continuation-input.js";
|
|
21
21
|
import { getTaskContinuation } from "../../tasks/task-continuation.js";
|
|
22
|
+
import { stripEnvelopeTimestampPrefix } from "../../channels/envelope-timestamp.js";
|
|
22
23
|
import { isVoiceLikeAttachment, mergeVoiceTranscriptsIntoUserText, requestsOriginalVoiceInspection } from "../../channels/attachments/voice-stt-webchat.js";
|
|
23
24
|
import { applyReasoningVisibility } from "../streaming/reasoning-visibility.js";
|
|
24
|
-
import { formatAgentRunErrorForClient } from "../client-error-format.js";
|
|
25
25
|
import { injectSourceContextsIntoUserMessage } from "../source-context/injector.js";
|
|
26
26
|
import { AsyncQueue, AsyncQueueOverflowError } from "./async-queue.js";
|
|
27
27
|
import { hydratePerTurnState, runDirectAgentTurn, tryRunSlashCommand } from "./direct-turn-helpers.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { appendMediaToAssistantTranscriptEntry, findLatestAssistantTranscriptEntryId } from "../../storage/sqlite/transcript-repository.js";
|
|
2
2
|
import "../../storage/sqlite/index.js";
|
|
3
3
|
import { isTTSAvailable } from "../../voice/tts/factory.js";
|
|
4
|
+
import { speak } from "../../voice/tts/speak-core.js";
|
|
4
5
|
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
5
6
|
import { getChannelOutputFormat, shouldUseTTS } from "../../voice/tts/service.js";
|
|
6
|
-
import { speak } from "../../voice/tts/speak-core.js";
|
|
7
7
|
import { compressAudio } from "../../voice/tts/audio.js";
|
|
8
|
-
import "../../voice/tts/index.js";
|
|
9
8
|
import { persistOutboundTtsAudio } from "../../channels/attachments/outbound-tts-persist.js";
|
|
9
|
+
import "../../voice/tts/index.js";
|
|
10
10
|
import { deleteMediaUris } from "../../media/session-references.js";
|
|
11
11
|
//#region src/agent/service/webchat-tts.ts
|
|
12
12
|
/** True when the explicit TTS tool already produced durable Webchat audio. */
|
|
@@ -2,39 +2,44 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { parseNoteAttachmentTarget } from "../notes/attachment-ref.js";
|
|
4
4
|
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
5
|
-
import { extractTextContent } from "./context/workspace.js";
|
|
6
|
-
import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
7
|
-
import { getUserTimezone } from "../user-model/repository.js";
|
|
8
|
-
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
9
|
-
import "../user-model/index.js";
|
|
10
|
-
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "./skills/workspace-skills-dir.js";
|
|
11
5
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
12
|
-
import {
|
|
13
|
-
import { installSkillFromZip } from "./skills/managed-store.js";
|
|
14
|
-
import { pullSkillFromSource } from "./skills/hub-pull.js";
|
|
6
|
+
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
15
7
|
import { extractProfileAgentId, resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
16
|
-
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
17
|
-
import { getProjectForSession } from "../projects/workspace.js";
|
|
18
8
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
19
9
|
import { configureTracing, flushTracing } from "../observability/runtime.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
10
|
+
import { getUserTimezone } from "../user-model/repository.js";
|
|
11
|
+
import { extractTextContent } from "./context/workspace.js";
|
|
12
|
+
import { resolveAgentTurnTimeoutMs } from "./orchestration/run-agent-turn-with-timeout.js";
|
|
22
13
|
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
23
|
-
import {
|
|
24
|
-
import "../
|
|
14
|
+
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
15
|
+
import { getProjectForSession } from "../projects/workspace.js";
|
|
16
|
+
import "../user-model/index.js";
|
|
17
|
+
import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
18
|
+
import { runWithEmbeddedExecutionSession } from "./embedded/execution-context.js";
|
|
19
|
+
import { removeSkillsLockEntry } from "./skills/hub-lock.js";
|
|
20
|
+
import { installSkillFromZip } from "./skills/managed-store.js";
|
|
21
|
+
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "./skills/workspace-skills-dir.js";
|
|
22
|
+
import { pullSkillFromSource } from "./skills/hub-pull.js";
|
|
25
23
|
import { resolveResponseLanguageForSession } from "./prompt/response-language.js";
|
|
26
|
-
import { MAX_WEBCHAT_ATTACHMENT_FILE_BYTES } from "../gateway/chat-limits.js";
|
|
27
24
|
import { persistInboundAttachments } from "../channels/attachments/inbound-persist.js";
|
|
28
25
|
import { buildTranscriptUserMessage, hydrateUserTurnForLlm } from "./inbound/attachment-pipeline.js";
|
|
29
26
|
import { drainEmbeddedSessionRunnerShutdowns } from "./embedded/session-runner.js";
|
|
30
|
-
import { maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle } from "../session/session-title.js";
|
|
31
27
|
import { resolveCompactionPolicy } from "./memory/compaction-policy.js";
|
|
28
|
+
import { getModelThinking } from "../providers/model-thinking.js";
|
|
29
|
+
import { runXopcEmbeddedTurn } from "./embedded/run-turn.js";
|
|
30
|
+
import { normalizeSkillInstallTarget } from "./skills/install-target.js";
|
|
31
|
+
import { AgentManager } from "./agent-manager.js";
|
|
32
|
+
import { MAX_WEBCHAT_ATTACHMENT_FILE_BYTES } from "../gateway/chat-limits.js";
|
|
33
|
+
import { maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle } from "../session/session-title.js";
|
|
32
34
|
import { SessionStore } from "../session/store.js";
|
|
33
35
|
import { SessionConfigStore } from "../session/config-store.js";
|
|
34
36
|
import "../session/index.js";
|
|
37
|
+
import { ExtensionHookRunner } from "../extensions/hooks.js";
|
|
38
|
+
import "../extensions/index.js";
|
|
35
39
|
import { SessionTracker } from "./session/tracker.js";
|
|
36
40
|
import { ModelManager } from "./models/manager.js";
|
|
37
41
|
import "./models/index.js";
|
|
42
|
+
import { initializeCommands } from "../chat-commands/index.js";
|
|
38
43
|
import { HookHandler } from "./lifecycle/hook-handler.js";
|
|
39
44
|
import { ToolErrorTracker } from "./tools/error-tracker.js";
|
|
40
45
|
import { RequestLimiter } from "./models/request-limiter.js";
|
|
@@ -46,9 +51,6 @@ import { ContextMiddleware } from "./middleware/context.js";
|
|
|
46
51
|
import "./middleware/index.js";
|
|
47
52
|
import { LifecycleManager } from "./lifecycle/manager.js";
|
|
48
53
|
import "./lifecycle/index.js";
|
|
49
|
-
import { resolveAgentTurnTimeoutMs } from "./orchestration/run-agent-turn-with-timeout.js";
|
|
50
|
-
import { getModelThinking } from "../providers/model-thinking.js";
|
|
51
|
-
import { runXopcEmbeddedTurn } from "./embedded/run-turn.js";
|
|
52
54
|
import { MessageRouter } from "./messaging/message-router.js";
|
|
53
55
|
import { CommandHandler } from "./messaging/command-handler.js";
|
|
54
56
|
import { StreamManager } from "./messaging/stream-manager.js";
|
|
@@ -66,8 +68,6 @@ import "./session/index.js";
|
|
|
66
68
|
import { AgentOrchestrator } from "./orchestration/agent-orchestrator.js";
|
|
67
69
|
import { AgentEventHandler } from "./orchestration/agent-event-handler.js";
|
|
68
70
|
import "./orchestration/index.js";
|
|
69
|
-
import { normalizeSkillInstallTarget } from "./skills/install-target.js";
|
|
70
|
-
import { AgentManager } from "./agent-manager.js";
|
|
71
71
|
import { TaskJudgeService } from "./tasks/task-judge-service.js";
|
|
72
72
|
import { analyzeResponseLanguage } from "../i18n/language-consistency.js";
|
|
73
73
|
import { readFile } from "node:fs/promises";
|
|
@@ -2,14 +2,14 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { chooseModelThinking } from "../../../packages/gateway-contract/src/model-selection.js";
|
|
4
4
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
5
|
-
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
6
5
|
import { ResponseLanguageSchema, init_response_language } from "../../i18n/response-language.js";
|
|
7
6
|
import { resolveEffectiveAgentConfigForSession } from "../../config/agent-profile.js";
|
|
8
7
|
import { normalizeWorkingDirectoryInput } from "../../session/session-workspace.js";
|
|
9
8
|
import { getProjectWorkspacePathForSession } from "../../projects/workspace.js";
|
|
9
|
+
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
10
|
+
import { getModelThinking } from "../../providers/model-thinking.js";
|
|
10
11
|
import { normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel } from "../transcript/thinking-types.js";
|
|
11
12
|
import "../../session/index.js";
|
|
12
|
-
import { getModelThinking } from "../../providers/model-thinking.js";
|
|
13
13
|
import { mkdir } from "node:fs/promises";
|
|
14
14
|
//#region src/agent/session/session-config-service.ts
|
|
15
15
|
init_src();
|
|
@@ -3,9 +3,9 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { getExecutionEnvironmentForSession } from "../../execution-environments/subject.js";
|
|
4
4
|
import { effectiveWorkspacePathForSession, normalizeWorkingDirectoryInput, projectWorkspacePath } from "../../session/session-workspace.js";
|
|
5
5
|
import { getProjectForSession } from "../../projects/workspace.js";
|
|
6
|
+
import { getModelThinking } from "../../providers/model-thinking.js";
|
|
6
7
|
import { resolveEffectiveThinkingLevel } from "../../session/thinking-resolve.js";
|
|
7
8
|
import "../../session/index.js";
|
|
8
|
-
import { getModelThinking } from "../../providers/model-thinking.js";
|
|
9
9
|
import { mkdir, stat } from "node:fs/promises";
|
|
10
10
|
//#region src/agent/session/session-hydrator.ts
|
|
11
11
|
/**
|
|
@@ -2,10 +2,10 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_workspace_defaults, resolveDefaultAgentWorkspaceDir } from "../../config/workspace-defaults.js";
|
|
4
4
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
|
+
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
5
6
|
import { getExecutionEnvironmentForSession } from "../../execution-environments/subject.js";
|
|
6
7
|
import { effectiveWorkspacePathForSession, projectWorkspacePath } from "../../session/session-workspace.js";
|
|
7
8
|
import { getProjectForSession } from "../../projects/workspace.js";
|
|
8
|
-
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
9
9
|
import { resolveCompactionPolicy } from "../memory/compaction-policy.js";
|
|
10
10
|
import { resolveVerboseLevel } from "../../session/config-store.js";
|
|
11
11
|
import { resolveConfiguredActivityDetailDefault, resolveEffectiveReasoningLevel, resolveEffectiveThinkingLevel } from "../../session/thinking-resolve.js";
|
|
@@ -2,10 +2,10 @@ import { resolveStateDir } from "../../config/paths-state.js";
|
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
4
|
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
5
|
+
import { isManagedSkillTransientDirName } from "./managed-store.js";
|
|
5
6
|
import { createSkillConfigManager } from "./config.js";
|
|
6
7
|
import { resolveWorkspaceSkillsDir } from "./workspace-skills-dir.js";
|
|
7
8
|
import { resolveAgentsSkillsDir, resolveWorkspaceAgentsSkillsDir } from "./skill-sources.js";
|
|
8
|
-
import { isManagedSkillTransientDirName } from "./managed-store.js";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import chokidar from "chokidar";
|
|
11
11
|
//#region src/agent/skills/filesystem-watcher.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
//#region src/agent/skills/hub-lock.ts
|
|
5
5
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
2
|
-
import { formatScanSummary, scanSkillDirectory } from "./scanner.js";
|
|
3
|
-
import { computeSkillTreeHashSync } from "./hub-hash.js";
|
|
4
2
|
import { getSkillsLockEntry, recordSkillsHubInstall } from "./hub-lock.js";
|
|
5
3
|
import { installSkillFromZip, isIgnorableZipEntry, isValidSkillId, prepareManagedSkillTempDir, promoteManagedSkillTempDir } from "./managed-store.js";
|
|
4
|
+
import { formatScanSummary, scanSkillDirectory } from "./scanner.js";
|
|
5
|
+
import { computeSkillTreeHashSync } from "./hub-hash.js";
|
|
6
6
|
import { tmpdir } from "node:os";
|
|
7
7
|
import { basename, dirname, join, normalize, resolve, sep } from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
|
-
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
5
4
|
import { init_paths } from "../../config/paths.js";
|
|
5
|
+
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
6
6
|
import { findInstallSpec, hasBinary, installSkill } from "./installer.js";
|
|
7
7
|
import { applySkillEnvOverrides, createSkillConfigManager, getSkillEnvironment, isSkillEnabled, resolveSkillConfig, validateSkillConfig } from "./config.js";
|
|
8
8
|
import { parseSkillToolConditions } from "./skill-tool-gating.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
2
1
|
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
2
|
+
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
3
3
|
import { loadSkillsLock } from "./hub-lock.js";
|
|
4
4
|
import { dirname, join, resolve, sep } from "node:path";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { downloadSkillZipBuffer, fetchMarketplacePackageDetail, listSkillCategories, listSkillPackages, resolveSkillZipDownloadUrl, resolveSkillsStoreBaseUrl, skillIdForMarketplaceInstall, verifyStoreArtifactSha256 } from "./store-api-client.js";
|
|
1
2
|
import { registerMarketplaceAdapter } from "../../registry.js";
|
|
2
3
|
import { buildSkillMarkdownPreviewFromRaw } from "../../../skill-markdown-preview-from-raw.js";
|
|
3
|
-
import { downloadSkillZipBuffer, fetchMarketplacePackageDetail, listSkillCategories, listSkillPackages, resolveSkillZipDownloadUrl, resolveSkillsStoreBaseUrl, skillIdForMarketplaceInstall, verifyStoreArtifactSha256 } from "./store-api-client.js";
|
|
4
4
|
//#region src/agent/skills/marketplace/adapters/store/adapter.ts
|
|
5
5
|
const storeMarketplaceAdapter = {
|
|
6
6
|
id: "store",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MAX_SKILL_ZIP_BYTES, isValidSkillId } from "../../../managed-store.js";
|
|
2
1
|
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../../../../platform/resolution.js";
|
|
3
2
|
import { MAX_EXTENSION_STORE_ZIP_BYTES } from "../../../../../extensions/store-zip-limits.js";
|
|
3
|
+
import { MAX_SKILL_ZIP_BYTES, isValidSkillId } from "../../../managed-store.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
//#region src/agent/skills/marketplace/adapters/store/store-api-client.ts
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
2
1
|
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
2
|
+
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
3
3
|
import { resolveWorkspaceSkillsDir } from "./workspace-skills-dir.js";
|
|
4
4
|
import { formatScanSummary, scanSkillDirectory } from "./scanner.js";
|
|
5
5
|
import { fuzzyFindText, normalizeForFuzzyMatch, normalizeToLF, restoreLineEndings } from "../tools/edit-diff.js";
|
|
@@ -2,9 +2,9 @@ import { resolveStateDir } from "../../config/paths-state.js";
|
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
4
|
import { init_paths, resolveBundledSkillsDir } from "../../config/paths.js";
|
|
5
|
+
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
5
6
|
import { createSkillConfigManager, isSkillEnabled } from "./config.js";
|
|
6
7
|
import { formatSkillsForPrompt, selectSkillsVisibleInPrompt } from "./format-skills-prompt.js";
|
|
7
|
-
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
8
8
|
import { createSkillLoader } from "./index.js";
|
|
9
9
|
//#region src/agent/skills/skill-manager.ts
|
|
10
10
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
2
|
-
import { resolveWorkspaceSkillsDir } from "./workspace-skills-dir.js";
|
|
3
2
|
import { resolvePluginCapabilityAccess } from "../../extensions/agent-plugins/capability-access.js";
|
|
4
3
|
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
4
|
+
import { resolveWorkspaceSkillsDir } from "./workspace-skills-dir.js";
|
|
5
5
|
import { homedir } from "node:os";
|
|
6
6
|
import { isAbsolute, join, relative, resolve } from "node:path";
|
|
7
7
|
import { existsSync, realpathSync } from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isSessionSourceBinding, isTurnContextRef, parseTurnContextRefs, summarizeSourceContext } from "./types.js";
|
|
2
2
|
import { buildUserAssertionAgentContext } from "./user-assertion-context.js";
|
|
3
|
+
import { injectSourceContextsIntoUserMessage } from "./injector.js";
|
|
3
4
|
import { buildFileAgentContext } from "./file-context.js";
|
|
4
5
|
import { buildSessionAgentContext } from "./session-context.js";
|
|
5
6
|
import { buildBrowserTabAgentContext } from "./browser-tab.js";
|
|
6
|
-
import { injectSourceContextsIntoUserMessage } from "./injector.js";
|
|
7
7
|
export { buildBrowserTabAgentContext, buildFileAgentContext, buildSessionAgentContext, buildUserAssertionAgentContext, injectSourceContextsIntoUserMessage, isSessionSourceBinding, isTurnContextRef, parseTurnContextRefs, summarizeSourceContext };
|
|
@@ -2,19 +2,19 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { TaskRepository, init_task_repository } from "../../tasks/task-repository.js";
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "../../tasks/task-run-repository.js";
|
|
5
|
-
import { resolveTaskLocale } from "../../tasks/task-language.js";
|
|
6
5
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
7
6
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
8
|
-
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
9
|
-
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
10
|
-
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
11
7
|
import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
|
|
12
|
-
import { extractAssistantText, getAssistantMessageErrorReason, isTransientProviderErrorMessage, stripCodeFences } from "../../providers/model-response.js";
|
|
13
8
|
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
14
|
-
import {
|
|
15
|
-
import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
|
|
16
|
-
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
9
|
+
import { extractAssistantText, getAssistantMessageErrorReason, isTransientProviderErrorMessage, stripCodeFences } from "../../providers/model-response.js";
|
|
17
10
|
import { canResumeAfterModelFailure } from "../orchestration/turn-recovery.js";
|
|
11
|
+
import { resolveTaskLocale } from "../../tasks/task-language.js";
|
|
12
|
+
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
13
|
+
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
14
|
+
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
15
|
+
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
16
|
+
import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
|
|
17
|
+
import { currentTaskResearchResult } from "../../tasks/task-research-result.js";
|
|
18
18
|
import { buildResponseLanguageSection } from "../prompt/sections/response-language.js";
|
|
19
19
|
//#region src/agent/tasks/task-judge-service.ts
|
|
20
20
|
init_schema();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { resolveReverseProxyPublicUrl } from "../../gateway/public-url.js";
|
|
4
|
-
import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
5
|
-
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
6
4
|
import { assertWorkspaceTreeReadable, checkedFilePath } from "../sandbox/fileAccess.js";
|
|
5
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
6
|
+
import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
7
7
|
import { resolveShareConfig } from "../../share/share-config.js";
|
|
8
8
|
import { mergeWithDefaults } from "../../share/site-share-config.js";
|
|
9
9
|
import { getShareStore } from "../../share/share-store.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { researchResumeContext } from "../orchestration/research-checkpoint.js";
|
|
2
2
|
import { claimResearchCheckpoint, createResearchCheckpoint, finishResearchCheckpoint, getResearchCheckpoint, recordResearchEvidence, recordResearchSearch, saveResearchCheckpoint } from "../../storage/sqlite/research-checkpoint-repository.js";
|
|
3
3
|
import { resolveAgentAbortReason } from "../orchestration/run-termination.js";
|
|
4
|
-
import { runGit } from "../../execution-environments/git.js";
|
|
5
|
-
import { LocalWorktreeManager } from "../../execution-environments/local-worktree-manager.js";
|
|
6
|
-
import { SessionEnvironmentService } from "../../execution-environments/session-environment-service.js";
|
|
7
4
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
8
5
|
import { EXTERNAL_TOOL_NAMES } from "../external-tools/gateway-tools.js";
|
|
9
6
|
import "../external-tools/index.js";
|
|
10
7
|
import { getDelegationScope } from "../orchestration/delegation-scope.js";
|
|
11
8
|
import { DELEGATION_BUDGETS } from "../orchestration/delegation-budget.js";
|
|
12
9
|
import { createDelegateChildHandle } from "../child-agent-factory.js";
|
|
10
|
+
import { runGit } from "../../execution-environments/git.js";
|
|
11
|
+
import { LocalWorktreeManager } from "../../execution-environments/local-worktree-manager.js";
|
|
12
|
+
import { SessionEnvironmentService } from "../../execution-environments/session-environment-service.js";
|
|
13
13
|
import { DELEGATION_CAPABILITIES, DELEGATION_TOOL_CAPABILITIES, protectDelegatedTool, resolveDelegationTools } from "./delegation-policy.js";
|
|
14
14
|
import { resolve } from "node:path";
|
|
15
15
|
import { Type } from "@sinclair/typebox";
|
|
@@ -2,9 +2,9 @@ import { runProcess } from "../../process/run-process.js";
|
|
|
2
2
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
3
3
|
import { commandRegistry, commandTimeout } from "../commands/command-registry.js";
|
|
4
4
|
import { evaluateExecPolicy } from "../sandbox/exec-policy.js";
|
|
5
|
-
import { classifyVerificationCommand } from "../coding/verification-command.js";
|
|
6
5
|
import { formatSize, truncateTail } from "./truncate.js";
|
|
7
6
|
import { publishArtifactPaths } from "./publish-artifacts.js";
|
|
7
|
+
import { classifyVerificationCommand } from "../coding/verification-command.js";
|
|
8
8
|
import { resolve } from "node:path";
|
|
9
9
|
import { Type } from "@sinclair/typebox";
|
|
10
10
|
//#region src/agent/tools/exec-command.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { withRetry } from "../../infra/retry.js";
|
|
4
3
|
import { commandTimeout } from "../commands/command-registry.js";
|
|
5
4
|
import { DEFAULT_TOOL_EXECUTION_TIMEOUT_MS, TimeoutError, executeWithTimeout } from "../lifecycle/timeout-wrapper.js";
|
|
5
|
+
import { withRetry } from "../../infra/retry.js";
|
|
6
6
|
import { ToolConcurrencyController, resolveToolLockMode } from "./concurrency.js";
|
|
7
7
|
//#region src/agent/tools/executor.ts
|
|
8
8
|
init_logger();
|