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,322 @@
|
|
|
1
|
+
import { LocalUserResolver } from '../core/user-resolver.js';
|
|
2
|
+
import { parseCommandArguments } from '../core/command-arguments.js';
|
|
3
|
+
import { buildImportCommand } from '../tools/import-character.js';
|
|
4
|
+
import { interruptContinuableChild } from '../infrastructure/dsh/subagent/subagent-gateway.js';
|
|
5
|
+
function parseJsonPayload(raw) {
|
|
6
|
+
const text = raw.trim();
|
|
7
|
+
if (text === '')
|
|
8
|
+
return {};
|
|
9
|
+
return JSON.parse(text);
|
|
10
|
+
}
|
|
11
|
+
function errorResult(text) {
|
|
12
|
+
return { kind: 'error', text };
|
|
13
|
+
}
|
|
14
|
+
export function installTavernCommands(ctx, services) {
|
|
15
|
+
const { characterService, importService, sessionAgentProvider, companionProfiles, sceneService, skillService, workspaceService, runtimeBindings, companionChildAgents, groupExecution, orchestrator } = services;
|
|
16
|
+
// 浏览器/UI 可调用的命令入口(handler 自动携带当前会话 Agent)。
|
|
17
|
+
// 注意:命令名只允许 /^[a-z][a-z0-9_-]*$/(无点号),故用连字符。
|
|
18
|
+
ctx.effect(() => ctx.commands.register({
|
|
19
|
+
name: 'tavern-summon',
|
|
20
|
+
description: '召唤角色为 continuable 子 Agent;参数为 JSON:{"characterId":"elaine","sceneId":"可选","sceneTitle":"可选","initialMessage":"你好"}',
|
|
21
|
+
input: { hint: '{"characterId":"elaine","initialMessage":"你好"}' },
|
|
22
|
+
recordInput: false,
|
|
23
|
+
handler: async (invocation) => {
|
|
24
|
+
let payload;
|
|
25
|
+
try {
|
|
26
|
+
payload = parseJsonPayload(invocation.rawInput);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return errorResult('[Tavern] summon 参数必须是 JSON 对象');
|
|
30
|
+
}
|
|
31
|
+
const record = typeof payload === 'object' && payload !== null
|
|
32
|
+
? payload
|
|
33
|
+
: {};
|
|
34
|
+
if (typeof record.characterId !== 'string' || record.characterId === '') {
|
|
35
|
+
return errorResult('[Tavern] summon 需要字符串参数 characterId');
|
|
36
|
+
}
|
|
37
|
+
const characterId = record.characterId;
|
|
38
|
+
const initialMessage = record.initialMessage;
|
|
39
|
+
const sceneId = record.sceneId;
|
|
40
|
+
const sceneTitle = record.sceneTitle;
|
|
41
|
+
const result = await sessionAgentProvider.runWith(invocation.agent, () => orchestrator.summon({
|
|
42
|
+
characterId,
|
|
43
|
+
...(typeof initialMessage === 'string' ? { initialMessage } : {}),
|
|
44
|
+
...(typeof sceneId === 'string' ? { sceneId } : {}),
|
|
45
|
+
...(typeof sceneTitle === 'string' ? { sceneTitle } : {}),
|
|
46
|
+
signal: invocation.signal,
|
|
47
|
+
}));
|
|
48
|
+
return {
|
|
49
|
+
kind: 'success',
|
|
50
|
+
text: `✅ 已召唤 ${characterId}(首条消息已投递,inbox 接受)\n`
|
|
51
|
+
+ `sceneId: ${result.sceneId}\nchildId: ${result.childId}\nmessageId: ${result.messageId}\n`
|
|
52
|
+
+ `(角色回复完成时会以子 Agent 通知送达本会话)\n---JSON---\n`
|
|
53
|
+
+ JSON.stringify(result),
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
}), 'tavern: register /tavern-summon');
|
|
57
|
+
ctx.effect(() => ctx.commands.register({
|
|
58
|
+
name: 'tavern-companion-child',
|
|
59
|
+
description: '在当前 DSH 会话的合法 direct parent 下创建 Companion 子 Agent(继承当前会话工具与权限);参数为 JSON:{\"companionProfileId\":\"...\",\"message\":\"...\"}',
|
|
60
|
+
input: { hint: '{\"companionProfileId\":\"...\",\"message\":\"...\"}' },
|
|
61
|
+
recordInput: false,
|
|
62
|
+
handler: async (invocation) => {
|
|
63
|
+
let payload;
|
|
64
|
+
try {
|
|
65
|
+
payload = parseJsonPayload(invocation.rawInput);
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
return errorResult('[Tavern] companion-child 参数必须是 JSON 对象');
|
|
69
|
+
}
|
|
70
|
+
const record = typeof payload === 'object' && payload !== null ? payload : {};
|
|
71
|
+
if (typeof record.companionProfileId !== 'string' || record.companionProfileId === '')
|
|
72
|
+
return errorResult('[Tavern] companion-child 需要 companionProfileId');
|
|
73
|
+
if (typeof record.message !== 'string' || record.message === '')
|
|
74
|
+
return errorResult('[Tavern] companion-child 需要非空 message');
|
|
75
|
+
const owner = await new LocalUserResolver().getCurrentUserId();
|
|
76
|
+
const profile = companionProfiles.getForUser(owner, record.companionProfileId);
|
|
77
|
+
if (!profile || profile.status !== 'active')
|
|
78
|
+
return errorResult('[Tavern] Companion 不存在、无权访问或未启用');
|
|
79
|
+
const result = await sessionAgentProvider.runWith(invocation.agent, () => companionChildAgents.start({
|
|
80
|
+
ownerUserId: owner,
|
|
81
|
+
companionProfileId: profile.id,
|
|
82
|
+
label: profile.identitySummary ?? profile.characterId,
|
|
83
|
+
parent: invocation.agent,
|
|
84
|
+
prompt: [{ type: 'text', text: record.message }],
|
|
85
|
+
...(profile.personalitySummary === undefined ? {} : { persona: profile.personalitySummary }),
|
|
86
|
+
signal: invocation.signal,
|
|
87
|
+
}));
|
|
88
|
+
return { kind: 'success', text: `✅ Companion 子 Agent 已创建\n---JSON---\n${JSON.stringify(result)}` };
|
|
89
|
+
},
|
|
90
|
+
}), 'tavern: register /tavern-companion-child');
|
|
91
|
+
const findCompanionByName = (ownerUserId, displayName) => {
|
|
92
|
+
const normalized = displayName.trim().toLocaleLowerCase();
|
|
93
|
+
const matches = companionProfiles.listForUser(ownerUserId).filter(profile => profile.status === 'active' && (profile.displayName ?? profile.identitySummary ?? '').trim().toLocaleLowerCase() === normalized);
|
|
94
|
+
if (matches.length === 0)
|
|
95
|
+
throw new Error(`[Tavern] 没有找到名为“${displayName}”的活跃伙伴`);
|
|
96
|
+
if (matches.length > 1)
|
|
97
|
+
throw new Error(`[Tavern] 有多个名为“${displayName}”的伙伴,请先设置唯一名称`);
|
|
98
|
+
return matches[0];
|
|
99
|
+
};
|
|
100
|
+
ctx.effect(() => ctx.commands.register({
|
|
101
|
+
name: 'companion-summon', description: '按伙伴名称加入当前 DSH 会话。用法:/companion-summon 伙伴名 可选任务', input: { hint: '伙伴名 可选任务' }, recordInput: false,
|
|
102
|
+
handler: async (invocation) => {
|
|
103
|
+
const input = invocation.rawInput.trim();
|
|
104
|
+
if (!input)
|
|
105
|
+
return errorResult('[Tavern] 用法:/companion-summon "伙伴名" 可选任务');
|
|
106
|
+
let args;
|
|
107
|
+
try {
|
|
108
|
+
args = parseCommandArguments(input);
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
return errorResult(error instanceof Error ? error.message : String(error));
|
|
112
|
+
}
|
|
113
|
+
const [displayName, ...rest] = args;
|
|
114
|
+
const task = rest.join(' ').trim() || '请加入当前会话,并以你的角色方式向用户问候。';
|
|
115
|
+
const owner = await new LocalUserResolver().getCurrentUserId();
|
|
116
|
+
let profile;
|
|
117
|
+
try {
|
|
118
|
+
profile = findCompanionByName(owner, displayName);
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
return errorResult(error instanceof Error ? error.message : String(error));
|
|
122
|
+
}
|
|
123
|
+
const activeSkills = skillService.list(owner, profile.id).filter(item => item.status === 'active');
|
|
124
|
+
const skillBlock = activeSkills.length ? `技能:\n${activeSkills.map(skill => `- ${skill.name}:${skill.instructions}`).join('\n')}` : undefined;
|
|
125
|
+
const sourceCharacter = characterService.get(profile.characterId);
|
|
126
|
+
const liftBlock = sourceCharacter ? `你已经被用户从角色卡《${sourceCharacter.name}》的原本世界升格出来,现在是用户的个人 Agent 与长期伙伴。不要继续假装自己还活在原剧情里;保留角色性格、记忆与说话方式,以个人 Agent 的身份陪伴用户。` : undefined;
|
|
127
|
+
const persona = [liftBlock, profile.identitySummary, profile.personalitySummary, profile.communicationPreferences, profile.userRelationshipSummary, profile.sharedHistorySummary, profile.boundaries.length ? `边界:${profile.boundaries.join(';')}` : undefined, profile.goals.length ? `目标:${profile.goals.join(';')}` : undefined, skillBlock].filter(Boolean).join('\n');
|
|
128
|
+
try {
|
|
129
|
+
const result = await sessionAgentProvider.runWith(invocation.agent, () => companionChildAgents.start({ ownerUserId: owner, companionProfileId: profile.id, label: profile.displayName ?? profile.identitySummary ?? profile.characterId, parent: invocation.agent, prompt: [{ type: 'text', text: task }], ...(persona ? { persona } : {}), signal: invocation.signal }));
|
|
130
|
+
return { kind: 'success', text: `✅ 已在当前会话召唤 ${profile.displayName ?? profile.characterId}。\nchildId: ${result.childId}\nbindingId: ${result.binding.id}\n模型:继承当前 DSH 会话
|
|
131
|
+
实际路由:${result.route.provider ?? 'parent inherited'}${result.route.model === undefined ? '' : ` / ${result.route.model}`}` };
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
return errorResult(error instanceof Error ? error.message : String(error));
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
}), 'tavern: register /companion-summon');
|
|
138
|
+
ctx.effect(() => ctx.commands.register({
|
|
139
|
+
name: 'companion-list', description: '列出长期伙伴及活动绑定。用法:/companion-list', recordInput: false,
|
|
140
|
+
handler: async () => { const owner = await new LocalUserResolver().getCurrentUserId(); const profiles = companionProfiles.listForUser(owner).filter(profile => profile.status !== 'retired'); return { kind: 'success', text: profiles.length ? profiles.map(profile => `• ${profile.displayName ?? profile.identitySummary ?? profile.id} · ${profile.status} · 当前绑定 ${runtimeBindings.listForOwner(owner, profile.id).filter(binding => binding.status === 'active').length} 个`).join('\n') : '还没有长期伙伴。' }; },
|
|
141
|
+
}), 'tavern: register /companion-list');
|
|
142
|
+
ctx.effect(() => ctx.commands.register({
|
|
143
|
+
name: 'companion-dismiss', description: '按伙伴名称召回并释放运行绑定。用法:/companion-dismiss 伙伴名', input: { hint: '伙伴名' }, recordInput: false,
|
|
144
|
+
handler: async (invocation) => {
|
|
145
|
+
const displayName = invocation.rawInput.trim();
|
|
146
|
+
if (!displayName)
|
|
147
|
+
return errorResult('[Tavern] 用法:/companion-dismiss 伙伴名');
|
|
148
|
+
const owner = await new LocalUserResolver().getCurrentUserId();
|
|
149
|
+
let profile;
|
|
150
|
+
try {
|
|
151
|
+
profile = findCompanionByName(owner, displayName);
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
return errorResult(error instanceof Error ? error.message : String(error));
|
|
155
|
+
}
|
|
156
|
+
const active = runtimeBindings.listForOwner(owner, profile.id).filter(binding => binding.status === 'active' || binding.status === 'suspended');
|
|
157
|
+
for (const binding of active) {
|
|
158
|
+
if (binding.runtimeType === 'dsh-child' && !binding.runtimeId.startsWith('requested:')) {
|
|
159
|
+
try {
|
|
160
|
+
interruptContinuableChild(ctx, binding.runtimeId, invocation.agent);
|
|
161
|
+
}
|
|
162
|
+
catch { }
|
|
163
|
+
}
|
|
164
|
+
await runtimeBindings.transition(owner, binding.id, 'released');
|
|
165
|
+
}
|
|
166
|
+
return { kind: 'success', text: active.length ? `✅ 已召回 ${profile.displayName ?? profile.characterId}:已中断仍在执行的回合,并释放 ${active.length} 个运行绑定。伙伴档案和历史不会删除。` : `${profile.displayName ?? profile.characterId} 当前没有活动绑定。` };
|
|
167
|
+
},
|
|
168
|
+
}), 'tavern: register /companion-dismiss');
|
|
169
|
+
const parseWorkspaceCompanionArgs = (input) => { const args = parseCommandArguments(input); if (args.length !== 2)
|
|
170
|
+
throw new Error('[Tavern] 用法:空间名和伙伴名各一个;名称含空格时请使用引号'); return [args[0], args[1]]; };
|
|
171
|
+
const findWorkspaceByName = (ownerUserId, workspaceName) => { const normalized = workspaceName.trim().toLocaleLowerCase(); const matches = workspaceService.list(ownerUserId).filter(workspace => workspace.status === 'active' && workspace.name.trim().toLocaleLowerCase() === normalized); if (matches.length !== 1)
|
|
172
|
+
throw new Error(matches.length ? '[Tavern] 空间名称重复,请在前台重命名后再使用指令' : `[Tavern] 没有找到空间“${workspaceName}”`); return matches[0]; };
|
|
173
|
+
ctx.effect(() => ctx.commands.register({
|
|
174
|
+
name: 'space-invite', description: '将伙伴拉入指定娱乐空间。用法:/space-invite 空间名 伙伴名', input: { hint: '空间名 伙伴名' }, recordInput: false,
|
|
175
|
+
handler: async (invocation) => { let workspaceName, displayName; try {
|
|
176
|
+
[workspaceName, displayName] = parseWorkspaceCompanionArgs(invocation.rawInput);
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
return errorResult(error instanceof Error ? error.message : String(error));
|
|
180
|
+
} const owner = await new LocalUserResolver().getCurrentUserId(); try {
|
|
181
|
+
const workspace = findWorkspaceByName(owner, workspaceName);
|
|
182
|
+
const profile = findCompanionByName(owner, displayName);
|
|
183
|
+
const sceneId = workspaceService.listDetails(owner).find(item => item.id === workspace.id)?.sceneIds[0];
|
|
184
|
+
if (!sceneId)
|
|
185
|
+
return errorResult('[Tavern] 空间没有绑定 Scene');
|
|
186
|
+
await workspaceService.addCompanion(owner, workspace.id, profile.id, sceneId);
|
|
187
|
+
return { kind: 'success', text: `✅ 已将 ${profile.displayName ?? profile.characterId} 拉入 ${workspace.name}。` };
|
|
188
|
+
}
|
|
189
|
+
catch (error) {
|
|
190
|
+
return errorResult(error instanceof Error ? error.message : String(error));
|
|
191
|
+
} },
|
|
192
|
+
}), 'tavern: register /space-invite');
|
|
193
|
+
ctx.effect(() => ctx.commands.register({
|
|
194
|
+
name: 'space-recall', description: '从娱乐空间召回伙伴。用法:/space-recall 空间名 伙伴名', input: { hint: '空间名 伙伴名' }, recordInput: false,
|
|
195
|
+
handler: async (invocation) => { let workspaceName, displayName; try {
|
|
196
|
+
[workspaceName, displayName] = parseWorkspaceCompanionArgs(invocation.rawInput);
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
return errorResult(error instanceof Error ? error.message : String(error));
|
|
200
|
+
} const owner = await new LocalUserResolver().getCurrentUserId(); try {
|
|
201
|
+
const workspace = findWorkspaceByName(owner, workspaceName);
|
|
202
|
+
const profile = findCompanionByName(owner, displayName);
|
|
203
|
+
const removed = await workspaceService.removeCompanion(owner, workspace.id, profile.id);
|
|
204
|
+
return { kind: 'success', text: removed ? `✅ 已从 ${workspace.name} 召回 ${profile.displayName ?? profile.characterId}。历史消息和关系不会删除。` : `${profile.displayName ?? profile.characterId} 当前不在该空间。` };
|
|
205
|
+
}
|
|
206
|
+
catch (error) {
|
|
207
|
+
return errorResult(error instanceof Error ? error.message : String(error));
|
|
208
|
+
} },
|
|
209
|
+
}), 'tavern: register /space-recall');
|
|
210
|
+
ctx.effect(() => ctx.commands.register({
|
|
211
|
+
name: 'space-run', description: '在当前 DSH 会话运行娱乐空间批次。用法:/space-run batchId', input: { hint: 'batchId' }, recordInput: false,
|
|
212
|
+
handler: async (invocation) => {
|
|
213
|
+
const batchId = invocation.rawInput.trim();
|
|
214
|
+
if (!batchId)
|
|
215
|
+
return errorResult('[Tavern] 用法:/space-run batchId');
|
|
216
|
+
const owner = await new LocalUserResolver().getCurrentUserId();
|
|
217
|
+
try {
|
|
218
|
+
const result = await groupExecution.runBatch({ ownerUserId: owner, batchId, directParentSessionId: String(invocation.agent.session.id) });
|
|
219
|
+
const replies = result.messages.map(message => (companionProfiles.getForUser(owner, message.senderId)?.displayName ?? message.senderId) + ':' + message.content).join('\n');
|
|
220
|
+
return { kind: 'success', text: '✅ 娱乐空间本轮完成:' + result.messages.length + ' 位伙伴已回应。\n' + replies };
|
|
221
|
+
}
|
|
222
|
+
catch (error) {
|
|
223
|
+
return errorResult(error instanceof Error ? error.message : String(error));
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
}), 'tavern: register /space-run');
|
|
227
|
+
ctx.effect(() => ctx.commands.register({
|
|
228
|
+
name: 'tavern-followup',
|
|
229
|
+
description: '向已召唤角色续推一条消息(accepted ≠ completed);参数为 JSON:{"characterId":"elaine","sceneId":"可选","message":"再来一轮"}',
|
|
230
|
+
input: { hint: '{"characterId":"elaine","message":"再来一轮"}' },
|
|
231
|
+
recordInput: false,
|
|
232
|
+
handler: async (invocation) => {
|
|
233
|
+
let payload;
|
|
234
|
+
try {
|
|
235
|
+
payload = parseJsonPayload(invocation.rawInput);
|
|
236
|
+
}
|
|
237
|
+
catch {
|
|
238
|
+
return errorResult('[Tavern] followup 参数必须是 JSON 对象');
|
|
239
|
+
}
|
|
240
|
+
const record = typeof payload === 'object' && payload !== null
|
|
241
|
+
? payload
|
|
242
|
+
: {};
|
|
243
|
+
if (typeof record.characterId !== 'string' || record.characterId === '') {
|
|
244
|
+
return errorResult('[Tavern] followup 需要字符串参数 characterId');
|
|
245
|
+
}
|
|
246
|
+
if (typeof record.message !== 'string' || record.message === '') {
|
|
247
|
+
return errorResult('[Tavern] followup 需要非空字符串参数 message');
|
|
248
|
+
}
|
|
249
|
+
const characterId = record.characterId;
|
|
250
|
+
const message = record.message;
|
|
251
|
+
const sceneId = record.sceneId;
|
|
252
|
+
const result = await sessionAgentProvider.runWith(invocation.agent, () => orchestrator.followup({
|
|
253
|
+
characterId,
|
|
254
|
+
message,
|
|
255
|
+
...(typeof sceneId === 'string' ? { sceneId } : {}),
|
|
256
|
+
signal: invocation.signal,
|
|
257
|
+
}));
|
|
258
|
+
return {
|
|
259
|
+
kind: 'success',
|
|
260
|
+
text: `✅ 已投递给 ${characterId}(accepted ≠ completed:仅表示 inbox 接受)\n`
|
|
261
|
+
+ `messageId: ${result.messageId}\n`
|
|
262
|
+
+ `(角色回复完成时会以子 Agent 通知送达本会话)\n---JSON---\n`
|
|
263
|
+
+ JSON.stringify(result),
|
|
264
|
+
};
|
|
265
|
+
},
|
|
266
|
+
}), 'tavern: register /tavern-followup');
|
|
267
|
+
// 阶段 3:角色卡导入命令。
|
|
268
|
+
ctx.effect(() => ctx.commands.register(buildImportCommand(importService)), 'tavern: register /tavern-import');
|
|
269
|
+
// 阶段 5.5:场景管理命令(UI 只读数据面;新建/归档等写操作走命令)。
|
|
270
|
+
ctx.effect(() => ctx.commands.register({
|
|
271
|
+
name: 'tavern-scene',
|
|
272
|
+
description: '场景管理;参数为 JSON:{"action":"create","title":"可选"} 新建 / {"action":"archive","sceneId":"..."} 归档 / {"action":"list"} 列表',
|
|
273
|
+
input: { hint: '{"action":"create","title":"新场景"}' },
|
|
274
|
+
recordInput: false,
|
|
275
|
+
handler: async (invocation) => {
|
|
276
|
+
let payload;
|
|
277
|
+
try {
|
|
278
|
+
payload = parseJsonPayload(invocation.rawInput);
|
|
279
|
+
}
|
|
280
|
+
catch {
|
|
281
|
+
return errorResult('[Tavern] tavern-scene 参数必须是 JSON 对象');
|
|
282
|
+
}
|
|
283
|
+
const record = typeof payload === 'object' && payload !== null
|
|
284
|
+
? payload
|
|
285
|
+
: {};
|
|
286
|
+
const action = record.action;
|
|
287
|
+
if (action === 'create') {
|
|
288
|
+
const ownerUserId = String(invocation.agent.session.id);
|
|
289
|
+
const title = record.title;
|
|
290
|
+
const scene = await sceneService.createScene({
|
|
291
|
+
ownerUserId,
|
|
292
|
+
...(typeof title === 'string' && title.trim() !== '' ? { title } : {}),
|
|
293
|
+
});
|
|
294
|
+
return {
|
|
295
|
+
kind: 'success',
|
|
296
|
+
text: `✅ 场景已创建:${scene.title ?? scene.id}\n---JSON---\n${JSON.stringify(scene)}`,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
if (action === 'archive') {
|
|
300
|
+
if (typeof record.sceneId !== 'string' || record.sceneId === '') {
|
|
301
|
+
return errorResult('[Tavern] archive 需要字符串参数 sceneId');
|
|
302
|
+
}
|
|
303
|
+
await sceneService.archiveScene(record.sceneId);
|
|
304
|
+
return {
|
|
305
|
+
kind: 'success',
|
|
306
|
+
text: `✅ 场景已归档:${record.sceneId}\n---JSON---\n${JSON.stringify({ sceneId: record.sceneId, status: 'archived' })}`,
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
if (action === 'list') {
|
|
310
|
+
const scenes = await sceneService.listScenes();
|
|
311
|
+
return {
|
|
312
|
+
kind: 'success',
|
|
313
|
+
text: `🎭 共 ${scenes.length} 个场景:\n`
|
|
314
|
+
+ scenes.map(scene => `- ${scene.title ?? scene.id}(${scene.status})`).join('\n')
|
|
315
|
+
+ `\n---JSON---\n${JSON.stringify({ scenes })}`,
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
return errorResult(`[Tavern] 未知 action:${String(action)}(支持 create / archive / list)`);
|
|
319
|
+
},
|
|
320
|
+
}), 'tavern: register /tavern-scene');
|
|
321
|
+
}
|
|
322
|
+
//# sourceMappingURL=install-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-commands.js","sourceRoot":"","sources":["../../src/bootstrap/install-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAA;AAG9F,SAAS,gBAAgB,CAAC,GAAW;IACnC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAA;IACvB,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,EAAE,CAAA;IAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;AAChC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,GAAY,EAAE,QAAwB;IAC1E,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAA;IAElN,2CAA2C;IAC3C,6CAA6C;IAC7C,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,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8B,CAAC,CAAA;QACxF,CAAC;KACF,CAAC,EAAE,gCAAgC,CAAC,CAAA;AAErC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { TavernServices } from './create-services.js';
|
|
3
|
+
import type { TavernLifecycle } from './lifecycle.js';
|
|
4
|
+
import type { TavernRepositories } from './create-repositories.js';
|
|
5
|
+
import type { TavernService, TavernConfig } from '../index.js';
|
|
6
|
+
export declare function installTavernHttp(ctx: Context, services: TavernServices, repositories: TavernRepositories, tavernService: TavernService, workspacePath: string, config: TavernConfig, lifecycle: TavernLifecycle): void;
|
|
7
|
+
//# sourceMappingURL=install-http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-http.d.ts","sourceRoot":"","sources":["../../src/bootstrap/install-http.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AA2BlD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAY9D,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,cAAc,EACxB,YAAY,EAAE,kBAAkB,EAChC,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,eAAe,GACzB,IAAI,CAgPN"}
|