@zhin.js/agent 1.1.7 → 1.1.9
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/README.md +15 -23
- package/lib/activity-feedback/adapter-integration.d.ts +1 -2
- package/lib/activity-feedback/adapter-integration.d.ts.map +1 -1
- package/lib/activity-feedback/adapter-integration.js +43 -13
- package/lib/activity-feedback/adapter-integration.js.map +1 -1
- package/lib/assistant/index.d.ts +1 -1
- package/lib/assistant/index.d.ts.map +1 -1
- package/lib/assistant/index.js +1 -1
- package/lib/assistant/index.js.map +1 -1
- package/lib/assistant/job-creator.d.ts +0 -7
- package/lib/assistant/job-creator.d.ts.map +1 -1
- package/lib/assistant/job-creator.js +1 -12
- package/lib/assistant/job-creator.js.map +1 -1
- package/lib/builtin/five-agent/index.d.ts +6 -3
- package/lib/builtin/five-agent/index.d.ts.map +1 -1
- package/lib/builtin/five-agent/index.js +6 -4
- package/lib/builtin/five-agent/index.js.map +1 -1
- package/lib/builtin/five-agent/prompts.d.ts +3 -3
- package/lib/builtin/five-agent/prompts.d.ts.map +1 -1
- package/lib/builtin/five-agent/prompts.js +3 -3
- package/lib/builtin/five-agent/prompts.js.map +1 -1
- package/lib/builtin/five-agent/role-capability-policy.d.ts +9 -0
- package/lib/builtin/five-agent/role-capability-policy.d.ts.map +1 -0
- package/lib/builtin/five-agent/role-capability-policy.js +22 -0
- package/lib/builtin/five-agent/role-capability-policy.js.map +1 -0
- package/lib/builtin/five-agent/roles.d.ts +5 -0
- package/lib/builtin/five-agent/roles.d.ts.map +1 -0
- package/lib/builtin/five-agent/roles.js +12 -0
- package/lib/builtin/five-agent/roles.js.map +1 -0
- package/lib/builtin/orchestration-tools.d.ts.map +1 -1
- package/lib/builtin/orchestration-tools.js +12 -38
- package/lib/builtin/orchestration-tools.js.map +1 -1
- package/lib/builtin/spawn-task-tool.js +2 -2
- package/lib/builtin/spawn-task-tool.js.map +1 -1
- package/lib/config/agent-interfaces.d.ts +2 -2
- package/lib/config/agent-interfaces.d.ts.map +1 -1
- package/lib/config/fix-ai-config.d.ts.map +1 -1
- package/lib/config/fix-ai-config.js +1 -38
- package/lib/config/fix-ai-config.js.map +1 -1
- package/lib/config/index.d.ts +1 -1
- package/lib/config/index.d.ts.map +1 -1
- package/lib/config/index.js +1 -1
- package/lib/config/index.js.map +1 -1
- package/lib/config/resolve-five-agent-binding.d.ts +10 -0
- package/lib/config/resolve-five-agent-binding.d.ts.map +1 -0
- package/lib/config/resolve-five-agent-binding.js +31 -0
- package/lib/config/resolve-five-agent-binding.js.map +1 -0
- package/lib/context/context-system.d.ts +2 -2
- package/lib/context/context-system.d.ts.map +1 -1
- package/lib/context/context-system.js +2 -3
- package/lib/context/context-system.js.map +1 -1
- package/lib/context/context-tail-limit.d.ts +0 -2
- package/lib/context/context-tail-limit.d.ts.map +1 -1
- package/lib/context/context-tail-limit.js +1 -3
- package/lib/context/context-tail-limit.js.map +1 -1
- package/lib/context/default-builders.d.ts +0 -4
- package/lib/context/default-builders.d.ts.map +1 -1
- package/lib/context/default-builders.js +0 -14
- package/lib/context/default-builders.js.map +1 -1
- package/lib/context/envelope-parts.d.ts +0 -1
- package/lib/context/envelope-parts.d.ts.map +1 -1
- package/lib/context/index.d.ts +2 -2
- package/lib/context/index.d.ts.map +1 -1
- package/lib/context/index.js +2 -2
- package/lib/context/index.js.map +1 -1
- package/lib/context/turn-envelope.d.ts +0 -1
- package/lib/context/turn-envelope.d.ts.map +1 -1
- package/lib/context/turn-envelope.js +0 -2
- package/lib/context/turn-envelope.js.map +1 -1
- package/lib/core/agent-loop-standalone.d.ts +2 -1
- package/lib/core/agent-loop-standalone.d.ts.map +1 -1
- package/lib/core/agent-loop-standalone.js.map +1 -1
- package/lib/event/agent-stream-bus.d.ts +0 -1
- package/lib/event/agent-stream-bus.d.ts.map +1 -1
- package/lib/event/agent-stream-bus.js.map +1 -1
- package/lib/event/publish-agent-stream.js +2 -2
- package/lib/event/publish-agent-stream.js.map +1 -1
- package/lib/event/turn-event.d.ts +11 -1
- package/lib/event/turn-event.d.ts.map +1 -1
- package/lib/event/turn-event.js.map +1 -1
- package/lib/index.d.ts +13 -21
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -15
- package/lib/index.js.map +1 -1
- package/lib/init/activate-ai-database-storage.d.ts +2 -2
- package/lib/init/activate-ai-database-storage.d.ts.map +1 -1
- package/lib/init/activate-ai-database-storage.js +1 -3
- package/lib/init/activate-ai-database-storage.js.map +1 -1
- package/lib/init/define-ai-database-models.d.ts +1 -1
- package/lib/init/define-ai-database-models.d.ts.map +1 -1
- package/lib/init/define-ai-database-models.js +1 -9
- package/lib/init/define-ai-database-models.js.map +1 -1
- package/lib/init/runtime-management-commands.d.ts +2 -3
- package/lib/init/runtime-management-commands.d.ts.map +1 -1
- package/lib/init/runtime-management-commands.js +6 -6
- package/lib/init/runtime-management-commands.js.map +1 -1
- package/lib/internal/agent-host.d.ts +2 -3
- package/lib/internal/agent-host.d.ts.map +1 -1
- package/lib/internal/host-types.d.ts +0 -28
- package/lib/internal/host-types.d.ts.map +1 -1
- package/lib/memory/context-repository-store.js +1 -1
- package/lib/memory/context-repository-store.js.map +1 -1
- package/lib/memory/memory-system.d.ts +1 -2
- package/lib/memory/memory-system.d.ts.map +1 -1
- package/lib/memory/memory-system.js +1 -3
- package/lib/memory/memory-system.js.map +1 -1
- package/lib/orchestrator/bootstrap-executors.d.ts +0 -4
- package/lib/orchestrator/bootstrap-executors.d.ts.map +1 -1
- package/lib/orchestrator/bootstrap-executors.js +11 -137
- package/lib/orchestrator/bootstrap-executors.js.map +1 -1
- package/lib/orchestrator/orchestration-mappers.d.ts +1 -1
- package/lib/orchestrator/orchestration-mappers.d.ts.map +1 -1
- package/lib/orchestrator/orchestration-mappers.js +4 -49
- package/lib/orchestrator/orchestration-mappers.js.map +1 -1
- package/lib/orchestrator/orchestration-service.d.ts.map +1 -1
- package/lib/orchestrator/orchestration-service.js +2 -5
- package/lib/orchestrator/orchestration-service.js.map +1 -1
- package/lib/orchestrator/orchestration-source.d.ts +5 -0
- package/lib/orchestrator/orchestration-source.d.ts.map +1 -0
- package/lib/orchestrator/orchestration-source.js +22 -0
- package/lib/orchestrator/orchestration-source.js.map +1 -0
- package/lib/outbound/send-proactive.d.ts +3 -13
- package/lib/outbound/send-proactive.d.ts.map +1 -1
- package/lib/outbound/send-proactive.js +1 -53
- package/lib/outbound/send-proactive.js.map +1 -1
- package/lib/plugin-runtime/agent-host-port.d.ts +12 -3
- package/lib/plugin-runtime/agent-host-port.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-host-port.js +1 -1
- package/lib/plugin-runtime/agent-host-port.js.map +1 -1
- package/lib/plugin-runtime/agent-runtime.d.ts +7 -4
- package/lib/plugin-runtime/agent-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-runtime.js +3 -2
- package/lib/plugin-runtime/agent-runtime.js.map +1 -1
- package/lib/plugin-runtime/capability-tools.d.ts.map +1 -1
- package/lib/plugin-runtime/capability-tools.js +3 -0
- package/lib/plugin-runtime/capability-tools.js.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.d.ts +1 -0
- package/lib/plugin-runtime/deferred-capability-plan.d.ts.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.js +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.js.map +1 -1
- package/lib/plugin-runtime/full-agent-turn-engine.d.ts.map +1 -1
- package/lib/plugin-runtime/full-agent-turn-engine.js +102 -0
- package/lib/plugin-runtime/full-agent-turn-engine.js.map +1 -1
- package/lib/plugin-runtime/host-mcp-projection.d.ts.map +1 -1
- package/lib/plugin-runtime/host-mcp-projection.js +17 -2
- package/lib/plugin-runtime/host-mcp-projection.js.map +1 -1
- package/lib/plugin-runtime/schedule-capability-plan.d.ts +20 -0
- package/lib/plugin-runtime/schedule-capability-plan.d.ts.map +1 -0
- package/lib/plugin-runtime/schedule-capability-plan.js +88 -0
- package/lib/plugin-runtime/schedule-capability-plan.js.map +1 -0
- package/lib/prompt/assembly.d.ts.map +1 -1
- package/lib/prompt/assembly.js +2 -0
- package/lib/prompt/assembly.js.map +1 -1
- package/lib/prompt/index.d.ts +5 -1
- package/lib/prompt/index.d.ts.map +1 -1
- package/lib/prompt/index.js +3 -1
- package/lib/prompt/index.js.map +1 -1
- package/lib/prompt/prompt-assembly-registry.d.ts +25 -0
- package/lib/prompt/prompt-assembly-registry.d.ts.map +1 -0
- package/lib/prompt/prompt-assembly-registry.js +43 -0
- package/lib/prompt/prompt-assembly-registry.js.map +1 -0
- package/lib/prompt/prompt-budget.d.ts +9 -0
- package/lib/prompt/prompt-budget.d.ts.map +1 -0
- package/lib/prompt/prompt-budget.js +28 -0
- package/lib/prompt/prompt-budget.js.map +1 -0
- package/lib/prompt/prompt-builder.js +1 -1
- package/lib/prompt/prompt-builder.js.map +1 -1
- package/lib/prompt/system-prompt.d.ts +5 -8
- package/lib/prompt/system-prompt.d.ts.map +1 -1
- package/lib/prompt/system-prompt.js +159 -78
- package/lib/prompt/system-prompt.js.map +1 -1
- package/lib/prompt/tokens.d.ts +8 -0
- package/lib/prompt/tokens.d.ts.map +1 -0
- package/lib/prompt/tokens.js +2 -0
- package/lib/prompt/tokens.js.map +1 -0
- package/lib/prompt/turn-prompt-profile.d.ts +1 -2
- package/lib/prompt/turn-prompt-profile.d.ts.map +1 -1
- package/lib/schedule-domain/audit-logger.d.ts +2 -2
- package/lib/schedule-domain/audit-logger.d.ts.map +1 -1
- package/lib/schedule-domain/execution-domain.d.ts +21 -17
- package/lib/schedule-domain/execution-domain.d.ts.map +1 -1
- package/lib/schedule-domain/execution-domain.js +41 -23
- package/lib/schedule-domain/execution-domain.js.map +1 -1
- package/lib/schedule-domain/index.d.ts +0 -1
- package/lib/schedule-domain/index.d.ts.map +1 -1
- package/lib/schedule-domain/index.js +0 -1
- package/lib/schedule-domain/index.js.map +1 -1
- package/lib/schedule-domain/prompt-assembler.d.ts +3 -4
- package/lib/schedule-domain/prompt-assembler.d.ts.map +1 -1
- package/lib/schedule-domain/prompt-assembler.js +0 -16
- package/lib/schedule-domain/prompt-assembler.js.map +1 -1
- package/lib/schedule-domain/security-harness.d.ts +10 -15
- package/lib/schedule-domain/security-harness.d.ts.map +1 -1
- package/lib/schedule-domain/security-harness.js +5 -78
- package/lib/schedule-domain/security-harness.js.map +1 -1
- package/lib/security/exec-policy.d.ts +2 -0
- package/lib/security/exec-policy.d.ts.map +1 -1
- package/lib/security/exec-policy.js +21 -0
- package/lib/security/exec-policy.js.map +1 -1
- package/lib/security/owner-approve-always-store.d.ts +8 -3
- package/lib/security/owner-approve-always-store.d.ts.map +1 -1
- package/lib/security/owner-approve-always-store.js +160 -173
- package/lib/security/owner-approve-always-store.js.map +1 -1
- package/lib/security/policy-facade.d.ts.map +1 -1
- package/lib/security/policy-facade.js +11 -1
- package/lib/security/policy-facade.js.map +1 -1
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +0 -7
- package/lib/service.js.map +1 -1
- package/lib/session/index.d.ts +3 -3
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +3 -3
- package/lib/session/index.js.map +1 -1
- package/lib/session/passive-group-session.js +1 -1
- package/lib/session/session-key.d.ts +4 -0
- package/lib/session/session-key.d.ts.map +1 -0
- package/lib/session/session-key.js +6 -0
- package/lib/session/session-key.js.map +1 -0
- package/lib/session/session-system.d.ts.map +1 -1
- package/lib/session/session-system.js +4 -4
- package/lib/session/session-system.js.map +1 -1
- package/lib/session/session-tree-commands.d.ts +2 -3
- package/lib/session/session-tree-commands.d.ts.map +1 -1
- package/lib/session/session-tree-commands.js +2 -5
- package/lib/session/session-tree-commands.js.map +1 -1
- package/lib/session/strategies.d.ts +1 -1
- package/lib/session/strategies.d.ts.map +1 -1
- package/lib/session/strategies.js +2 -2
- package/lib/session/strategies.js.map +1 -1
- package/lib/subagent/im-result-sink.d.ts.map +1 -1
- package/lib/subagent/im-result-sink.js +0 -1
- package/lib/subagent/im-result-sink.js.map +1 -1
- package/lib/subagent-goal-notify.d.ts +0 -9
- package/lib/subagent-goal-notify.d.ts.map +1 -1
- package/lib/subagent-goal-notify.js +0 -13
- package/lib/subagent-goal-notify.js.map +1 -1
- package/lib/task-executor.d.ts +14 -3
- package/lib/task-executor.d.ts.map +1 -1
- package/lib/task-executor.js +48 -61
- package/lib/task-executor.js.map +1 -1
- package/lib/tool/classic-tool-execution-authority.d.ts.map +1 -1
- package/lib/tool/classic-tool-execution-authority.js +4 -3
- package/lib/tool/classic-tool-execution-authority.js.map +1 -1
- package/lib/tool/prepare-turn-tools.d.ts +0 -2
- package/lib/tool/prepare-turn-tools.d.ts.map +1 -1
- package/lib/tool/prepare-turn-tools.js +1 -55
- package/lib/tool/prepare-turn-tools.js.map +1 -1
- package/lib/tool/tool-runtime.d.ts +1 -1
- package/lib/tool/tool-runtime.d.ts.map +1 -1
- package/lib/turn/auto-continue.js +1 -1
- package/lib/turn/auto-continue.js.map +1 -1
- package/lib/turn/persist-deferred-context.js +1 -1
- package/lib/turn/persist-deferred-context.js.map +1 -1
- package/lib/turn/persist-subagent-context.js +1 -1
- package/lib/turn/persist-subagent-context.js.map +1 -1
- package/lib/turn/process-stream.d.ts.map +1 -1
- package/lib/turn/process-stream.js +0 -2
- package/lib/turn/process-stream.js.map +1 -1
- package/lib/turn/turn-ingress.d.ts +21 -1
- package/lib/turn/turn-ingress.d.ts.map +1 -1
- package/lib/turn/turn-ingress.js +29 -0
- package/lib/turn/turn-ingress.js.map +1 -1
- package/lib/turn/turn-pipeline.d.ts +0 -5
- package/lib/turn/turn-pipeline.d.ts.map +1 -1
- package/lib/turn/turn-pipeline.js +12 -32
- package/lib/turn/turn-pipeline.js.map +1 -1
- package/lib/typing-indicator/adapter-integration.d.ts +1 -2
- package/lib/typing-indicator/adapter-integration.d.ts.map +1 -1
- package/lib/typing-indicator/adapter-integration.js.map +1 -1
- package/lib/typing-indicator/integration.d.ts +2 -3
- package/lib/typing-indicator/integration.d.ts.map +1 -1
- package/lib/typing-indicator/integration.js +48 -11
- package/lib/typing-indicator/integration.js.map +1 -1
- package/lib/zhin-agent/index.d.ts +5 -8
- package/lib/zhin-agent/index.d.ts.map +1 -1
- package/lib/zhin-agent/index.js +13 -15
- package/lib/zhin-agent/index.js.map +1 -1
- package/package.json +9 -9
- package/lib/aop/index.d.ts +0 -11
- package/lib/aop/index.d.ts.map +0 -1
- package/lib/aop/index.js +0 -11
- package/lib/aop/index.js.map +0 -1
- package/lib/aop/pipeline/index.d.ts +0 -12
- package/lib/aop/pipeline/index.d.ts.map +0 -1
- package/lib/aop/pipeline/index.js +0 -12
- package/lib/aop/pipeline/index.js.map +0 -1
- package/lib/aop/pipeline/pipeline-flow.d.ts +0 -25
- package/lib/aop/pipeline/pipeline-flow.d.ts.map +0 -1
- package/lib/aop/pipeline/pipeline-flow.js +0 -115
- package/lib/aop/pipeline/pipeline-flow.js.map +0 -1
- package/lib/aop/pipeline/pipeline-mode.d.ts +0 -10
- package/lib/aop/pipeline/pipeline-mode.d.ts.map +0 -1
- package/lib/aop/pipeline/pipeline-mode.js +0 -16
- package/lib/aop/pipeline/pipeline-mode.js.map +0 -1
- package/lib/aop/pipeline/pipeline-service.d.ts +0 -123
- package/lib/aop/pipeline/pipeline-service.d.ts.map +0 -1
- package/lib/aop/pipeline/pipeline-service.js +0 -238
- package/lib/aop/pipeline/pipeline-service.js.map +0 -1
- package/lib/aop/pipeline/pipeline-transitions.d.ts +0 -14
- package/lib/aop/pipeline/pipeline-transitions.d.ts.map +0 -1
- package/lib/aop/pipeline/pipeline-transitions.js +0 -31
- package/lib/aop/pipeline/pipeline-transitions.js.map +0 -1
- package/lib/aop/pipeline/ports.d.ts +0 -16
- package/lib/aop/pipeline/ports.d.ts.map +0 -1
- package/lib/aop/pipeline/ports.js +0 -2
- package/lib/aop/pipeline/ports.js.map +0 -1
- package/lib/aop/pipeline/role-capability-policy.d.ts +0 -16
- package/lib/aop/pipeline/role-capability-policy.d.ts.map +0 -1
- package/lib/aop/pipeline/role-capability-policy.js +0 -29
- package/lib/aop/pipeline/role-capability-policy.js.map +0 -1
- package/lib/aop/runtime/index.d.ts +0 -9
- package/lib/aop/runtime/index.d.ts.map +0 -1
- package/lib/aop/runtime/index.js +0 -9
- package/lib/aop/runtime/index.js.map +0 -1
- package/lib/collaboration/collab-admin-gate.d.ts +0 -21
- package/lib/collaboration/collab-admin-gate.d.ts.map +0 -1
- package/lib/collaboration/collab-admin-gate.js +0 -74
- package/lib/collaboration/collab-admin-gate.js.map +0 -1
- package/lib/collaboration/collab-utils.d.ts +0 -15
- package/lib/collaboration/collab-utils.d.ts.map +0 -1
- package/lib/collaboration/collab-utils.js +0 -37
- package/lib/collaboration/collab-utils.js.map +0 -1
- package/lib/collaboration/collaboration-artifact-repository.d.ts +0 -48
- package/lib/collaboration/collaboration-artifact-repository.d.ts.map +0 -1
- package/lib/collaboration/collaboration-artifact-repository.js +0 -114
- package/lib/collaboration/collaboration-artifact-repository.js.map +0 -1
- package/lib/collaboration/collaboration-commands.d.ts +0 -38
- package/lib/collaboration/collaboration-commands.d.ts.map +0 -1
- package/lib/collaboration/collaboration-commands.js +0 -373
- package/lib/collaboration/collaboration-commands.js.map +0 -1
- package/lib/collaboration/collaboration-config.d.ts +0 -30
- package/lib/collaboration/collaboration-config.d.ts.map +0 -1
- package/lib/collaboration/collaboration-config.js +0 -170
- package/lib/collaboration/collaboration-config.js.map +0 -1
- package/lib/collaboration/collaboration-context.d.ts +0 -15
- package/lib/collaboration/collaboration-context.d.ts.map +0 -1
- package/lib/collaboration/collaboration-context.js +0 -101
- package/lib/collaboration/collaboration-context.js.map +0 -1
- package/lib/collaboration/collaboration-db-model.d.ts +0 -350
- package/lib/collaboration/collaboration-db-model.d.ts.map +0 -1
- package/lib/collaboration/collaboration-db-model.js +0 -112
- package/lib/collaboration/collaboration-db-model.js.map +0 -1
- package/lib/collaboration/collaboration-delegation.d.ts +0 -21
- package/lib/collaboration/collaboration-delegation.d.ts.map +0 -1
- package/lib/collaboration/collaboration-delegation.js +0 -221
- package/lib/collaboration/collaboration-delegation.js.map +0 -1
- package/lib/collaboration/collaboration-dispatch.d.ts +0 -32
- package/lib/collaboration/collaboration-dispatch.d.ts.map +0 -1
- package/lib/collaboration/collaboration-dispatch.js +0 -93
- package/lib/collaboration/collaboration-dispatch.js.map +0 -1
- package/lib/collaboration/collaboration-kernel-bridge.d.ts +0 -23
- package/lib/collaboration/collaboration-kernel-bridge.d.ts.map +0 -1
- package/lib/collaboration/collaboration-kernel-bridge.js +0 -105
- package/lib/collaboration/collaboration-kernel-bridge.js.map +0 -1
- package/lib/collaboration/collaboration-outbound.d.ts +0 -64
- package/lib/collaboration/collaboration-outbound.d.ts.map +0 -1
- package/lib/collaboration/collaboration-outbound.js +0 -312
- package/lib/collaboration/collaboration-outbound.js.map +0 -1
- package/lib/collaboration/collaboration-scene-repository.d.ts +0 -154
- package/lib/collaboration/collaboration-scene-repository.d.ts.map +0 -1
- package/lib/collaboration/collaboration-scene-repository.js +0 -451
- package/lib/collaboration/collaboration-scene-repository.js.map +0 -1
- package/lib/collaboration/collaboration-turn-snapshot.d.ts +0 -18
- package/lib/collaboration/collaboration-turn-snapshot.d.ts.map +0 -1
- package/lib/collaboration/collaboration-turn-snapshot.js +0 -35
- package/lib/collaboration/collaboration-turn-snapshot.js.map +0 -1
- package/lib/collaboration/delegation-state.d.ts +0 -30
- package/lib/collaboration/delegation-state.d.ts.map +0 -1
- package/lib/collaboration/delegation-state.js +0 -86
- package/lib/collaboration/delegation-state.js.map +0 -1
- package/lib/collaboration/endpoint-identity.d.ts +0 -28
- package/lib/collaboration/endpoint-identity.d.ts.map +0 -1
- package/lib/collaboration/endpoint-identity.js +0 -80
- package/lib/collaboration/endpoint-identity.js.map +0 -1
- package/lib/collaboration/group-feed.d.ts +0 -30
- package/lib/collaboration/group-feed.d.ts.map +0 -1
- package/lib/collaboration/group-feed.js +0 -150
- package/lib/collaboration/group-feed.js.map +0 -1
- package/lib/collaboration/group-message.d.ts +0 -53
- package/lib/collaboration/group-message.d.ts.map +0 -1
- package/lib/collaboration/group-message.js +0 -101
- package/lib/collaboration/group-message.js.map +0 -1
- package/lib/collaboration/im-mention-delegate.d.ts +0 -22
- package/lib/collaboration/im-mention-delegate.d.ts.map +0 -1
- package/lib/collaboration/im-mention-delegate.js +0 -15
- package/lib/collaboration/im-mention-delegate.js.map +0 -1
- package/lib/collaboration/inbound-peer-handback.d.ts +0 -18
- package/lib/collaboration/inbound-peer-handback.d.ts.map +0 -1
- package/lib/collaboration/inbound-peer-handback.js +0 -65
- package/lib/collaboration/inbound-peer-handback.js.map +0 -1
- package/lib/collaboration/inbound-spawn-task.d.ts +0 -29
- package/lib/collaboration/inbound-spawn-task.d.ts.map +0 -1
- package/lib/collaboration/inbound-spawn-task.js +0 -96
- package/lib/collaboration/inbound-spawn-task.js.map +0 -1
- package/lib/collaboration/inbound-turn-endpoint.d.ts +0 -16
- package/lib/collaboration/inbound-turn-endpoint.d.ts.map +0 -1
- package/lib/collaboration/inbound-turn-endpoint.js +0 -26
- package/lib/collaboration/inbound-turn-endpoint.js.map +0 -1
- package/lib/collaboration/inbound-turn-tools.d.ts +0 -13
- package/lib/collaboration/inbound-turn-tools.d.ts.map +0 -1
- package/lib/collaboration/inbound-turn-tools.js +0 -24
- package/lib/collaboration/inbound-turn-tools.js.map +0 -1
- package/lib/collaboration/index.d.ts +0 -21
- package/lib/collaboration/index.d.ts.map +0 -1
- package/lib/collaboration/index.js +0 -19
- package/lib/collaboration/index.js.map +0 -1
- package/lib/collaboration/init-observe-hook.d.ts +0 -56
- package/lib/collaboration/init-observe-hook.d.ts.map +0 -1
- package/lib/collaboration/init-observe-hook.js +0 -168
- package/lib/collaboration/init-observe-hook.js.map +0 -1
- package/lib/collaboration/init-wizard-service.d.ts +0 -57
- package/lib/collaboration/init-wizard-service.d.ts.map +0 -1
- package/lib/collaboration/init-wizard-service.js +0 -187
- package/lib/collaboration/init-wizard-service.js.map +0 -1
- package/lib/collaboration/outbound-resolver.d.ts +0 -37
- package/lib/collaboration/outbound-resolver.d.ts.map +0 -1
- package/lib/collaboration/outbound-resolver.js +0 -189
- package/lib/collaboration/outbound-resolver.js.map +0 -1
- package/lib/collaboration/peer-policy.d.ts +0 -29
- package/lib/collaboration/peer-policy.d.ts.map +0 -1
- package/lib/collaboration/peer-policy.js +0 -118
- package/lib/collaboration/peer-policy.js.map +0 -1
- package/lib/collaboration/resolve-agent-session-key.d.ts +0 -21
- package/lib/collaboration/resolve-agent-session-key.d.ts.map +0 -1
- package/lib/collaboration/resolve-agent-session-key.js +0 -61
- package/lib/collaboration/resolve-agent-session-key.js.map +0 -1
- package/lib/collaboration/runtime-inbound-gate.d.ts +0 -35
- package/lib/collaboration/runtime-inbound-gate.d.ts.map +0 -1
- package/lib/collaboration/runtime-inbound-gate.js +0 -105
- package/lib/collaboration/runtime-inbound-gate.js.map +0 -1
- package/lib/collaboration/scene-context.d.ts +0 -17
- package/lib/collaboration/scene-context.d.ts.map +0 -1
- package/lib/collaboration/scene-context.js +0 -22
- package/lib/collaboration/scene-context.js.map +0 -1
- package/lib/collaboration/scene-identity-service.d.ts +0 -169
- package/lib/collaboration/scene-identity-service.d.ts.map +0 -1
- package/lib/collaboration/scene-identity-service.js +0 -479
- package/lib/collaboration/scene-identity-service.js.map +0 -1
- package/lib/collaboration/scene-service.d.ts +0 -67
- package/lib/collaboration/scene-service.d.ts.map +0 -1
- package/lib/collaboration/scene-service.js +0 -157
- package/lib/collaboration/scene-service.js.map +0 -1
- package/lib/collaboration/structured-ai-outbound.d.ts +0 -25
- package/lib/collaboration/structured-ai-outbound.d.ts.map +0 -1
- package/lib/collaboration/structured-ai-outbound.js +0 -179
- package/lib/collaboration/structured-ai-outbound.js.map +0 -1
- package/lib/collaboration/turn-plan-resolver.d.ts +0 -17
- package/lib/collaboration/turn-plan-resolver.d.ts.map +0 -1
- package/lib/collaboration/turn-plan-resolver.js +0 -63
- package/lib/collaboration/turn-plan-resolver.js.map +0 -1
- package/lib/collaboration/types.d.ts +0 -147
- package/lib/collaboration/types.d.ts.map +0 -1
- package/lib/collaboration/types.js +0 -16
- package/lib/collaboration/types.js.map +0 -1
- package/lib/collaboration/wire-collaboration-storage.d.ts +0 -4
- package/lib/collaboration/wire-collaboration-storage.d.ts.map +0 -1
- package/lib/collaboration/wire-collaboration-storage.js +0 -26
- package/lib/collaboration/wire-collaboration-storage.js.map +0 -1
- package/lib/config/resolve-pipeline-binding.d.ts +0 -16
- package/lib/config/resolve-pipeline-binding.d.ts.map +0 -1
- package/lib/config/resolve-pipeline-binding.js +0 -35
- package/lib/config/resolve-pipeline-binding.js.map +0 -1
- package/lib/discovery/register-agent-surface.d.ts +0 -33
- package/lib/discovery/register-agent-surface.d.ts.map +0 -1
- package/lib/discovery/register-agent-surface.js +0 -170
- package/lib/discovery/register-agent-surface.js.map +0 -1
- package/lib/init/create-zhin-agent.d.ts +0 -3
- package/lib/init/create-zhin-agent.d.ts.map +0 -1
- package/lib/init/create-zhin-agent.js +0 -401
- package/lib/init/create-zhin-agent.js.map +0 -1
- package/lib/init/register-ai-service.d.ts +0 -7
- package/lib/init/register-ai-service.d.ts.map +0 -1
- package/lib/init/register-ai-service.js +0 -45
- package/lib/init/register-ai-service.js.map +0 -1
- package/lib/init/register-builtin-tools.d.ts +0 -3
- package/lib/init/register-builtin-tools.d.ts.map +0 -1
- package/lib/init/register-builtin-tools.js +0 -411
- package/lib/init/register-builtin-tools.js.map +0 -1
- package/lib/init/register-capability-features.d.ts +0 -2
- package/lib/init/register-capability-features.d.ts.map +0 -1
- package/lib/init/register-capability-features.js +0 -28
- package/lib/init/register-capability-features.js.map +0 -1
- package/lib/init/register-collaboration-commands.d.ts +0 -2
- package/lib/init/register-collaboration-commands.d.ts.map +0 -1
- package/lib/init/register-collaboration-commands.js +0 -110
- package/lib/init/register-collaboration-commands.js.map +0 -1
- package/lib/init/register-db-models.d.ts +0 -2
- package/lib/init/register-db-models.d.ts.map +0 -1
- package/lib/init/register-db-models.js +0 -18
- package/lib/init/register-db-models.js.map +0 -1
- package/lib/init/register-db-upgrade.d.ts +0 -7
- package/lib/init/register-db-upgrade.d.ts.map +0 -1
- package/lib/init/register-db-upgrade.js +0 -79
- package/lib/init/register-db-upgrade.js.map +0 -1
- package/lib/init/register-group-session-passive.d.ts +0 -3
- package/lib/init/register-group-session-passive.d.ts.map +0 -1
- package/lib/init/register-group-session-passive.js +0 -61
- package/lib/init/register-group-session-passive.js.map +0 -1
- package/lib/init/register-im-segment-filter.d.ts +0 -2
- package/lib/init/register-im-segment-filter.d.ts.map +0 -1
- package/lib/init/register-im-segment-filter.js +0 -23
- package/lib/init/register-im-segment-filter.js.map +0 -1
- package/lib/init/register-init-wizard-guardrail.d.ts +0 -2
- package/lib/init/register-init-wizard-guardrail.d.ts.map +0 -1
- package/lib/init/register-init-wizard-guardrail.js +0 -41
- package/lib/init/register-init-wizard-guardrail.js.map +0 -1
- package/lib/init/register-introspection-commands.d.ts +0 -3
- package/lib/init/register-introspection-commands.d.ts.map +0 -1
- package/lib/init/register-introspection-commands.js +0 -107
- package/lib/init/register-introspection-commands.js.map +0 -1
- package/lib/init/register-management-tools.d.ts +0 -10
- package/lib/init/register-management-tools.d.ts.map +0 -1
- package/lib/init/register-management-tools.js +0 -42
- package/lib/init/register-management-tools.js.map +0 -1
- package/lib/init/register-mcp-from-config.d.ts +0 -2
- package/lib/init/register-mcp-from-config.d.ts.map +0 -1
- package/lib/init/register-mcp-from-config.js +0 -87
- package/lib/init/register-mcp-from-config.js.map +0 -1
- package/lib/init/register-orchestrator.d.ts +0 -2
- package/lib/init/register-orchestrator.d.ts.map +0 -1
- package/lib/init/register-orchestrator.js +0 -15
- package/lib/init/register-orchestrator.js.map +0 -1
- package/lib/init/register-tool-service.d.ts +0 -2
- package/lib/init/register-tool-service.d.ts.map +0 -1
- package/lib/init/register-tool-service.js +0 -9
- package/lib/init/register-tool-service.js.map +0 -1
- package/lib/init/shared-refs.d.ts +0 -14
- package/lib/init/shared-refs.d.ts.map +0 -1
- package/lib/init/shared-refs.js +0 -7
- package/lib/init/shared-refs.js.map +0 -1
- package/lib/init/types.d.ts +0 -26
- package/lib/init/types.d.ts.map +0 -1
- package/lib/init/types.js +0 -7
- package/lib/init/types.js.map +0 -1
- package/lib/init.d.ts +0 -7
- package/lib/init.d.ts.map +0 -1
- package/lib/init.js +0 -11
- package/lib/init.js.map +0 -1
- package/lib/schedule-domain/tool-resolver.d.ts +0 -20
- package/lib/schedule-domain/tool-resolver.d.ts.map +0 -1
- package/lib/schedule-domain/tool-resolver.js +0 -80
- package/lib/schedule-domain/tool-resolver.js.map +0 -1
- package/lib/schedule-domain/turn-context.d.ts +0 -9
- package/lib/schedule-domain/turn-context.d.ts.map +0 -1
- package/lib/schedule-domain/turn-context.js +0 -36
- package/lib/schedule-domain/turn-context.js.map +0 -1
- package/lib/session/agent-session-host-port.d.ts +0 -23
- package/lib/session/agent-session-host-port.d.ts.map +0 -1
- package/lib/session/agent-session-host-port.js +0 -61
- package/lib/session/agent-session-host-port.js.map +0 -1
- package/lib/session/http-agent-session-store.d.ts +0 -76
- package/lib/session/http-agent-session-store.d.ts.map +0 -1
- package/lib/session/http-agent-session-store.js +0 -211
- package/lib/session/http-agent-session-store.js.map +0 -1
- package/lib/session/http-approval-adapter.d.ts +0 -11
- package/lib/session/http-approval-adapter.d.ts.map +0 -1
- package/lib/session/http-approval-adapter.js +0 -19
- package/lib/session/http-approval-adapter.js.map +0 -1
- package/lib/session/http-approval-waiter.d.ts +0 -11
- package/lib/session/http-approval-waiter.d.ts.map +0 -1
- package/lib/session/http-approval-waiter.js +0 -61
- package/lib/session/http-approval-waiter.js.map +0 -1
- package/lib/session/http-session-persistence.d.ts +0 -28
- package/lib/session/http-session-persistence.d.ts.map +0 -1
- package/lib/session/http-session-persistence.js +0 -60
- package/lib/session/http-session-persistence.js.map +0 -1
- package/lib/session/http-session-sink.d.ts +0 -11
- package/lib/session/http-session-sink.d.ts.map +0 -1
- package/lib/session/http-session-sink.js +0 -32
- package/lib/session/http-session-sink.js.map +0 -1
- package/lib/session/http-step-projector.d.ts +0 -16
- package/lib/session/http-step-projector.d.ts.map +0 -1
- package/lib/session/http-step-projector.js +0 -118
- package/lib/session/http-step-projector.js.map +0 -1
- package/lib/session/http-turn-runner.d.ts +0 -16
- package/lib/session/http-turn-runner.d.ts.map +0 -1
- package/lib/session/http-turn-runner.js +0 -57
- package/lib/session/http-turn-runner.js.map +0 -1
- package/lib/session/park-controller.d.ts +0 -24
- package/lib/session/park-controller.d.ts.map +0 -1
- package/lib/session/park-controller.js +0 -58
- package/lib/session/park-controller.js.map +0 -1
- package/lib/session/resolve-approval-port.d.ts +0 -7
- package/lib/session/resolve-approval-port.d.ts.map +0 -1
- package/lib/session/resolve-approval-port.js +0 -13
- package/lib/session/resolve-approval-port.js.map +0 -1
- package/lib/session/session-event-log.d.ts +0 -17
- package/lib/session/session-event-log.d.ts.map +0 -1
- package/lib/session/session-event-log.js +0 -56
- package/lib/session/session-event-log.js.map +0 -1
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared mutable references between init sub-modules.
|
|
3
|
-
*
|
|
4
|
-
* These refs allow the split modules to coordinate without passing
|
|
5
|
-
* the instances through function parameters everywhere.
|
|
6
|
-
*/
|
|
7
|
-
import type { AIService } from '../service.js';
|
|
8
|
-
import type { ZhinAgent } from '../zhin-agent/index.js';
|
|
9
|
-
export interface AIServiceRefs {
|
|
10
|
-
aiService: AIService | null;
|
|
11
|
-
zhinAgent: ZhinAgent | null;
|
|
12
|
-
}
|
|
13
|
-
export declare function createRefs(): AIServiceRefs;
|
|
14
|
-
//# sourceMappingURL=shared-refs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared-refs.d.ts","sourceRoot":"","sources":["../../src/init/shared-refs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;CAC7B;AAED,wBAAgB,UAAU,IAAI,aAAa,CAK1C"}
|
package/lib/init/shared-refs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared-refs.js","sourceRoot":"","sources":["../../src/init/shared-refs.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,UAAU;IACxB,OAAO;QACL,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,IAAI;KAChB,CAAC;AACJ,CAAC"}
|
package/lib/init/types.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Consolidated type augmentation for the agent package.
|
|
3
|
-
* This ensures all init sub-modules can use typed inject/useContext
|
|
4
|
-
* without `as any` casts.
|
|
5
|
-
*/
|
|
6
|
-
import type { AIService } from '../service.js';
|
|
7
|
-
import type { AgentOrchestrator } from '../orchestrator/index.js';
|
|
8
|
-
import type { AgentSessionHostPort } from '../session/agent-session-host-port.js';
|
|
9
|
-
import type { AgentFeature } from '../features/agent-feature.js';
|
|
10
|
-
import type { MCPFeature } from '../features/mcp-feature.js';
|
|
11
|
-
import type { FeatureCapabilityIngress } from '../ingress/capability-ingress.js';
|
|
12
|
-
declare module '@zhin.js/core' {
|
|
13
|
-
namespace Plugin {
|
|
14
|
-
interface Contexts {
|
|
15
|
-
ai: AIService;
|
|
16
|
-
agent: AgentOrchestrator;
|
|
17
|
-
agentSessionHost?: AgentSessionHostPort;
|
|
18
|
-
agentFeature: AgentFeature;
|
|
19
|
-
mcpFeature: MCPFeature;
|
|
20
|
-
/** Optional — provided after ZhinAgent boot when Ingress is wired */
|
|
21
|
-
capabilityIngress?: FeatureCapabilityIngress;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=types.d.ts.map
|
package/lib/init/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/init/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAEjF,OAAO,QAAQ,eAAe,CAAC;IAC7B,UAAU,MAAM,CAAC;QACf,UAAU,QAAQ;YAChB,EAAE,EAAE,SAAS,CAAC;YACd,KAAK,EAAE,iBAAiB,CAAC;YACzB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;YACxC,YAAY,EAAE,YAAY,CAAC;YAC3B,UAAU,EAAE,UAAU,CAAC;YACvB,qEAAqE;YACrE,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;SAC9C;KACF;CACF;AAED,OAAO,EAAE,CAAC"}
|
package/lib/init/types.js
DELETED
package/lib/init/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/init/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
package/lib/init.d.ts
DELETED
package/lib/init.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,KAAK,CAMvC"}
|
package/lib/init.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated **已删除**。Legacy `bootstrapNode` 路径已移除;
|
|
3
|
-
* Plugin Runtime (`zhin runtime start`) 通过 basic/cli 自行装配 Agent。
|
|
4
|
-
* @throws 总是抛出。
|
|
5
|
-
*/
|
|
6
|
-
export function initAgentModule() {
|
|
7
|
-
throw new Error('initAgentModule() has been removed. '
|
|
8
|
-
+ 'The Plugin Runtime assembles the Agent stack via basic/cli. '
|
|
9
|
-
+ 'See docs/contributing/public-api-surface.md');
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=init.js.map
|
package/lib/init.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,IAAI,KAAK,CACb,sCAAsC;UACpC,8DAA8D;UAC9D,6CAA6C,CAChD,CAAC;AACJ,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type AgentTool } from '@zhin.js/ai';
|
|
2
|
-
import type { SkillRegistry } from '../orchestrator/skill-registry.js';
|
|
3
|
-
import type { ScheduleJobExecutionPlan } from '../assistant/types.js';
|
|
4
|
-
declare const UNATTENDED_FORBIDDEN_TOOLS: Set<string>;
|
|
5
|
-
export interface ScheduleToolResolverInput {
|
|
6
|
-
prompt: string;
|
|
7
|
-
executionPlan?: ScheduleJobExecutionPlan;
|
|
8
|
-
tools: AgentTool[];
|
|
9
|
-
skillRegistry: SkillRegistry | null;
|
|
10
|
-
}
|
|
11
|
-
export interface ScheduleToolResolverOutput {
|
|
12
|
-
tools: AgentTool[];
|
|
13
|
-
skills: string[];
|
|
14
|
-
resolvedBy: 'execution-plan' | 'affinity';
|
|
15
|
-
missingTools: string[];
|
|
16
|
-
missingSkills: string[];
|
|
17
|
-
}
|
|
18
|
-
export declare function resolveScheduleTools(input: ScheduleToolResolverInput): ScheduleToolResolverOutput;
|
|
19
|
-
export { UNATTENDED_FORBIDDEN_TOOLS };
|
|
20
|
-
//# sourceMappingURL=tool-resolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-resolver.d.ts","sourceRoot":"","sources":["../../src/schedule-domain/tool-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,QAAA,MAAM,0BAA0B,aAM9B,CAAC;AAEH,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,wBAAwB,CAAC;IACzC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,gBAAgB,GAAG,UAAU,CAAC;IAC1C,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAMD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,0BAA0B,CAuEjG;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { filterTools } from '@zhin.js/ai';
|
|
2
|
-
const UNATTENDED_FORBIDDEN_TOOLS = new Set([
|
|
3
|
-
'discover',
|
|
4
|
-
'load_tool',
|
|
5
|
-
'load_skill',
|
|
6
|
-
'ask_user',
|
|
7
|
-
'spawn_task',
|
|
8
|
-
]);
|
|
9
|
-
function eligibleTools(tools) {
|
|
10
|
-
return tools.filter(tool => !UNATTENDED_FORBIDDEN_TOOLS.has(tool.name));
|
|
11
|
-
}
|
|
12
|
-
export function resolveScheduleTools(input) {
|
|
13
|
-
const pool = eligibleTools(input.tools);
|
|
14
|
-
const byName = new Map(pool.map(tool => [tool.name, tool]));
|
|
15
|
-
const plan = input.executionPlan;
|
|
16
|
-
if (plan) {
|
|
17
|
-
const selected = [];
|
|
18
|
-
const selectedNames = new Set();
|
|
19
|
-
const missingTools = [];
|
|
20
|
-
const missingSkills = [];
|
|
21
|
-
const skills = [];
|
|
22
|
-
for (const name of plan.tools ?? []) {
|
|
23
|
-
const tool = byName.get(name);
|
|
24
|
-
if (!tool) {
|
|
25
|
-
missingTools.push(name);
|
|
26
|
-
}
|
|
27
|
-
else if (!selectedNames.has(name)) {
|
|
28
|
-
selected.push(tool);
|
|
29
|
-
selectedNames.add(name);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
for (const name of plan.skills ?? []) {
|
|
33
|
-
const skill = input.skillRegistry?.getByName(name);
|
|
34
|
-
if (!skill) {
|
|
35
|
-
missingSkills.push(name);
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
skills.push(name);
|
|
39
|
-
for (const skillTool of skill.tools) {
|
|
40
|
-
const tool = byName.get(skillTool.name);
|
|
41
|
-
if (tool && !selectedNames.has(tool.name)) {
|
|
42
|
-
selected.push(tool);
|
|
43
|
-
selectedNames.add(tool.name);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
tools: selected,
|
|
49
|
-
skills,
|
|
50
|
-
resolvedBy: 'execution-plan',
|
|
51
|
-
missingTools,
|
|
52
|
-
missingSkills,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
const matchedSkills = input.skillRegistry?.searchScored(input.prompt, {
|
|
56
|
-
maxResults: 20,
|
|
57
|
-
minScore: 0.05,
|
|
58
|
-
}).map(result => result.skill.name) ?? [];
|
|
59
|
-
const affinityTools = filterTools(input.prompt, pool, { maxTools: 20, minScore: 0.05 });
|
|
60
|
-
const affinityNames = new Set(affinityTools.map(tool => tool.name));
|
|
61
|
-
for (const skillName of matchedSkills) {
|
|
62
|
-
const skill = input.skillRegistry?.getByName(skillName);
|
|
63
|
-
for (const skillTool of skill?.tools ?? []) {
|
|
64
|
-
const tool = byName.get(skillTool.name);
|
|
65
|
-
if (tool && !affinityNames.has(tool.name) && affinityTools.length < 20) {
|
|
66
|
-
affinityTools.push(tool);
|
|
67
|
-
affinityNames.add(tool.name);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
tools: affinityTools,
|
|
73
|
-
skills: matchedSkills,
|
|
74
|
-
resolvedBy: 'affinity',
|
|
75
|
-
missingTools: [],
|
|
76
|
-
missingSkills: [],
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
export { UNATTENDED_FORBIDDEN_TOOLS };
|
|
80
|
-
//# sourceMappingURL=tool-resolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-resolver.js","sourceRoot":"","sources":["../../src/schedule-domain/tool-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,aAAa,CAAC;AAI1D,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;IACzC,UAAU;IACV,WAAW;IACX,YAAY;IACZ,UAAU;IACV,YAAY;CACb,CAAC,CAAC;AAiBH,SAAS,aAAa,CAAC,KAAkB;IACvC,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,0BAA0B,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACnE,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC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AC,IAAI,CAAC,IAAI,aAAa,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;gBACvE,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACzB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK,EAAE,aAAa;QACpB,MAAM,EAAE,aAAa;QACrB,UAAU,EAAE,UAAU;QACtB,YAAY,EAAE,EAAE;QAChB,aAAa,EAAE,EAAE;KAClB,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { HostScheduleTurnContext } from '../internal/host-types.js';
|
|
2
|
-
import type { TurnContextView } from '../context/turn-envelope.js';
|
|
3
|
-
import type { AgentPromptProfile } from '../prompt/turn-prompt-profile.js';
|
|
4
|
-
/** Native Schedule Turn identity. It never fabricates an IM platform or endpoint. */
|
|
5
|
-
export declare function scheduleTurnContextView(context: HostScheduleTurnContext): TurnContextView;
|
|
6
|
-
export declare function schedulePromptProfile(context: HostScheduleTurnContext, prompt: string): Extract<AgentPromptProfile, {
|
|
7
|
-
kind: 'schedule';
|
|
8
|
-
}>;
|
|
9
|
-
//# sourceMappingURL=turn-context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"turn-context.d.ts","sourceRoot":"","sources":["../../src/schedule-domain/turn-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,qFAAqF;AACrF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,uBAAuB,GAAG,eAAe,CAazF;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,uBAAuB,EAChC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,kBAAkB,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAgBnD"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { demoteScheduleCreator } from './security-harness.js';
|
|
2
|
-
/** Native Schedule Turn identity. It never fabricates an IM platform or endpoint. */
|
|
3
|
-
export function scheduleTurnContextView(context) {
|
|
4
|
-
const jobId = context.jobId?.trim();
|
|
5
|
-
if (!jobId)
|
|
6
|
-
throw new TypeError('Schedule Turn requires a jobId');
|
|
7
|
-
const creator = context.createdBy ? demoteScheduleCreator(context.createdBy) : undefined;
|
|
8
|
-
return Object.freeze({
|
|
9
|
-
origin: Object.freeze({ kind: 'schedule', jobId }),
|
|
10
|
-
principal: Object.freeze({
|
|
11
|
-
subjectId: creator?.userId ?? 'schedule',
|
|
12
|
-
...(creator?.name ? { displayName: creator.name } : {}),
|
|
13
|
-
roles: Object.freeze([...(creator?.roles ?? [])]),
|
|
14
|
-
}),
|
|
15
|
-
session: Object.freeze({ key: `schedule:${jobId}` }),
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
export function schedulePromptProfile(context, prompt) {
|
|
19
|
-
const jobId = context.jobId?.trim();
|
|
20
|
-
if (!jobId)
|
|
21
|
-
throw new TypeError('Schedule Turn requires a jobId');
|
|
22
|
-
return Object.freeze({
|
|
23
|
-
kind: 'schedule',
|
|
24
|
-
jobId,
|
|
25
|
-
prompt,
|
|
26
|
-
createdBy: context.createdBy
|
|
27
|
-
? Object.freeze({ ...context.createdBy, roles: Object.freeze([...context.createdBy.roles]) })
|
|
28
|
-
: undefined,
|
|
29
|
-
security: Object.freeze({
|
|
30
|
-
execPreset: context.security.execPreset,
|
|
31
|
-
rejectOwnerApproval: true,
|
|
32
|
-
allowedDomains: Object.freeze([...context.security.allowedDomains]),
|
|
33
|
-
}),
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=turn-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"turn-context.js","sourceRoot":"","sources":["../../src/schedule-domain/turn-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAK9D,qFAAqF;AACrF,MAAM,UAAU,uBAAuB,CAAC,OAAgC;IACtE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC;IACpC,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAC;IAClE,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,qBAAqB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACzF,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;QAClD,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;YACvB,SAAS,EAAE,OAAO,EAAE,MAAM,IAAI,UAAU;YACxC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvD,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;SAClD,CAAC;QACF,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,YAAY,KAAK,EAAE,EAAE,CAAC;KACrD,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,OAAgC,EAChC,MAAc;IAEd,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC;IACpC,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAC;IAClE,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,UAAU;QAChB,KAAK;QACL,MAAM;QACN,SAAS,EAAE,OAAO,CAAC,SAAS;YAC1B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAC7F,CAAC,CAAC,SAAS;QACb,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;YACtB,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,UAAU;YACvC,mBAAmB,EAAE,IAAa;YAClC,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;SACpE,CAAC;KACH,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AgentSessionHostPort — Host `/zhin/v1/session*` bootstrap seam (ADR 0041).
|
|
3
|
-
*/
|
|
4
|
-
import type { AgentStreamBus } from '../event/agent-stream-bus.js';
|
|
5
|
-
import type { AgentStreamEvent } from '@zhin.js/ai/agent-stream';
|
|
6
|
-
import { HttpApprovalAdapter } from './http-approval-adapter.js';
|
|
7
|
-
import { HttpAgentSessionStore } from './http-agent-session-store.js';
|
|
8
|
-
import type { ZhinAgent } from '../zhin-agent/index.js';
|
|
9
|
-
export interface AgentSessionHostPort {
|
|
10
|
-
store: HttpAgentSessionStore;
|
|
11
|
-
httpApprovalAdapter: HttpApprovalAdapter;
|
|
12
|
-
bus: AgentStreamBus;
|
|
13
|
-
publishHttpSessionEvent(sessionId: string, event: AgentStreamEvent): Promise<void>;
|
|
14
|
-
dispose(): void;
|
|
15
|
-
}
|
|
16
|
-
export interface CreateAgentSessionHostPortOptions {
|
|
17
|
-
getAgent: () => ZhinAgent | null;
|
|
18
|
-
bus: AgentStreamBus;
|
|
19
|
-
dataDir?: string;
|
|
20
|
-
maxSessions?: number;
|
|
21
|
-
}
|
|
22
|
-
export declare function createAgentSessionHostPort(options: CreateAgentSessionHostPortOptions): AgentSessionHostPort;
|
|
23
|
-
//# sourceMappingURL=agent-session-host-port.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-session-host-port.d.ts","sourceRoot":"","sources":["../../src/session/agent-session-host-port.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAMtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,qBAAqB,CAAC;IAC7B,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,GAAG,EAAE,cAAc,CAAC;IACpB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnF,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,EAAE,MAAM,SAAS,GAAG,IAAI,CAAC;IACjC,GAAG,EAAE,cAAc,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,iCAAiC,GACzC,oBAAoB,CA0DtB"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { HttpApprovalAdapter } from './http-approval-adapter.js';
|
|
2
|
-
import { HttpAgentSessionStore } from './http-agent-session-store.js';
|
|
3
|
-
import { SessionEventLog } from './session-event-log.js';
|
|
4
|
-
import { ParkController } from './park-controller.js';
|
|
5
|
-
import { HttpTurnRunner } from './http-turn-runner.js';
|
|
6
|
-
import { createHttpSessionSink } from './http-session-sink.js';
|
|
7
|
-
import { FileHttpSessionPersistence } from './http-session-persistence.js';
|
|
8
|
-
export function createAgentSessionHostPort(options) {
|
|
9
|
-
const log = new SessionEventLog();
|
|
10
|
-
const park = new ParkController(options.bus);
|
|
11
|
-
const httpApprovalAdapter = new HttpApprovalAdapter();
|
|
12
|
-
const persistence = options.dataDir
|
|
13
|
-
? new FileHttpSessionPersistence(options.dataDir)
|
|
14
|
-
: undefined;
|
|
15
|
-
const storeRef = { current: null };
|
|
16
|
-
const onPersist = persistence
|
|
17
|
-
? (sessionId) => { void storeRef.current?.persistSession(sessionId); }
|
|
18
|
-
: undefined;
|
|
19
|
-
const store = new HttpAgentSessionStore({
|
|
20
|
-
getAgent: options.getAgent,
|
|
21
|
-
maxSessions: options.maxSessions,
|
|
22
|
-
log,
|
|
23
|
-
park,
|
|
24
|
-
httpApprovalAdapter,
|
|
25
|
-
persistence,
|
|
26
|
-
onPersist,
|
|
27
|
-
});
|
|
28
|
-
storeRef.current = store;
|
|
29
|
-
store.setBus(options.bus);
|
|
30
|
-
const sinkOff = options.bus.registerSink(createHttpSessionSink({
|
|
31
|
-
sessions: store.getSessionsMap(),
|
|
32
|
-
log,
|
|
33
|
-
park,
|
|
34
|
-
onPersist,
|
|
35
|
-
}));
|
|
36
|
-
const turnRunner = new HttpTurnRunner({
|
|
37
|
-
getAgent: options.getAgent,
|
|
38
|
-
bus: options.bus,
|
|
39
|
-
park,
|
|
40
|
-
sessions: store.getSessionsMap(),
|
|
41
|
-
onPersist,
|
|
42
|
-
});
|
|
43
|
-
store.setTurnRunner(turnRunner);
|
|
44
|
-
if (persistence) {
|
|
45
|
-
void store.restoreFromDisk();
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
store,
|
|
49
|
-
httpApprovalAdapter,
|
|
50
|
-
bus: options.bus,
|
|
51
|
-
publishHttpSessionEvent(sessionId, event) {
|
|
52
|
-
return options.bus.publish(event, { sessionId, httpSessionId: sessionId });
|
|
53
|
-
},
|
|
54
|
-
dispose() {
|
|
55
|
-
sinkOff();
|
|
56
|
-
httpApprovalAdapter.waiter.dispose();
|
|
57
|
-
store.dispose();
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=agent-session-host-port.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-session-host-port.js","sourceRoot":"","sources":["../../src/session/agent-session-host-port.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAA+B,MAAM,+BAA+B,CAAC;AAkBxG,MAAM,UAAU,0BAA0B,CACxC,OAA0C;IAE1C,MAAM,GAAG,GAAG,IAAI,eAAe,EAAE,CAAC;IAClC,MAAM,IAAI,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC;IACtD,MAAM,WAAW,GAAuC,OAAO,CAAC,OAAO;QACrE,CAAC,CAAC,IAAI,0BAA0B,CAAC,OAAO,CAAC,OAAO,CAAC;QACjD,CAAC,CAAC,SAAS,CAAC;IAEd,MAAM,QAAQ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,aAAa,EAAE,SAAS,EAAE,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO;YACL,OAAO,EAAE,CAAC;YACV,mBAAmB,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACrC,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { type AgentStreamEvent } from '@zhin.js/ai/agent-stream';
|
|
2
|
-
import type { AgentStepCheckpoint } from '@zhin.js/ai/agent-step-checkpoint';
|
|
3
|
-
import type { AgentStreamBus } from '../event/agent-stream-bus.js';
|
|
4
|
-
import type { ZhinAgent } from '../zhin-agent/index.js';
|
|
5
|
-
import type { HttpApprovalAdapter } from './http-approval-adapter.js';
|
|
6
|
-
import type { ParkController, HttpSessionParkState } from './park-controller.js';
|
|
7
|
-
import type { SessionEventLog } from './session-event-log.js';
|
|
8
|
-
import type { HttpSessionPersistence } from './http-session-persistence.js';
|
|
9
|
-
import type { HttpTurnRunner } from './http-turn-runner.js';
|
|
10
|
-
export type HttpAgentSessionStatus = 'running' | 'waiting' | 'completed' | 'failed';
|
|
11
|
-
export interface HttpAgentSessionRecord {
|
|
12
|
-
sessionId: string;
|
|
13
|
-
continuationToken: string;
|
|
14
|
-
status: HttpAgentSessionStatus;
|
|
15
|
-
events: AgentStreamEvent[];
|
|
16
|
-
steps: AgentStepCheckpoint[];
|
|
17
|
-
parked: boolean;
|
|
18
|
-
pendingRequestIds: string[];
|
|
19
|
-
turnRunning: boolean;
|
|
20
|
-
}
|
|
21
|
-
export interface HttpAgentSessionStoreOptions {
|
|
22
|
-
getAgent: () => ZhinAgent | null;
|
|
23
|
-
maxSessions?: number;
|
|
24
|
-
log: SessionEventLog;
|
|
25
|
-
park: ParkController;
|
|
26
|
-
httpApprovalAdapter: HttpApprovalAdapter;
|
|
27
|
-
persistence?: HttpSessionPersistence;
|
|
28
|
-
onPersist?: (sessionId: string) => void;
|
|
29
|
-
}
|
|
30
|
-
export declare class HttpAgentSessionStore {
|
|
31
|
-
private readonly sessions;
|
|
32
|
-
private readonly getAgent;
|
|
33
|
-
private readonly maxSessions;
|
|
34
|
-
private readonly log;
|
|
35
|
-
private readonly park;
|
|
36
|
-
private readonly httpApprovalAdapter;
|
|
37
|
-
private readonly persistence?;
|
|
38
|
-
private readonly onPersist?;
|
|
39
|
-
private turnRunner?;
|
|
40
|
-
private bus?;
|
|
41
|
-
constructor(options: HttpAgentSessionStoreOptions);
|
|
42
|
-
setTurnRunner(runner: HttpTurnRunner): void;
|
|
43
|
-
setBus(bus: AgentStreamBus): void;
|
|
44
|
-
getSessionsMap(): Map<string, HttpSessionParkState>;
|
|
45
|
-
getSession(sessionId: string): HttpAgentSessionRecord | undefined;
|
|
46
|
-
hydrateSession(sessionId: string): Promise<HttpAgentSessionRecord | undefined>;
|
|
47
|
-
restoreFromDisk(): Promise<number>;
|
|
48
|
-
listEventSlice(sessionId: string, startIndex: number): AgentStreamEvent[];
|
|
49
|
-
subscribe(sessionId: string, listener: (event: AgentStreamEvent, index: number) => void): () => void;
|
|
50
|
-
startSession(message: string): Promise<{
|
|
51
|
-
sessionId: string;
|
|
52
|
-
continuationToken: string;
|
|
53
|
-
}>;
|
|
54
|
-
continueSession(sessionId: string, continuationToken: string, message: string): Promise<{
|
|
55
|
-
ok: true;
|
|
56
|
-
continuationToken: string;
|
|
57
|
-
} | {
|
|
58
|
-
ok: false;
|
|
59
|
-
error: string;
|
|
60
|
-
}>;
|
|
61
|
-
submitInput(sessionId: string, requestId: string, approved: boolean): Promise<{
|
|
62
|
-
ok: true;
|
|
63
|
-
} | {
|
|
64
|
-
ok: false;
|
|
65
|
-
error: string;
|
|
66
|
-
}>;
|
|
67
|
-
persistSession(sessionId: string): Promise<void>;
|
|
68
|
-
dispose(): void;
|
|
69
|
-
private requireBus;
|
|
70
|
-
private createState;
|
|
71
|
-
private ingestSnapshot;
|
|
72
|
-
private hydrateState;
|
|
73
|
-
private toRecord;
|
|
74
|
-
private evictIfNeeded;
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=http-agent-session-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-agent-session-store.d.ts","sourceRoot":"","sources":["../../src/session/http-agent-session-store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAgC,MAAM,+BAA+B,CAAC;AAC1G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEpF,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,sBAAsB,CAAC;IAC/B,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,MAAM,SAAS,GAAG,IAAI,CAAC;IACjC,WAAW,CAAC,EAAE,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