dsh-tavern-bundle 0.1.0
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/LICENSE +21 -0
- package/README.md +216 -0
- package/cordis.patch.yml +14 -0
- package/lib/adapters/model-gateway.d.ts +4 -0
- package/lib/adapters/model-gateway.d.ts.map +1 -0
- package/lib/adapters/model-gateway.js +3 -0
- package/lib/adapters/model-gateway.js.map +1 -0
- package/lib/adapters/prestep-spike.d.ts +16 -0
- package/lib/adapters/prestep-spike.d.ts.map +1 -0
- package/lib/adapters/prestep-spike.js +114 -0
- package/lib/adapters/prestep-spike.js.map +1 -0
- package/lib/adapters/runtime-probe.d.ts +67 -0
- package/lib/adapters/runtime-probe.d.ts.map +1 -0
- package/lib/adapters/runtime-probe.js +106 -0
- package/lib/adapters/runtime-probe.js.map +1 -0
- package/lib/adapters/session-agent-provider.d.ts +3 -0
- package/lib/adapters/session-agent-provider.d.ts.map +1 -0
- package/lib/adapters/session-agent-provider.js +3 -0
- package/lib/adapters/session-agent-provider.js.map +1 -0
- package/lib/adapters/subagent-gateway.d.ts +3 -0
- package/lib/adapters/subagent-gateway.d.ts.map +1 -0
- package/lib/adapters/subagent-gateway.js +3 -0
- package/lib/adapters/subagent-gateway.js.map +1 -0
- package/lib/application/chat/chat-application-service.d.ts +94 -0
- package/lib/application/chat/chat-application-service.d.ts.map +1 -0
- package/lib/application/chat/chat-application-service.js +291 -0
- package/lib/application/chat/chat-application-service.js.map +1 -0
- package/lib/application/companion/agent-orchestrator.d.ts +91 -0
- package/lib/application/companion/agent-orchestrator.d.ts.map +1 -0
- package/lib/application/companion/agent-orchestrator.js +298 -0
- package/lib/application/companion/agent-orchestrator.js.map +1 -0
- package/lib/application/companion/companion-child-service.d.ts +47 -0
- package/lib/application/companion/companion-child-service.d.ts.map +1 -0
- package/lib/application/companion/companion-child-service.js +30 -0
- package/lib/application/companion/companion-child-service.js.map +1 -0
- package/lib/application/companion/companion-invocation-service.d.ts +42 -0
- package/lib/application/companion/companion-invocation-service.d.ts.map +1 -0
- package/lib/application/companion/companion-invocation-service.js +50 -0
- package/lib/application/companion/companion-invocation-service.js.map +1 -0
- package/lib/application/companion/companion-profile-service.d.ts +32 -0
- package/lib/application/companion/companion-profile-service.d.ts.map +1 -0
- package/lib/application/companion/companion-profile-service.js +112 -0
- package/lib/application/companion/companion-profile-service.js.map +1 -0
- package/lib/application/companion/companion-promotion-service.d.ts +69 -0
- package/lib/application/companion/companion-promotion-service.d.ts.map +1 -0
- package/lib/application/companion/companion-promotion-service.js +129 -0
- package/lib/application/companion/companion-promotion-service.js.map +1 -0
- package/lib/application/group-chat/group-chat-execution-service.d.ts +22 -0
- package/lib/application/group-chat/group-chat-execution-service.d.ts.map +1 -0
- package/lib/application/group-chat/group-chat-execution-service.js +110 -0
- package/lib/application/group-chat/group-chat-execution-service.js.map +1 -0
- package/lib/application/group-chat/group-chat-orchestrator.d.ts +51 -0
- package/lib/application/group-chat/group-chat-orchestrator.d.ts.map +1 -0
- package/lib/application/group-chat/group-chat-orchestrator.js +57 -0
- package/lib/application/group-chat/group-chat-orchestrator.js.map +1 -0
- package/lib/application/memory/memory-retriever.d.ts +37 -0
- package/lib/application/memory/memory-retriever.d.ts.map +1 -0
- package/lib/application/memory/memory-retriever.js +91 -0
- package/lib/application/memory/memory-retriever.js.map +1 -0
- package/lib/application/memory/memory-service.d.ts +128 -0
- package/lib/application/memory/memory-service.d.ts.map +1 -0
- package/lib/application/memory/memory-service.js +346 -0
- package/lib/application/memory/memory-service.js.map +1 -0
- package/lib/application/ports/companion-runtime-port.d.ts +72 -0
- package/lib/application/ports/companion-runtime-port.d.ts.map +1 -0
- package/lib/application/ports/companion-runtime-port.js +2 -0
- package/lib/application/ports/companion-runtime-port.js.map +1 -0
- package/lib/application/ports/llm-port.d.ts +7 -0
- package/lib/application/ports/llm-port.d.ts.map +1 -0
- package/lib/application/ports/llm-port.js +2 -0
- package/lib/application/ports/llm-port.js.map +1 -0
- package/lib/application/ports/message-source.d.ts +4 -0
- package/lib/application/ports/message-source.d.ts.map +1 -0
- package/lib/application/ports/message-source.js +5 -0
- package/lib/application/ports/message-source.js.map +1 -0
- package/lib/application/ports/session-context-port.d.ts +13 -0
- package/lib/application/ports/session-context-port.d.ts.map +1 -0
- package/lib/application/ports/session-context-port.js +2 -0
- package/lib/application/ports/session-context-port.js.map +1 -0
- package/lib/application/ports/subagent-port.d.ts +31 -0
- package/lib/application/ports/subagent-port.d.ts.map +1 -0
- package/lib/application/ports/subagent-port.js +2 -0
- package/lib/application/ports/subagent-port.js.map +1 -0
- package/lib/application/ports/user-resolver-port.d.ts +5 -0
- package/lib/application/ports/user-resolver-port.d.ts.map +1 -0
- package/lib/application/ports/user-resolver-port.js +2 -0
- package/lib/application/ports/user-resolver-port.js.map +1 -0
- package/lib/application/relationship/relationship-event-service.d.ts +31 -0
- package/lib/application/relationship/relationship-event-service.d.ts.map +1 -0
- package/lib/application/relationship/relationship-event-service.js +43 -0
- package/lib/application/relationship/relationship-event-service.js.map +1 -0
- package/lib/application/relationship/relationship-policy.d.ts +20 -0
- package/lib/application/relationship/relationship-policy.d.ts.map +1 -0
- package/lib/application/relationship/relationship-policy.js +24 -0
- package/lib/application/relationship/relationship-policy.js.map +1 -0
- package/lib/application/relationship/relationship-projection.d.ts +14 -0
- package/lib/application/relationship/relationship-projection.d.ts.map +1 -0
- package/lib/application/relationship/relationship-projection.js +25 -0
- package/lib/application/relationship/relationship-projection.js.map +1 -0
- package/lib/application/relationship/relationship-service.d.ts +95 -0
- package/lib/application/relationship/relationship-service.d.ts.map +1 -0
- package/lib/application/relationship/relationship-service.js +254 -0
- package/lib/application/relationship/relationship-service.js.map +1 -0
- package/lib/application/workspace/workspace-service.d.ts +106 -0
- package/lib/application/workspace/workspace-service.d.ts.map +1 -0
- package/lib/application/workspace/workspace-service.js +44 -0
- package/lib/application/workspace/workspace-service.js.map +1 -0
- package/lib/bootstrap/create-domain.d.ts +5 -0
- package/lib/bootstrap/create-domain.d.ts.map +1 -0
- package/lib/bootstrap/create-domain.js +14 -0
- package/lib/bootstrap/create-domain.js.map +1 -0
- package/lib/bootstrap/create-repositories.d.ts +403 -0
- package/lib/bootstrap/create-repositories.d.ts.map +1 -0
- package/lib/bootstrap/create-repositories.js +39 -0
- package/lib/bootstrap/create-repositories.js.map +1 -0
- package/lib/bootstrap/create-runtime.d.ts +8 -0
- package/lib/bootstrap/create-runtime.d.ts.map +1 -0
- package/lib/bootstrap/create-runtime.js +10 -0
- package/lib/bootstrap/create-runtime.js.map +1 -0
- package/lib/bootstrap/create-services.d.ts +52 -0
- package/lib/bootstrap/create-services.d.ts.map +1 -0
- package/lib/bootstrap/create-services.js +79 -0
- package/lib/bootstrap/create-services.js.map +1 -0
- package/lib/bootstrap/install-commands.d.ts +4 -0
- package/lib/bootstrap/install-commands.d.ts.map +1 -0
- package/lib/bootstrap/install-commands.js +322 -0
- package/lib/bootstrap/install-commands.js.map +1 -0
- package/lib/bootstrap/install-http.d.ts +7 -0
- package/lib/bootstrap/install-http.d.ts.map +1 -0
- package/lib/bootstrap/install-http.js +265 -0
- package/lib/bootstrap/install-http.js.map +1 -0
- package/lib/bootstrap/lifecycle.d.ts +14 -0
- package/lib/bootstrap/lifecycle.d.ts.map +1 -0
- package/lib/bootstrap/lifecycle.js +56 -0
- package/lib/bootstrap/lifecycle.js.map +1 -0
- package/lib/bootstrap/types.d.ts +9 -0
- package/lib/bootstrap/types.d.ts.map +1 -0
- package/lib/bootstrap/types.js +2 -0
- package/lib/bootstrap/types.js.map +1 -0
- package/lib/client.js +6 -0
- package/lib/client.js.map +1 -0
- package/lib/core/audit-service.d.ts +43 -0
- package/lib/core/audit-service.d.ts.map +1 -0
- package/lib/core/audit-service.js +75 -0
- package/lib/core/audit-service.js.map +1 -0
- package/lib/core/candidate-extractor.d.ts +31 -0
- package/lib/core/candidate-extractor.d.ts.map +1 -0
- package/lib/core/candidate-extractor.js +83 -0
- package/lib/core/candidate-extractor.js.map +1 -0
- package/lib/core/candidate-service.d.ts +72 -0
- package/lib/core/candidate-service.d.ts.map +1 -0
- package/lib/core/candidate-service.js +283 -0
- package/lib/core/candidate-service.js.map +1 -0
- package/lib/core/character-service.d.ts +26 -0
- package/lib/core/character-service.d.ts.map +1 -0
- package/lib/core/character-service.js +68 -0
- package/lib/core/character-service.js.map +1 -0
- package/lib/core/chat-file-io.d.ts +28 -0
- package/lib/core/chat-file-io.d.ts.map +1 -0
- package/lib/core/chat-file-io.js +114 -0
- package/lib/core/chat-file-io.js.map +1 -0
- package/lib/core/chat-service.d.ts +4 -0
- package/lib/core/chat-service.d.ts.map +1 -0
- package/lib/core/chat-service.js +3 -0
- package/lib/core/chat-service.js.map +1 -0
- package/lib/core/command-arguments.d.ts +2 -0
- package/lib/core/command-arguments.d.ts.map +1 -0
- package/lib/core/command-arguments.js +42 -0
- package/lib/core/command-arguments.js.map +1 -0
- package/lib/core/companion-child-agent-service.d.ts +3 -0
- package/lib/core/companion-child-agent-service.d.ts.map +1 -0
- package/lib/core/companion-child-agent-service.js +3 -0
- package/lib/core/companion-child-agent-service.js.map +1 -0
- package/lib/core/companion-invocation-service.d.ts +3 -0
- package/lib/core/companion-invocation-service.d.ts.map +1 -0
- package/lib/core/companion-invocation-service.js +3 -0
- package/lib/core/companion-invocation-service.js.map +1 -0
- package/lib/core/companion-profile-service.d.ts +3 -0
- package/lib/core/companion-profile-service.d.ts.map +1 -0
- package/lib/core/companion-profile-service.js +3 -0
- package/lib/core/companion-profile-service.js.map +1 -0
- package/lib/core/companion-promotion-service.d.ts +3 -0
- package/lib/core/companion-promotion-service.d.ts.map +1 -0
- package/lib/core/companion-promotion-service.js +3 -0
- package/lib/core/companion-promotion-service.js.map +1 -0
- package/lib/core/context-assembler.d.ts +92 -0
- package/lib/core/context-assembler.d.ts.map +1 -0
- package/lib/core/context-assembler.js +185 -0
- package/lib/core/context-assembler.js.map +1 -0
- package/lib/core/conversation-repository.d.ts +42 -0
- package/lib/core/conversation-repository.d.ts.map +1 -0
- package/lib/core/conversation-repository.js +94 -0
- package/lib/core/conversation-repository.js.map +1 -0
- package/lib/core/group-chat-execution-service.d.ts +3 -0
- package/lib/core/group-chat-execution-service.d.ts.map +1 -0
- package/lib/core/group-chat-execution-service.js +3 -0
- package/lib/core/group-chat-execution-service.js.map +1 -0
- package/lib/core/group-chat-orchestrator.d.ts +3 -0
- package/lib/core/group-chat-orchestrator.d.ts.map +1 -0
- package/lib/core/group-chat-orchestrator.js +3 -0
- package/lib/core/group-chat-orchestrator.js.map +1 -0
- package/lib/core/memory-retriever.d.ts +3 -0
- package/lib/core/memory-retriever.d.ts.map +1 -0
- package/lib/core/memory-retriever.js +3 -0
- package/lib/core/memory-retriever.js.map +1 -0
- package/lib/core/memory-service.d.ts +3 -0
- package/lib/core/memory-service.d.ts.map +1 -0
- package/lib/core/memory-service.js +3 -0
- package/lib/core/memory-service.js.map +1 -0
- package/lib/core/personality-candidate-service.d.ts +46 -0
- package/lib/core/personality-candidate-service.d.ts.map +1 -0
- package/lib/core/personality-candidate-service.js +65 -0
- package/lib/core/personality-candidate-service.js.map +1 -0
- package/lib/core/prompt-assembler.d.ts +43 -0
- package/lib/core/prompt-assembler.d.ts.map +1 -0
- package/lib/core/prompt-assembler.js +67 -0
- package/lib/core/prompt-assembler.js.map +1 -0
- package/lib/core/relationship-event-service.d.ts +3 -0
- package/lib/core/relationship-event-service.d.ts.map +1 -0
- package/lib/core/relationship-event-service.js +3 -0
- package/lib/core/relationship-event-service.js.map +1 -0
- package/lib/core/relationship-policy.d.ts +3 -0
- package/lib/core/relationship-policy.d.ts.map +1 -0
- package/lib/core/relationship-policy.js +3 -0
- package/lib/core/relationship-policy.js.map +1 -0
- package/lib/core/relationship-projection.d.ts +3 -0
- package/lib/core/relationship-projection.d.ts.map +1 -0
- package/lib/core/relationship-projection.js +3 -0
- package/lib/core/relationship-projection.js.map +1 -0
- package/lib/core/relationship-service.d.ts +3 -0
- package/lib/core/relationship-service.d.ts.map +1 -0
- package/lib/core/relationship-service.js +3 -0
- package/lib/core/relationship-service.js.map +1 -0
- package/lib/core/roleplay-contract.d.ts +11 -0
- package/lib/core/roleplay-contract.d.ts.map +1 -0
- package/lib/core/roleplay-contract.js +27 -0
- package/lib/core/roleplay-contract.js.map +1 -0
- package/lib/core/runtime-binding-service.d.ts +19 -0
- package/lib/core/runtime-binding-service.d.ts.map +1 -0
- package/lib/core/runtime-binding-service.js +66 -0
- package/lib/core/runtime-binding-service.js.map +1 -0
- package/lib/core/scene-service.d.ts +60 -0
- package/lib/core/scene-service.d.ts.map +1 -0
- package/lib/core/scene-service.js +212 -0
- package/lib/core/scene-service.js.map +1 -0
- package/lib/core/session-binding-service.d.ts +51 -0
- package/lib/core/session-binding-service.d.ts.map +1 -0
- package/lib/core/session-binding-service.js +106 -0
- package/lib/core/session-binding-service.js.map +1 -0
- package/lib/core/skill-service.d.ts +82 -0
- package/lib/core/skill-service.d.ts.map +1 -0
- package/lib/core/skill-service.js +45 -0
- package/lib/core/skill-service.js.map +1 -0
- package/lib/core/tavern-session-bridge.d.ts +3 -0
- package/lib/core/tavern-session-bridge.d.ts.map +1 -0
- package/lib/core/tavern-session-bridge.js +3 -0
- package/lib/core/tavern-session-bridge.js.map +1 -0
- package/lib/core/user-resolver.d.ts +15 -0
- package/lib/core/user-resolver.d.ts.map +1 -0
- package/lib/core/user-resolver.js +17 -0
- package/lib/core/user-resolver.js.map +1 -0
- package/lib/core/workspace-service.d.ts +3 -0
- package/lib/core/workspace-service.d.ts.map +1 -0
- package/lib/core/workspace-service.js +3 -0
- package/lib/core/workspace-service.js.map +1 -0
- package/lib/core/workspace-session-service.d.ts +11 -0
- package/lib/core/workspace-session-service.d.ts.map +1 -0
- package/lib/core/workspace-session-service.js +14 -0
- package/lib/core/workspace-session-service.js.map +1 -0
- package/lib/domain/schemas.d.ts +1173 -0
- package/lib/domain/schemas.d.ts.map +1 -0
- package/lib/domain/schemas.js +590 -0
- package/lib/domain/schemas.js.map +1 -0
- package/lib/domain/spec.d.ts +494 -0
- package/lib/domain/spec.d.ts.map +1 -0
- package/lib/domain/spec.js +63 -0
- package/lib/domain/spec.js.map +1 -0
- package/lib/import/artifact-service.d.ts +33 -0
- package/lib/import/artifact-service.d.ts.map +1 -0
- package/lib/import/artifact-service.js +67 -0
- package/lib/import/artifact-service.js.map +1 -0
- package/lib/import/import-service.d.ts +30 -0
- package/lib/import/import-service.d.ts.map +1 -0
- package/lib/import/import-service.js +154 -0
- package/lib/import/import-service.js.map +1 -0
- package/lib/import/parser.d.ts +81 -0
- package/lib/import/parser.d.ts.map +1 -0
- package/lib/import/parser.js +423 -0
- package/lib/import/parser.js.map +1 -0
- package/lib/index.d.ts +60 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +111 -0
- package/lib/index.js.map +1 -0
- package/lib/infrastructure/dsh/llm/llm-port.d.ts +3 -0
- package/lib/infrastructure/dsh/llm/llm-port.d.ts.map +1 -0
- package/lib/infrastructure/dsh/llm/llm-port.js +2 -0
- package/lib/infrastructure/dsh/llm/llm-port.js.map +1 -0
- package/lib/infrastructure/dsh/llm/model-gateway.d.ts +10 -0
- package/lib/infrastructure/dsh/llm/model-gateway.d.ts.map +1 -0
- package/lib/infrastructure/dsh/llm/model-gateway.js +21 -0
- package/lib/infrastructure/dsh/llm/model-gateway.js.map +1 -0
- package/lib/infrastructure/dsh/session/session-agent-provider.d.ts +28 -0
- package/lib/infrastructure/dsh/session/session-agent-provider.d.ts.map +1 -0
- package/lib/infrastructure/dsh/session/session-agent-provider.js +40 -0
- package/lib/infrastructure/dsh/session/session-agent-provider.js.map +1 -0
- package/lib/infrastructure/dsh/session/tavern-session-bridge.d.ts +142 -0
- package/lib/infrastructure/dsh/session/tavern-session-bridge.d.ts.map +1 -0
- package/lib/infrastructure/dsh/session/tavern-session-bridge.js +544 -0
- package/lib/infrastructure/dsh/session/tavern-session-bridge.js.map +1 -0
- package/lib/infrastructure/dsh/subagent/subagent-gateway.d.ts +63 -0
- package/lib/infrastructure/dsh/subagent/subagent-gateway.d.ts.map +1 -0
- package/lib/infrastructure/dsh/subagent/subagent-gateway.js +70 -0
- package/lib/infrastructure/dsh/subagent/subagent-gateway.js.map +1 -0
- package/lib/infrastructure/runtime/companion-runtime.d.ts +128 -0
- package/lib/infrastructure/runtime/companion-runtime.d.ts.map +1 -0
- package/lib/infrastructure/runtime/companion-runtime.js +127 -0
- package/lib/infrastructure/runtime/companion-runtime.js.map +1 -0
- package/lib/infrastructure/runtime/runtime-factory.d.ts +10 -0
- package/lib/infrastructure/runtime/runtime-factory.d.ts.map +1 -0
- package/lib/infrastructure/runtime/runtime-factory.js +14 -0
- package/lib/infrastructure/runtime/runtime-factory.js.map +1 -0
- package/lib/interfaces/http/chat/chat-http.d.ts +23 -0
- package/lib/interfaces/http/chat/chat-http.d.ts.map +1 -0
- package/lib/interfaces/http/chat/chat-http.js +310 -0
- package/lib/interfaces/http/chat/chat-http.js.map +1 -0
- package/lib/interfaces/http/companion/companion-http.d.ts +8 -0
- package/lib/interfaces/http/companion/companion-http.d.ts.map +1 -0
- package/lib/interfaces/http/companion/companion-http.js +76 -0
- package/lib/interfaces/http/companion/companion-http.js.map +1 -0
- package/lib/interfaces/http/companion/promotion-http.d.ts +6 -0
- package/lib/interfaces/http/companion/promotion-http.d.ts.map +1 -0
- package/lib/interfaces/http/companion/promotion-http.js +25 -0
- package/lib/interfaces/http/companion/promotion-http.js.map +1 -0
- package/lib/interfaces/http/companion/runtime-http.d.ts +13 -0
- package/lib/interfaces/http/companion/runtime-http.d.ts.map +1 -0
- package/lib/interfaces/http/companion/runtime-http.js +51 -0
- package/lib/interfaces/http/companion/runtime-http.js.map +1 -0
- package/lib/interfaces/http/companion/stage4-companion-http.d.ts +30 -0
- package/lib/interfaces/http/companion/stage4-companion-http.d.ts.map +1 -0
- package/lib/interfaces/http/companion/stage4-companion-http.js +149 -0
- package/lib/interfaces/http/companion/stage4-companion-http.js.map +1 -0
- package/lib/interfaces/http/group/group-http.d.ts +11 -0
- package/lib/interfaces/http/group/group-http.d.ts.map +1 -0
- package/lib/interfaces/http/group/group-http.js +77 -0
- package/lib/interfaces/http/group/group-http.js.map +1 -0
- package/lib/interfaces/http/memory/candidate-http.d.ts +8 -0
- package/lib/interfaces/http/memory/candidate-http.d.ts.map +1 -0
- package/lib/interfaces/http/memory/candidate-http.js +86 -0
- package/lib/interfaces/http/memory/candidate-http.js.map +1 -0
- package/lib/interfaces/http/relationship/companion-relationship-http.d.ts +7 -0
- package/lib/interfaces/http/relationship/companion-relationship-http.d.ts.map +1 -0
- package/lib/interfaces/http/relationship/companion-relationship-http.js +30 -0
- package/lib/interfaces/http/relationship/companion-relationship-http.js.map +1 -0
- package/lib/interfaces/http/workspace/workspace-http.d.ts +19 -0
- package/lib/interfaces/http/workspace/workspace-http.d.ts.map +1 -0
- package/lib/interfaces/http/workspace/workspace-http.js +78 -0
- package/lib/interfaces/http/workspace/workspace-http.js.map +1 -0
- package/lib/interfaces/read-model/tavern-read-api.d.ts +44 -0
- package/lib/interfaces/read-model/tavern-read-api.d.ts.map +1 -0
- package/lib/interfaces/read-model/tavern-read-api.js +189 -0
- package/lib/interfaces/read-model/tavern-read-api.js.map +1 -0
- package/lib/remote/candidate-api.d.ts +3 -0
- package/lib/remote/candidate-api.d.ts.map +1 -0
- package/lib/remote/candidate-api.js +3 -0
- package/lib/remote/candidate-api.js.map +1 -0
- package/lib/remote/chat-api.d.ts +3 -0
- package/lib/remote/chat-api.d.ts.map +1 -0
- package/lib/remote/chat-api.js +3 -0
- package/lib/remote/chat-api.js.map +1 -0
- package/lib/remote/companion-api.d.ts +3 -0
- package/lib/remote/companion-api.d.ts.map +1 -0
- package/lib/remote/companion-api.js +3 -0
- package/lib/remote/companion-api.js.map +1 -0
- package/lib/remote/companion-promotion-api.d.ts +3 -0
- package/lib/remote/companion-promotion-api.d.ts.map +1 -0
- package/lib/remote/companion-promotion-api.js +3 -0
- package/lib/remote/companion-promotion-api.js.map +1 -0
- package/lib/remote/import-http.d.ts +29 -0
- package/lib/remote/import-http.d.ts.map +1 -0
- package/lib/remote/import-http.js +106 -0
- package/lib/remote/import-http.js.map +1 -0
- package/lib/remote/stage4-api.d.ts +6 -0
- package/lib/remote/stage4-api.d.ts.map +1 -0
- package/lib/remote/stage4-api.js +4 -0
- package/lib/remote/stage4-api.js.map +1 -0
- package/lib/remote/stage5-runtime-api.d.ts +4 -0
- package/lib/remote/stage5-runtime-api.d.ts.map +1 -0
- package/lib/remote/stage5-runtime-api.js +2 -0
- package/lib/remote/stage5-runtime-api.js.map +1 -0
- package/lib/remote/stage6-group-api.d.ts +4 -0
- package/lib/remote/stage6-group-api.d.ts.map +1 -0
- package/lib/remote/stage6-group-api.js +2 -0
- package/lib/remote/stage6-group-api.js.map +1 -0
- package/lib/remote/tavern-api.d.ts +3 -0
- package/lib/remote/tavern-api.d.ts.map +1 -0
- package/lib/remote/tavern-api.js +3 -0
- package/lib/remote/tavern-api.js.map +1 -0
- package/lib/runtime/agent-orchestrator.d.ts +3 -0
- package/lib/runtime/agent-orchestrator.d.ts.map +1 -0
- package/lib/runtime/agent-orchestrator.js +3 -0
- package/lib/runtime/agent-orchestrator.js.map +1 -0
- package/lib/runtime/companion-runtime.d.ts +3 -0
- package/lib/runtime/companion-runtime.d.ts.map +1 -0
- package/lib/runtime/companion-runtime.js +3 -0
- package/lib/runtime/companion-runtime.js.map +1 -0
- package/lib/runtime/langgraph-graph.d.ts +32 -0
- package/lib/runtime/langgraph-graph.d.ts.map +1 -0
- package/lib/runtime/langgraph-graph.js +32 -0
- package/lib/runtime/langgraph-graph.js.map +1 -0
- package/lib/runtime/state.d.ts +38 -0
- package/lib/runtime/state.d.ts.map +1 -0
- package/lib/runtime/state.js +16 -0
- package/lib/runtime/state.js.map +1 -0
- package/lib/seed/elaine.d.ts +9 -0
- package/lib/seed/elaine.d.ts.map +1 -0
- package/lib/seed/elaine.js +27 -0
- package/lib/seed/elaine.js.map +1 -0
- package/lib/tools/import-character.d.ts +16 -0
- package/lib/tools/import-character.d.ts.map +1 -0
- package/lib/tools/import-character.js +98 -0
- package/lib/tools/import-character.js.map +1 -0
- package/package.json +108 -0
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import type { TavernDomain } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Storage table composition boundary. Services receive named repositories rather
|
|
4
|
+
* than knowing the Storage Domain table names scattered across the entrypoint.
|
|
5
|
+
* The underlying KvTable handles remain unchanged for compatibility.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createTavernRepositories(domain: TavernDomain): {
|
|
8
|
+
characters: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
9
|
+
id: string;
|
|
10
|
+
revision: number;
|
|
11
|
+
name: string;
|
|
12
|
+
persona: string;
|
|
13
|
+
alternateGreetings: string[];
|
|
14
|
+
capabilityProfileId: string;
|
|
15
|
+
lorebookIds: string[];
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
status: "active" | "trashed";
|
|
19
|
+
scenario?: string | undefined;
|
|
20
|
+
exampleDialogue?: string | undefined;
|
|
21
|
+
firstMessage?: string | undefined;
|
|
22
|
+
avatarArtifactId?: string | undefined;
|
|
23
|
+
importRecordId?: string | undefined;
|
|
24
|
+
trashedAt?: string | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
instances: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
27
|
+
id: string;
|
|
28
|
+
characterId: string;
|
|
29
|
+
characterRevision: number;
|
|
30
|
+
parentSessionId: string;
|
|
31
|
+
childSessionId: string;
|
|
32
|
+
sceneId: string;
|
|
33
|
+
status: "creating" | "active" | "retiring" | "retired" | "failed";
|
|
34
|
+
createdAt: string;
|
|
35
|
+
retiredAt?: string | undefined;
|
|
36
|
+
failureCode?: string | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
artifacts: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
39
|
+
id: string;
|
|
40
|
+
kind: "character-card-json" | "character-card-png" | "charx";
|
|
41
|
+
hash: string;
|
|
42
|
+
size: number;
|
|
43
|
+
metadata: Record<string, unknown>;
|
|
44
|
+
storedAt: string;
|
|
45
|
+
}>;
|
|
46
|
+
lorebooks: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
47
|
+
id: string;
|
|
48
|
+
name: string;
|
|
49
|
+
entries: {
|
|
50
|
+
id: string;
|
|
51
|
+
keys: string[];
|
|
52
|
+
content: string;
|
|
53
|
+
priority: number;
|
|
54
|
+
enabled: boolean;
|
|
55
|
+
constant: boolean;
|
|
56
|
+
caseSensitive: boolean;
|
|
57
|
+
matchMode: "contains" | "word";
|
|
58
|
+
}[];
|
|
59
|
+
createdAt: string;
|
|
60
|
+
updatedAt: string;
|
|
61
|
+
}>;
|
|
62
|
+
relationshipNodes: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
63
|
+
id: string;
|
|
64
|
+
kind: "user" | "character" | "character-instance" | "companion" | "scene";
|
|
65
|
+
entityId: string;
|
|
66
|
+
label: string;
|
|
67
|
+
createdAt: string;
|
|
68
|
+
}>;
|
|
69
|
+
relationshipEdges: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
70
|
+
id: string;
|
|
71
|
+
fromNodeId: string;
|
|
72
|
+
toNodeId: string;
|
|
73
|
+
type: "trust" | "familiarity" | "affection" | "ally" | "rival";
|
|
74
|
+
value: number;
|
|
75
|
+
source: "user" | "import" | "tool" | "system" | "game-rule";
|
|
76
|
+
status: "active" | "superseded" | "archived";
|
|
77
|
+
createdAt: string;
|
|
78
|
+
updatedAt: string;
|
|
79
|
+
sourceEventId?: string | undefined;
|
|
80
|
+
sceneId?: string | undefined;
|
|
81
|
+
supersedes?: string | undefined;
|
|
82
|
+
projectionBaseline?: number | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
memories: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
85
|
+
id: string;
|
|
86
|
+
characterId: string;
|
|
87
|
+
fact: string;
|
|
88
|
+
category: "player" | "world" | "npc" | "general" | "shared-experience" | "relationship-milestone";
|
|
89
|
+
status: "active" | "superseded" | "forgotten";
|
|
90
|
+
source: "user" | "tool" | "system" | "game-rule";
|
|
91
|
+
confidence: number;
|
|
92
|
+
salience: number;
|
|
93
|
+
createdAt: string;
|
|
94
|
+
updatedAt: string;
|
|
95
|
+
instanceId?: string | undefined;
|
|
96
|
+
sceneId?: string | undefined;
|
|
97
|
+
supersedes?: string | undefined;
|
|
98
|
+
ownerUserId?: string | undefined;
|
|
99
|
+
sourceMessageIds?: string[] | undefined;
|
|
100
|
+
candidateId?: string | undefined;
|
|
101
|
+
sourceEventId?: string | undefined;
|
|
102
|
+
lastAccessedAt?: string | undefined;
|
|
103
|
+
evidenceInvalidatedAt?: string | undefined;
|
|
104
|
+
}>;
|
|
105
|
+
scenes: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
106
|
+
id: string;
|
|
107
|
+
ownerUserId: string;
|
|
108
|
+
status: "active" | "archived";
|
|
109
|
+
worldLorebookIds: string[];
|
|
110
|
+
createdAt: string;
|
|
111
|
+
updatedAt: string;
|
|
112
|
+
title?: string | undefined;
|
|
113
|
+
}>;
|
|
114
|
+
sceneParticipants: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
115
|
+
id: string;
|
|
116
|
+
sceneId: string;
|
|
117
|
+
entityId: string;
|
|
118
|
+
entityKind: "user" | "character-instance" | "companion";
|
|
119
|
+
role: "owner" | "member" | "observer";
|
|
120
|
+
joinedAt: string;
|
|
121
|
+
leftAt?: string | undefined;
|
|
122
|
+
}>;
|
|
123
|
+
auditLogs: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
124
|
+
id: string;
|
|
125
|
+
entityType: "character" | "scene" | "instance" | "memory" | "relationship" | "delivery" | "participant" | "candidate" | "relationship_event" | "companion_profile" | "personality_candidate" | "skill" | "workspace" | "capability_grant";
|
|
126
|
+
entityId: string;
|
|
127
|
+
action: "create" | "update" | "supersede" | "forget" | "archive";
|
|
128
|
+
source: "user" | "tool" | "system" | "game-rule";
|
|
129
|
+
createdAt: string;
|
|
130
|
+
before?: unknown;
|
|
131
|
+
after?: unknown;
|
|
132
|
+
sourceEventId?: string | undefined;
|
|
133
|
+
actorId?: string | undefined;
|
|
134
|
+
sceneId?: string | undefined;
|
|
135
|
+
}>;
|
|
136
|
+
relationshipEvents: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
137
|
+
id: string;
|
|
138
|
+
ownerUserId: string;
|
|
139
|
+
fromNodeId: string;
|
|
140
|
+
toNodeId: string;
|
|
141
|
+
type: "trust" | "familiarity" | "affection" | "ally" | "rival";
|
|
142
|
+
delta: number;
|
|
143
|
+
source: "user" | "tool" | "system" | "game-rule";
|
|
144
|
+
idempotencyKey: string;
|
|
145
|
+
createdAt: string;
|
|
146
|
+
characterId?: string | undefined;
|
|
147
|
+
sceneId?: string | undefined;
|
|
148
|
+
sourceMessageIds?: string[] | undefined;
|
|
149
|
+
sourceEventId?: string | undefined;
|
|
150
|
+
reason?: string | undefined;
|
|
151
|
+
}>;
|
|
152
|
+
companionProfiles: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
153
|
+
id: string;
|
|
154
|
+
ownerUserId: string;
|
|
155
|
+
characterId: string;
|
|
156
|
+
characterRevision: number;
|
|
157
|
+
status: "active" | "retired" | "paused";
|
|
158
|
+
boundaries: string[];
|
|
159
|
+
goals: string[];
|
|
160
|
+
createdAt: string;
|
|
161
|
+
updatedAt: string;
|
|
162
|
+
displayName?: string | undefined;
|
|
163
|
+
modelPreference?: {
|
|
164
|
+
mode: "inherit-dsh-session" | "inherit-dsh-default" | "runtime-default";
|
|
165
|
+
providerId?: string | undefined;
|
|
166
|
+
modelId?: string | undefined;
|
|
167
|
+
} | undefined;
|
|
168
|
+
identitySummary?: string | undefined;
|
|
169
|
+
communicationPreferences?: string | undefined;
|
|
170
|
+
personalitySummary?: string | undefined;
|
|
171
|
+
personalityTraits?: {
|
|
172
|
+
id: string;
|
|
173
|
+
name: string;
|
|
174
|
+
description: string;
|
|
175
|
+
strength: number;
|
|
176
|
+
confidence: number;
|
|
177
|
+
source: "character-card" | "conversation-summary" | "user-confirmed";
|
|
178
|
+
status: "active" | "superseded" | "rejected";
|
|
179
|
+
}[] | undefined;
|
|
180
|
+
personalityVersion?: number | undefined;
|
|
181
|
+
personalitySourceConversationIds?: string[] | undefined;
|
|
182
|
+
personalitySourceMessageIds?: string[] | undefined;
|
|
183
|
+
personalitySummarizedAt?: string | undefined;
|
|
184
|
+
personalityConfirmedAt?: string | undefined;
|
|
185
|
+
userRelationshipSummary?: string | undefined;
|
|
186
|
+
sharedHistorySummary?: string | undefined;
|
|
187
|
+
memoryPolicy?: {
|
|
188
|
+
conversationIds?: string[] | undefined;
|
|
189
|
+
sceneIds?: string[] | undefined;
|
|
190
|
+
includedMemoryIds?: string[] | undefined;
|
|
191
|
+
excludedMemoryIds?: string[] | undefined;
|
|
192
|
+
} | undefined;
|
|
193
|
+
relationshipScope?: {
|
|
194
|
+
includeGlobal?: boolean | undefined;
|
|
195
|
+
sceneIds?: string[] | undefined;
|
|
196
|
+
workspaceIds?: string[] | undefined;
|
|
197
|
+
} | undefined;
|
|
198
|
+
}>;
|
|
199
|
+
personalityCandidates: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
200
|
+
id: string;
|
|
201
|
+
ownerUserId: string;
|
|
202
|
+
companionProfileId: string;
|
|
203
|
+
conversationId: string;
|
|
204
|
+
traitName: string;
|
|
205
|
+
description: string;
|
|
206
|
+
strength: number;
|
|
207
|
+
confidence: number;
|
|
208
|
+
sourceMessageIds: string[];
|
|
209
|
+
extractionVersion: string;
|
|
210
|
+
status: "accepted" | "superseded" | "pending" | "rejected" | "evidence-invalid";
|
|
211
|
+
createdAt: string;
|
|
212
|
+
updatedAt: string;
|
|
213
|
+
reviewerUserId?: string | undefined;
|
|
214
|
+
reviewedAt?: string | undefined;
|
|
215
|
+
invalidationReason?: string | undefined;
|
|
216
|
+
invalidatedAt?: string | undefined;
|
|
217
|
+
supersedes?: string | undefined;
|
|
218
|
+
}>;
|
|
219
|
+
companionSkills: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
220
|
+
id: string;
|
|
221
|
+
ownerUserId: string;
|
|
222
|
+
companionProfileId: string;
|
|
223
|
+
name: string;
|
|
224
|
+
description: string;
|
|
225
|
+
instructions: string;
|
|
226
|
+
status: "active" | "disabled";
|
|
227
|
+
version: number;
|
|
228
|
+
createdAt: string;
|
|
229
|
+
updatedAt: string;
|
|
230
|
+
workflowId?: "conversation" | "analysis" | "planning" | "research" | undefined;
|
|
231
|
+
outputFormat?: string | undefined;
|
|
232
|
+
boundaries?: string[] | undefined;
|
|
233
|
+
requiredToolIds?: string[] | undefined;
|
|
234
|
+
}>;
|
|
235
|
+
workspaces: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
236
|
+
id: string;
|
|
237
|
+
ownerUserId: string;
|
|
238
|
+
name: string;
|
|
239
|
+
status: "active" | "archived" | "suspended";
|
|
240
|
+
createdAt: string;
|
|
241
|
+
updatedAt: string;
|
|
242
|
+
}>;
|
|
243
|
+
workspaceMembers: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
244
|
+
id: string;
|
|
245
|
+
workspaceId: string;
|
|
246
|
+
entityId: string;
|
|
247
|
+
entityKind: "user" | "companion";
|
|
248
|
+
role: "owner" | "member" | "observer";
|
|
249
|
+
joinedAt: string;
|
|
250
|
+
leftAt?: string | undefined;
|
|
251
|
+
}>;
|
|
252
|
+
workspacePolicies: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
253
|
+
id: string;
|
|
254
|
+
workspaceId: string;
|
|
255
|
+
createdAt: string;
|
|
256
|
+
updatedAt: string;
|
|
257
|
+
}>;
|
|
258
|
+
workspaceSceneBindings: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
259
|
+
id: string;
|
|
260
|
+
workspaceId: string;
|
|
261
|
+
sceneId: string;
|
|
262
|
+
boundAt: string;
|
|
263
|
+
unboundAt?: string | undefined;
|
|
264
|
+
}>;
|
|
265
|
+
workspaceSessionBindings: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
266
|
+
id: string;
|
|
267
|
+
ownerUserId: string;
|
|
268
|
+
workspaceId: string;
|
|
269
|
+
sceneId: string;
|
|
270
|
+
threadId: string;
|
|
271
|
+
sessionId: string;
|
|
272
|
+
status: "active" | "archived";
|
|
273
|
+
createdAt: string;
|
|
274
|
+
updatedAt: string;
|
|
275
|
+
}>;
|
|
276
|
+
runtimeBindings: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
277
|
+
id: string;
|
|
278
|
+
runtimeType: "dsh-child" | "langgraph-thread" | "generation";
|
|
279
|
+
runtimeId: string;
|
|
280
|
+
ownerUserId: string;
|
|
281
|
+
companionProfileId: string;
|
|
282
|
+
purpose: "companion" | "group-delivery" | "chat-generation";
|
|
283
|
+
status: "active" | "suspended" | "requested" | "released" | "orphaned" | "reclaimed";
|
|
284
|
+
createdAt: string;
|
|
285
|
+
workspaceId?: string | undefined;
|
|
286
|
+
sceneId?: string | undefined;
|
|
287
|
+
leaseExpiresAt?: string | undefined;
|
|
288
|
+
releasedAt?: string | undefined;
|
|
289
|
+
}>;
|
|
290
|
+
conversations: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
291
|
+
id: string;
|
|
292
|
+
ownerUserId: string;
|
|
293
|
+
characterId: string;
|
|
294
|
+
characterRevision: number;
|
|
295
|
+
status: "active" | "trashed" | "archived";
|
|
296
|
+
createdAt: string;
|
|
297
|
+
updatedAt: string;
|
|
298
|
+
sceneId?: string | undefined;
|
|
299
|
+
title?: string | undefined;
|
|
300
|
+
activeLeafMessageId?: string | undefined;
|
|
301
|
+
}>;
|
|
302
|
+
conversationMessages: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
303
|
+
id: string;
|
|
304
|
+
conversationId: string;
|
|
305
|
+
role: "user" | "system" | "assistant";
|
|
306
|
+
content: string;
|
|
307
|
+
status: "active" | "superseded" | "edited";
|
|
308
|
+
createdAt: string;
|
|
309
|
+
parentMessageId?: string | undefined;
|
|
310
|
+
modelInfo?: Record<string, unknown> | undefined;
|
|
311
|
+
generationInfo?: Record<string, unknown> | undefined;
|
|
312
|
+
}>;
|
|
313
|
+
sessionBindings: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
314
|
+
id: string;
|
|
315
|
+
sessionId: string;
|
|
316
|
+
characterId: string;
|
|
317
|
+
ownerUserId: string;
|
|
318
|
+
createdAt: string;
|
|
319
|
+
updatedAt: string;
|
|
320
|
+
conversationId?: string | undefined;
|
|
321
|
+
companionProfileId?: string | undefined;
|
|
322
|
+
activeConversationId?: string | undefined;
|
|
323
|
+
}>;
|
|
324
|
+
insightCandidates: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
325
|
+
id: string;
|
|
326
|
+
ownerUserId: string;
|
|
327
|
+
characterId: string;
|
|
328
|
+
conversationId: string;
|
|
329
|
+
kind: "user_fact" | "preference" | "shared_event" | "relationship_signal" | "goal" | "commitment" | "boundary";
|
|
330
|
+
proposedContent: string;
|
|
331
|
+
sourceMessageIds: string[];
|
|
332
|
+
confidence: number;
|
|
333
|
+
sensitivity: "low" | "medium" | "high";
|
|
334
|
+
extractionVersion: string;
|
|
335
|
+
status: "accepted" | "superseded" | "pending" | "rejected" | "evidence-invalid";
|
|
336
|
+
createdAt: string;
|
|
337
|
+
updatedAt: string;
|
|
338
|
+
sceneId?: string | undefined;
|
|
339
|
+
rationale?: string | undefined;
|
|
340
|
+
reviewerUserId?: string | undefined;
|
|
341
|
+
reviewedAt?: string | undefined;
|
|
342
|
+
resultingMemoryId?: string | undefined;
|
|
343
|
+
invalidationReason?: string | undefined;
|
|
344
|
+
invalidatedAt?: string | undefined;
|
|
345
|
+
supersedes?: string | undefined;
|
|
346
|
+
}>;
|
|
347
|
+
groupThreads: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
348
|
+
id: string;
|
|
349
|
+
workspaceId: string;
|
|
350
|
+
sceneId: string;
|
|
351
|
+
ownerUserId: string;
|
|
352
|
+
status: "active" | "closed";
|
|
353
|
+
createdAt: string;
|
|
354
|
+
updatedAt: string;
|
|
355
|
+
}>;
|
|
356
|
+
groupMessages: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
357
|
+
id: string;
|
|
358
|
+
threadId: string;
|
|
359
|
+
senderKind: "user" | "companion";
|
|
360
|
+
senderId: string;
|
|
361
|
+
content: string;
|
|
362
|
+
sequence: number;
|
|
363
|
+
createdAt: string;
|
|
364
|
+
}>;
|
|
365
|
+
groupDeliveryBatches: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
366
|
+
id: string;
|
|
367
|
+
threadId: string;
|
|
368
|
+
triggerMessageId: string;
|
|
369
|
+
ownerUserId: string;
|
|
370
|
+
status: "failed" | "queued" | "completed" | "running" | "partial";
|
|
371
|
+
decisionId: string;
|
|
372
|
+
createdAt: string;
|
|
373
|
+
completedAt?: string | undefined;
|
|
374
|
+
}>;
|
|
375
|
+
groupDeliveries: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
376
|
+
id: string;
|
|
377
|
+
batchId: string;
|
|
378
|
+
companionProfileId: string;
|
|
379
|
+
status: "failed" | "accepted" | "completed" | "cancelled" | "running";
|
|
380
|
+
createdAt: string;
|
|
381
|
+
responseMessageId?: string | undefined;
|
|
382
|
+
error?: string | undefined;
|
|
383
|
+
completedAt?: string | undefined;
|
|
384
|
+
}>;
|
|
385
|
+
schedulingDecisions: import("@deepseek-ai/dsh-storage-domain").KvTable<string, {
|
|
386
|
+
id: string;
|
|
387
|
+
workspaceId: string;
|
|
388
|
+
sceneId: string;
|
|
389
|
+
triggerMessageId: string;
|
|
390
|
+
policyVersion: string;
|
|
391
|
+
candidateCompanionIds: string[];
|
|
392
|
+
selectedCompanionIds: string[];
|
|
393
|
+
excludedCompanionIds: string[];
|
|
394
|
+
perCandidateScores: Record<string, number>;
|
|
395
|
+
selectionReasons: Record<string, string[]>;
|
|
396
|
+
exclusionReasons: Record<string, string[]>;
|
|
397
|
+
requestedMentions: string[];
|
|
398
|
+
decisionMode: "mention" | "deterministic";
|
|
399
|
+
createdAt: string;
|
|
400
|
+
}>;
|
|
401
|
+
};
|
|
402
|
+
export type TavernRepositories = ReturnType<typeof createTavernRepositories>;
|
|
403
|
+
//# sourceMappingURL=create-repositories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-repositories.d.ts","sourceRoot":"","sources":["../../src/bootstrap/create-repositories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgC5D;AAED,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage table composition boundary. Services receive named repositories rather
|
|
3
|
+
* than knowing the Storage Domain table names scattered across the entrypoint.
|
|
4
|
+
* The underlying KvTable handles remain unchanged for compatibility.
|
|
5
|
+
*/
|
|
6
|
+
export function createTavernRepositories(domain) {
|
|
7
|
+
return {
|
|
8
|
+
characters: domain.table('characters'),
|
|
9
|
+
instances: domain.table('instances'),
|
|
10
|
+
artifacts: domain.table('artifacts'),
|
|
11
|
+
lorebooks: domain.table('lorebooks'),
|
|
12
|
+
relationshipNodes: domain.table('relationship_nodes'),
|
|
13
|
+
relationshipEdges: domain.table('relationship_edges'),
|
|
14
|
+
memories: domain.table('memories'),
|
|
15
|
+
scenes: domain.table('scenes'),
|
|
16
|
+
sceneParticipants: domain.table('scene_participants'),
|
|
17
|
+
auditLogs: domain.table('audit_logs'),
|
|
18
|
+
relationshipEvents: domain.table('relationship_events'),
|
|
19
|
+
companionProfiles: domain.table('companion_profiles'),
|
|
20
|
+
personalityCandidates: domain.table('personality_candidates'),
|
|
21
|
+
companionSkills: domain.table('companion_skills'),
|
|
22
|
+
workspaces: domain.table('workspaces'),
|
|
23
|
+
workspaceMembers: domain.table('workspace_members'),
|
|
24
|
+
workspacePolicies: domain.table('workspace_policies'),
|
|
25
|
+
workspaceSceneBindings: domain.table('workspace_scene_bindings'),
|
|
26
|
+
workspaceSessionBindings: domain.table('workspace_session_bindings'),
|
|
27
|
+
runtimeBindings: domain.table('runtime_bindings'),
|
|
28
|
+
conversations: domain.table('conversations'),
|
|
29
|
+
conversationMessages: domain.table('conversation_messages'),
|
|
30
|
+
sessionBindings: domain.table('session_bindings'),
|
|
31
|
+
insightCandidates: domain.table('insight_candidates'),
|
|
32
|
+
groupThreads: domain.table('group_threads'),
|
|
33
|
+
groupMessages: domain.table('group_messages'),
|
|
34
|
+
groupDeliveryBatches: domain.table('group_delivery_batches'),
|
|
35
|
+
groupDeliveries: domain.table('group_deliveries'),
|
|
36
|
+
schedulingDecisions: domain.table('scheduling_decisions'),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=create-repositories.js.map
|
|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AAK,CAAC,4BAA4B,CAAC;QACpE,eAAe,EAAE,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC;QACjD,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC;QAC5C,oBAAoB,EAAE,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC;QAC3D,eAAe,EAAE,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC;QACjD,iBAAiB,EAAE,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC;QACrD,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC;QAC3C,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC;QAC7C,oBAAoB,EAAE,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC;QAC5D,eAAe,EAAE,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC;QACjD,mBAAmB,EAAE,MAAM,CAAC,KAAK,CAAC,sBAAsB,CAAC;KAC1D,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CompanionRuntime } from '../infrastructure/runtime/companion-runtime.js';
|
|
2
|
+
export interface CompanionRuntimeConfig {
|
|
3
|
+
readonly kind?: 'fake' | 'langgraph';
|
|
4
|
+
readonly langGraphUrl?: string;
|
|
5
|
+
readonly langGraphToken?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function createCompanionRuntime(config?: CompanionRuntimeConfig): CompanionRuntime;
|
|
8
|
+
//# sourceMappingURL=create-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-runtime.d.ts","sourceRoot":"","sources":["../../src/bootstrap/create-runtime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAA;AAEtF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;IACpC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CACjC;AAED,wBAAgB,sBAAsB,CAAC,MAAM,GAAE,sBAA2B,GAAG,gBAAgB,CAM5F"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Runtime selection facade retained for bootstrap compatibility. */
|
|
2
|
+
import { createCompanionRuntime as createRuntime } from '../infrastructure/runtime/runtime-factory.js';
|
|
3
|
+
export function createCompanionRuntime(config = {}) {
|
|
4
|
+
return createRuntime({
|
|
5
|
+
...(config.kind === undefined ? {} : { kind: config.kind }),
|
|
6
|
+
...(config.langGraphUrl === undefined ? {} : { baseUrl: config.langGraphUrl }),
|
|
7
|
+
...(config.langGraphToken === undefined ? {} : { token: config.langGraphToken }),
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=create-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-runtime.js","sourceRoot":"","sources":["../../src/bootstrap/create-runtime.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,EAAE,sBAAsB,IAAI,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAStG,MAAM,UAAU,sBAAsB,CAAC,SAAiC,EAAE;IACxE,OAAO,aAAa,CAAC;QACnB,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;QAC3D,GAAG,CAAC,MAAM,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;QAC9E,GAAG,CAAC,MAAM,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC;KACjF,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { CharacterService } from '../core/character-service.js';
|
|
3
|
+
import { AuditService } from '../core/audit-service.js';
|
|
4
|
+
import { ImportService } from '../import/import-service.js';
|
|
5
|
+
import { SubagentGateway } from '../infrastructure/dsh/subagent/subagent-gateway.js';
|
|
6
|
+
import { SessionAgentProvider } from '../infrastructure/dsh/session/session-agent-provider.js';
|
|
7
|
+
import { RelationshipService } from '../application/relationship/relationship-service.js';
|
|
8
|
+
import { RelationshipEventService } from '../application/relationship/relationship-event-service.js';
|
|
9
|
+
import { RelationshipProjection } from '../application/relationship/relationship-projection.js';
|
|
10
|
+
import { MemoryService } from '../application/memory/memory-service.js';
|
|
11
|
+
import { CompanionProfileService } from '../application/companion/companion-profile-service.js';
|
|
12
|
+
import { SceneService } from '../core/scene-service.js';
|
|
13
|
+
import { SkillService } from '../core/skill-service.js';
|
|
14
|
+
import { WorkspaceService } from '../application/workspace/workspace-service.js';
|
|
15
|
+
import { RuntimeBindingService } from '../core/runtime-binding-service.js';
|
|
16
|
+
import { WorkspaceSessionService } from '../core/workspace-session-service.js';
|
|
17
|
+
import { CompanionInvocationService } from '../application/companion/companion-invocation-service.js';
|
|
18
|
+
import { CompanionChildAgentService } from '../application/companion/companion-child-service.js';
|
|
19
|
+
import { GroupChatOrchestrator } from '../application/group-chat/group-chat-orchestrator.js';
|
|
20
|
+
import { GroupChatExecutionService } from '../application/group-chat/group-chat-execution-service.js';
|
|
21
|
+
import { MemoryRetriever } from '../application/memory/memory-retriever.js';
|
|
22
|
+
import { ContextAssembler } from '../core/context-assembler.js';
|
|
23
|
+
import { AgentOrchestrator } from '../application/companion/agent-orchestrator.js';
|
|
24
|
+
import type { TavernRepositories } from './create-repositories.js';
|
|
25
|
+
import type { TavernLifecycle } from './lifecycle.js';
|
|
26
|
+
export type TavernServices = Awaited<ReturnType<typeof createTavernServices>>;
|
|
27
|
+
export declare function createTavernServices(ctx: Context, repos: TavernRepositories, _workspacePath: string, lifecycle: TavernLifecycle): Promise<{
|
|
28
|
+
characterService: CharacterService;
|
|
29
|
+
importService: ImportService;
|
|
30
|
+
gateway: SubagentGateway;
|
|
31
|
+
sessionAgentProvider: SessionAgentProvider;
|
|
32
|
+
auditService: AuditService;
|
|
33
|
+
relationshipService: RelationshipService;
|
|
34
|
+
relationshipEventService: RelationshipEventService;
|
|
35
|
+
relationshipProjection: RelationshipProjection;
|
|
36
|
+
memoryService: MemoryService;
|
|
37
|
+
companionProfiles: CompanionProfileService;
|
|
38
|
+
sceneService: SceneService;
|
|
39
|
+
skillService: SkillService;
|
|
40
|
+
workspaceService: WorkspaceService;
|
|
41
|
+
runtimeBindings: RuntimeBindingService;
|
|
42
|
+
workspaceSessions: WorkspaceSessionService;
|
|
43
|
+
companionInvocation: CompanionInvocationService;
|
|
44
|
+
companionChildAgents: CompanionChildAgentService;
|
|
45
|
+
groupOrchestrator: GroupChatOrchestrator;
|
|
46
|
+
groupExecution: GroupChatExecutionService;
|
|
47
|
+
memoryRetriever: MemoryRetriever;
|
|
48
|
+
contextAssembler: ContextAssembler;
|
|
49
|
+
orchestrator: AgentOrchestrator;
|
|
50
|
+
logger: import("@deepseek-ai/cordis").Logger;
|
|
51
|
+
}>;
|
|
52
|
+
//# sourceMappingURL=create-services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-services.d.ts","sourceRoot":"","sources":["../../src/bootstrap/create-services.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,eAAe,E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E,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;GA0FrI"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { CharacterService } from '../core/character-service.js';
|
|
2
|
+
import { AuditService } from '../core/audit-service.js';
|
|
3
|
+
import { ImportService } from '../import/import-service.js';
|
|
4
|
+
import { SubagentGateway } from '../infrastructure/dsh/subagent/subagent-gateway.js';
|
|
5
|
+
import { SessionAgentProvider } from '../infrastructure/dsh/session/session-agent-provider.js';
|
|
6
|
+
import { RelationshipService } from '../application/relationship/relationship-service.js';
|
|
7
|
+
import { RelationshipEventService } from '../application/relationship/relationship-event-service.js';
|
|
8
|
+
import { RelationshipProjection } from '../application/relationship/relationship-projection.js';
|
|
9
|
+
import { MemoryService } from '../application/memory/memory-service.js';
|
|
10
|
+
import { CompanionProfileService } from '../application/companion/companion-profile-service.js';
|
|
11
|
+
import { SceneService } from '../core/scene-service.js';
|
|
12
|
+
import { SkillService } from '../core/skill-service.js';
|
|
13
|
+
import { WorkspaceService } from '../application/workspace/workspace-service.js';
|
|
14
|
+
import { RuntimeBindingService } from '../core/runtime-binding-service.js';
|
|
15
|
+
import { WorkspaceSessionService } from '../core/workspace-session-service.js';
|
|
16
|
+
import { CompanionInvocationService } from '../application/companion/companion-invocation-service.js';
|
|
17
|
+
import { CompanionChildAgentService } from '../application/companion/companion-child-service.js';
|
|
18
|
+
import { GroupChatOrchestrator } from '../application/group-chat/group-chat-orchestrator.js';
|
|
19
|
+
import { GroupChatExecutionService } from '../application/group-chat/group-chat-execution-service.js';
|
|
20
|
+
import { MemoryRetriever } from '../application/memory/memory-retriever.js';
|
|
21
|
+
import { ContextAssembler } from '../core/context-assembler.js';
|
|
22
|
+
import { AgentOrchestrator } from '../application/companion/agent-orchestrator.js';
|
|
23
|
+
import { createCompanionRuntime } from './create-runtime.js';
|
|
24
|
+
export async function createTavernServices(ctx, repos, _workspacePath, lifecycle) {
|
|
25
|
+
// 种子角色(幂等):若 elaine 不存在则创建。
|
|
26
|
+
const characterService = new CharacterService(repos.characters);
|
|
27
|
+
await characterService.seed();
|
|
28
|
+
// 角色卡导入(阶段 3):artifacts 保存原始资产,内嵌世界书写入 lorebooks 表。
|
|
29
|
+
const importService = new ImportService(repos.characters, repos.artifacts, repos.lorebooks);
|
|
30
|
+
// 适配器层:唯一的 ctx.subagents / ctx.tools / 会话 Agent 访问通道。
|
|
31
|
+
const gateway = new SubagentGateway(ctx);
|
|
32
|
+
const sessionAgentProvider = new SessionAgentProvider(ctx);
|
|
33
|
+
// 阶段 5.4:审计服务(audit_logs 表,诚信底座;先于各写服务构造)。
|
|
34
|
+
const auditService = new AuditService(repos.auditLogs);
|
|
35
|
+
// 阶段 5.1:关系图谱服务(骨架)。关系值写入仅由后续子阶段接入
|
|
36
|
+
// (user/tool/system/game-rule 来源);此处只登记 summon 节点。
|
|
37
|
+
const relationshipService = new RelationshipService(repos.relationshipNodes, repos.relationshipEdges, auditService);
|
|
38
|
+
// 阶段 5.2:独立记忆服务(memories 表 + 关系联动)。
|
|
39
|
+
const relationshipEventService = new RelationshipEventService(repos.relationshipEvents, auditService);
|
|
40
|
+
const relationshipProjection = new RelationshipProjection(relationshipEventService, relationshipService);
|
|
41
|
+
const memoryService = new MemoryService(repos.memories, relationshipService, auditService, relationshipEventService, relationshipProjection);
|
|
42
|
+
const companionProfiles = new CompanionProfileService(repos.companionProfiles, auditService, relationshipService);
|
|
43
|
+
// 阶段 5.3:场景服务(scenes + scene_participants 表)。
|
|
44
|
+
const sceneService = new SceneService(repos.scenes, repos.sceneParticipants, auditService);
|
|
45
|
+
const skillService = new SkillService(repos.companionSkills, repos.companionProfiles, auditService);
|
|
46
|
+
const workspaceService = new WorkspaceService(repos.workspaces, repos.workspaceMembers, repos.workspacePolicies, repos.workspaceSceneBindings, sceneService, auditService);
|
|
47
|
+
const runtimeBindings = new RuntimeBindingService(repos.runtimeBindings, auditService);
|
|
48
|
+
const workspaceSessions = new WorkspaceSessionService(repos.workspaceSessionBindings);
|
|
49
|
+
// 阶段 5 收尾:过期 RuntimeBinding 租约回收(Host 生命周期内周期性执行,unref 不阻止退出)。
|
|
50
|
+
const reclaimTimer = lifecycle.setInterval(() => {
|
|
51
|
+
void runtimeBindings.reclaimExpired().then(reclaimed => {
|
|
52
|
+
if (reclaimed > 0)
|
|
53
|
+
ctx.logger.info(`[Tavern] 回收过期 RuntimeBinding:${reclaimed} 个`);
|
|
54
|
+
}).catch(error => {
|
|
55
|
+
ctx.logger.warn(`[Tavern] RuntimeBinding 回收异常:${error instanceof Error ? error.message : String(error)}`);
|
|
56
|
+
});
|
|
57
|
+
}, 60_000);
|
|
58
|
+
if (reclaimTimer !== undefined && typeof reclaimTimer.unref === 'function')
|
|
59
|
+
reclaimTimer.unref();
|
|
60
|
+
// Runtime 选择集中在 bootstrap;应用服务只依赖 CompanionRuntime 接口。
|
|
61
|
+
const companionRuntime = createCompanionRuntime({
|
|
62
|
+
...(process.env.TAVERN_COMPANION_RUNTIME === undefined ? {} : { kind: process.env.TAVERN_COMPANION_RUNTIME }),
|
|
63
|
+
...(process.env.TAVERN_LANGGRAPH_URL === undefined ? {} : { langGraphUrl: process.env.TAVERN_LANGGRAPH_URL }),
|
|
64
|
+
...(process.env.TAVERN_LANGGRAPH_TOKEN === undefined ? {} : { langGraphToken: process.env.TAVERN_LANGGRAPH_TOKEN }),
|
|
65
|
+
});
|
|
66
|
+
const companionInvocation = new CompanionInvocationService(repos.companionProfiles, runtimeBindings, workspaceService, sceneService, companionRuntime, memoryService, (owner, profileId, sceneId) => companionProfiles.listCompanionRelationships(owner, profileId, sceneId));
|
|
67
|
+
const companionChildAgents = new CompanionChildAgentService(runtimeBindings, gateway);
|
|
68
|
+
const groupDeps = { threads: repos.groupThreads, messages: repos.groupMessages, batches: repos.groupDeliveryBatches, deliveries: repos.groupDeliveries, decisions: repos.schedulingDecisions, workspaces: workspaceService, profiles: companionProfiles, scenes: sceneService };
|
|
69
|
+
const groupOrchestrator = new GroupChatOrchestrator(groupDeps);
|
|
70
|
+
const groupExecution = new GroupChatExecutionService(groupDeps, groupOrchestrator, companionInvocation);
|
|
71
|
+
// 统一混合记忆检索只用于 Tavern 内部上下文组装,不注册为 DSH Tool。
|
|
72
|
+
const memoryRetriever = new MemoryRetriever(repos.memories);
|
|
73
|
+
// 阶段 4 + 5.2 + 3-M6:上下文组装器走统一混合记忆检索(query=本轮用户消息)。
|
|
74
|
+
const contextAssembler = new ContextAssembler(repos.characters, repos.lorebooks, memoryRetriever);
|
|
75
|
+
const logger = ctx.logger('tavern');
|
|
76
|
+
const orchestrator = new AgentOrchestrator(characterService, gateway, sessionAgentProvider, repos.instances, contextAssembler, relationshipService, sceneService, auditService, logger);
|
|
77
|
+
return { characterService, importService, gateway, sessionAgentProvider, auditService, relationshipService, relationshipEventService, relationshipProjection, memoryService, companionProfiles, sceneService, skillService, workspaceService, runtimeBindings, workspaceSessions, companionInvocation, companionChildAgents, groupOrchestrator, groupExecution, memoryRetriever, contextAssembler, orchestrator, logger };
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=create-services.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-services.js","sourceRoot":"","sources":["../../src/bootstrap/create-services.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAA;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yDAAyD,CAAA;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAA;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAA;AACpG,OAAO,EAAE,sBAAsB,EAAE,MAAM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