@zhin.js/agent 1.1.2 → 1.1.5
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 +52 -52
- package/lib/activity-feedback/adapter-integration.d.ts +8 -9
- package/lib/activity-feedback/adapter-integration.d.ts.map +1 -1
- package/lib/activity-feedback/adapter-integration.js +22 -18
- package/lib/activity-feedback/adapter-integration.js.map +1 -1
- package/lib/activity-feedback/ai-bus.d.ts.map +1 -1
- package/lib/activity-feedback/ai-bus.js +7 -1
- package/lib/activity-feedback/ai-bus.js.map +1 -1
- package/lib/activity-feedback/event-context.d.ts +1 -1
- package/lib/activity-feedback/event-context.d.ts.map +1 -1
- package/lib/activity-feedback/event-context.js +9 -6
- package/lib/activity-feedback/event-context.js.map +1 -1
- package/lib/activity-feedback/index.d.ts +3 -2
- package/lib/activity-feedback/index.d.ts.map +1 -1
- package/lib/activity-feedback/index.js +3 -2
- package/lib/activity-feedback/index.js.map +1 -1
- package/lib/activity-feedback/manager.d.ts +4 -1
- package/lib/activity-feedback/manager.d.ts.map +1 -1
- package/lib/activity-feedback/manager.js +10 -8
- package/lib/activity-feedback/manager.js.map +1 -1
- package/lib/activity-feedback/subagent-prefix.d.ts +17 -0
- package/lib/activity-feedback/subagent-prefix.d.ts.map +1 -0
- package/lib/activity-feedback/subagent-prefix.js +54 -0
- package/lib/activity-feedback/subagent-prefix.js.map +1 -0
- package/lib/agent-prompt/registry.js +1 -1
- package/lib/agent-prompt/registry.js.map +1 -1
- package/lib/agent-prompt/resolver.d.ts.map +1 -1
- package/lib/agent-prompt/resolver.js +5 -7
- package/lib/agent-prompt/resolver.js.map +1 -1
- package/lib/ai-event-bus.js +2 -2
- package/lib/ai-event-bus.js.map +1 -1
- package/lib/ai-event-subscriber.d.ts +1 -1
- package/lib/ai-event-subscriber.d.ts.map +1 -1
- package/lib/ai-event-subscriber.js +1 -1
- package/lib/ai-event-subscriber.js.map +1 -1
- package/lib/aop/index.d.ts +1 -1
- package/lib/aop/index.d.ts.map +1 -1
- package/lib/aop/index.js +1 -1
- package/lib/aop/index.js.map +1 -1
- package/lib/aop/pipeline/pipeline-service.d.ts +2 -0
- package/lib/aop/pipeline/pipeline-service.d.ts.map +1 -1
- package/lib/aop/pipeline/pipeline-service.js +26 -14
- package/lib/aop/pipeline/pipeline-service.js.map +1 -1
- package/lib/assistant/bootstrap-assistant-home.d.ts +31 -0
- package/lib/assistant/bootstrap-assistant-home.d.ts.map +1 -0
- package/lib/assistant/bootstrap-assistant-home.js +97 -0
- package/lib/assistant/bootstrap-assistant-home.js.map +1 -0
- package/lib/assistant/deliver-schedule-to-adapter.d.ts +3 -3
- package/lib/assistant/deliver-schedule-to-adapter.d.ts.map +1 -1
- package/lib/assistant/deliver-schedule-to-adapter.js +2 -6
- package/lib/assistant/deliver-schedule-to-adapter.js.map +1 -1
- package/lib/assistant/domains/{home-assistant.d.ts → ha-home-backend.d.ts} +16 -13
- package/lib/assistant/domains/ha-home-backend.d.ts.map +1 -0
- package/lib/assistant/domains/{home-assistant.js → ha-home-backend.js} +32 -7
- package/lib/assistant/domains/ha-home-backend.js.map +1 -0
- package/lib/assistant/domains/ha-ws-transport.d.ts +59 -0
- package/lib/assistant/domains/ha-ws-transport.d.ts.map +1 -0
- package/lib/assistant/domains/ha-ws-transport.js +135 -0
- package/lib/assistant/domains/ha-ws-transport.js.map +1 -0
- package/lib/assistant/domains/home-entity.d.ts +5 -0
- package/lib/assistant/domains/home-entity.d.ts.map +1 -0
- package/lib/assistant/domains/home-entity.js +8 -0
- package/lib/assistant/domains/home-entity.js.map +1 -0
- package/lib/assistant/domains/home-state-watch.d.ts +40 -0
- package/lib/assistant/domains/home-state-watch.d.ts.map +1 -0
- package/lib/assistant/domains/home-state-watch.js +118 -0
- package/lib/assistant/domains/home-state-watch.js.map +1 -0
- package/lib/assistant/home-config.d.ts +21 -7
- package/lib/assistant/home-config.d.ts.map +1 -1
- package/lib/assistant/home-config.js +5 -0
- package/lib/assistant/home-config.js.map +1 -1
- package/lib/assistant/home-facade.d.ts +73 -0
- package/lib/assistant/home-facade.d.ts.map +1 -0
- package/lib/assistant/home-facade.js +144 -0
- package/lib/assistant/home-facade.js.map +1 -0
- package/lib/assistant/home-policy.d.ts +3 -2
- package/lib/assistant/home-policy.d.ts.map +1 -1
- package/lib/assistant/home-policy.js +8 -36
- package/lib/assistant/home-policy.js.map +1 -1
- package/lib/assistant/home-tools.d.ts +9 -12
- package/lib/assistant/home-tools.d.ts.map +1 -1
- package/lib/assistant/home-tools.js +94 -135
- package/lib/assistant/home-tools.js.map +1 -1
- package/lib/assistant/index.d.ts +18 -11
- package/lib/assistant/index.d.ts.map +1 -1
- package/lib/assistant/index.js +10 -7
- package/lib/assistant/index.js.map +1 -1
- package/lib/assistant/job-creator.d.ts +3 -3
- package/lib/assistant/job-creator.d.ts.map +1 -1
- package/lib/assistant/job-creator.js +6 -11
- package/lib/assistant/job-creator.js.map +1 -1
- package/lib/assistant/job-engine.d.ts +1 -1
- package/lib/assistant/job-engine.d.ts.map +1 -1
- package/lib/assistant/job-engine.js +11 -22
- package/lib/assistant/job-engine.js.map +1 -1
- package/lib/assistant/job-scheduler.d.ts +0 -3
- package/lib/assistant/job-scheduler.d.ts.map +1 -1
- package/lib/assistant/job-scheduler.js +5 -3
- package/lib/assistant/job-scheduler.js.map +1 -1
- package/lib/assistant/job-store.d.ts.map +1 -1
- package/lib/assistant/job-store.js +31 -3
- package/lib/assistant/job-store.js.map +1 -1
- package/lib/assistant/job-worker.d.ts +2 -9
- package/lib/assistant/job-worker.d.ts.map +1 -1
- package/lib/assistant/job-worker.js +42 -36
- package/lib/assistant/job-worker.js.map +1 -1
- package/lib/assistant/notification-router.d.ts +2 -1
- package/lib/assistant/notification-router.d.ts.map +1 -1
- package/lib/assistant/notification-router.js +18 -9
- package/lib/assistant/notification-router.js.map +1 -1
- package/lib/assistant/runtime-registry.d.ts +4 -3
- package/lib/assistant/runtime-registry.d.ts.map +1 -1
- package/lib/assistant/runtime-registry.js +7 -16
- package/lib/assistant/runtime-registry.js.map +1 -1
- package/lib/assistant/schedule-execution.d.ts +0 -17
- package/lib/assistant/schedule-execution.d.ts.map +1 -1
- package/lib/assistant/schedule-execution.js +0 -41
- package/lib/assistant/schedule-execution.js.map +1 -1
- package/lib/assistant/schedule-job-service.d.ts +4 -2
- package/lib/assistant/schedule-job-service.d.ts.map +1 -1
- package/lib/assistant/schedule-job-service.js +38 -8
- package/lib/assistant/schedule-job-service.js.map +1 -1
- package/lib/assistant/types.d.ts +3 -0
- package/lib/assistant/types.d.ts.map +1 -1
- package/lib/assistant/types.js.map +1 -1
- package/lib/authoring/entries/tools.d.ts +1 -1
- package/lib/authoring/entries/tools.d.ts.map +1 -1
- package/lib/authoring/entries/tools.js +1 -1
- package/lib/authoring/entries/tools.js.map +1 -1
- package/lib/authoring/index.d.ts +1 -1
- package/lib/authoring/index.d.ts.map +1 -1
- package/lib/authoring/index.js +1 -1
- package/lib/authoring/index.js.map +1 -1
- package/lib/authoring/tool-policy.d.ts +1 -1
- package/lib/authoring/tool-policy.d.ts.map +1 -1
- package/lib/authoring/tool-policy.js +1 -1
- package/lib/authoring/tool-policy.js.map +1 -1
- package/lib/bootstrap.d.ts +14 -3
- package/lib/bootstrap.d.ts.map +1 -1
- package/lib/bootstrap.js +66 -12
- package/lib/bootstrap.js.map +1 -1
- package/lib/builtin/analyze-media-tool.d.ts.map +1 -1
- package/lib/builtin/analyze-media-tool.js +0 -12
- package/lib/builtin/analyze-media-tool.js.map +1 -1
- package/lib/builtin/bash-tool.d.ts.map +1 -1
- package/lib/builtin/bash-tool.js +0 -6
- package/lib/builtin/bash-tool.js.map +1 -1
- package/lib/builtin/bing-search-html.d.ts +1 -17
- package/lib/builtin/bing-search-html.d.ts.map +1 -1
- package/lib/builtin/bing-search-html.js +12 -10
- package/lib/builtin/bing-search-html.js.map +1 -1
- package/lib/builtin/edit-file-tool.d.ts.map +1 -1
- package/lib/builtin/edit-file-tool.js +0 -7
- package/lib/builtin/edit-file-tool.js.map +1 -1
- package/lib/builtin/glob-tool.d.ts.map +1 -1
- package/lib/builtin/glob-tool.js +0 -5
- package/lib/builtin/glob-tool.js.map +1 -1
- package/lib/builtin/grep-tool.d.ts.map +1 -1
- package/lib/builtin/grep-tool.js +0 -5
- package/lib/builtin/grep-tool.js.map +1 -1
- package/lib/builtin/list-dir-tool.d.ts.map +1 -1
- package/lib/builtin/list-dir-tool.js +0 -5
- package/lib/builtin/list-dir-tool.js.map +1 -1
- package/lib/builtin/memory-search-tool.js +1 -1
- package/lib/builtin/memory-search-tool.js.map +1 -1
- package/lib/builtin/memory-upsert-tool.js +1 -1
- package/lib/builtin/memory-upsert-tool.js.map +1 -1
- package/lib/builtin/read-file-tool.d.ts.map +1 -1
- package/lib/builtin/read-file-tool.js +0 -13
- package/lib/builtin/read-file-tool.js.map +1 -1
- package/lib/builtin/spawn-task-tool.d.ts.map +1 -1
- package/lib/builtin/spawn-task-tool.js +8 -10
- package/lib/builtin/spawn-task-tool.js.map +1 -1
- package/lib/builtin/web-fetch-tool.d.ts.map +1 -1
- package/lib/builtin/web-fetch-tool.js +9 -28
- package/lib/builtin/web-fetch-tool.js.map +1 -1
- package/lib/builtin/web-search-tool.d.ts.map +1 -1
- package/lib/builtin/web-search-tool.js +10 -0
- package/lib/builtin/web-search-tool.js.map +1 -1
- package/lib/builtin/write-file-tool.d.ts.map +1 -1
- package/lib/builtin/write-file-tool.js +0 -7
- package/lib/builtin/write-file-tool.js.map +1 -1
- package/lib/builtin-tools.d.ts +3 -14
- package/lib/builtin-tools.d.ts.map +1 -1
- package/lib/builtin-tools.js +3 -14
- package/lib/builtin-tools.js.map +1 -1
- package/lib/collaboration/collab-admin-gate.d.ts +1 -1
- package/lib/collaboration/collab-admin-gate.d.ts.map +1 -1
- package/lib/collaboration/collab-admin-gate.js +8 -8
- package/lib/collaboration/collab-admin-gate.js.map +1 -1
- package/lib/collaboration/collab-utils.d.ts +15 -0
- package/lib/collaboration/collab-utils.d.ts.map +1 -0
- package/lib/collaboration/collab-utils.js +37 -0
- package/lib/collaboration/collab-utils.js.map +1 -0
- package/lib/collaboration/collaboration-artifact-repository.d.ts +2 -0
- package/lib/collaboration/collaboration-artifact-repository.d.ts.map +1 -1
- package/lib/collaboration/collaboration-artifact-repository.js +17 -5
- package/lib/collaboration/collaboration-artifact-repository.js.map +1 -1
- package/lib/collaboration/collaboration-commands.d.ts +3 -3
- package/lib/collaboration/collaboration-commands.d.ts.map +1 -1
- package/lib/collaboration/collaboration-commands.js +25 -156
- package/lib/collaboration/collaboration-commands.js.map +1 -1
- package/lib/collaboration/collaboration-config.d.ts +5 -5
- package/lib/collaboration/collaboration-config.d.ts.map +1 -1
- package/lib/collaboration/collaboration-config.js +19 -19
- package/lib/collaboration/collaboration-config.js.map +1 -1
- package/lib/collaboration/collaboration-context.d.ts +5 -2
- package/lib/collaboration/collaboration-context.d.ts.map +1 -1
- package/lib/collaboration/collaboration-context.js +39 -27
- package/lib/collaboration/collaboration-context.js.map +1 -1
- package/lib/collaboration/collaboration-db-model.d.ts +2 -2
- package/lib/collaboration/collaboration-db-model.d.ts.map +1 -1
- package/lib/collaboration/collaboration-db-model.js +2 -2
- package/lib/collaboration/collaboration-db-model.js.map +1 -1
- package/lib/collaboration/collaboration-delegation.d.ts +2 -2
- package/lib/collaboration/collaboration-delegation.d.ts.map +1 -1
- package/lib/collaboration/collaboration-delegation.js +4 -6
- package/lib/collaboration/collaboration-delegation.js.map +1 -1
- package/lib/collaboration/collaboration-dispatch.d.ts +4 -4
- package/lib/collaboration/collaboration-dispatch.d.ts.map +1 -1
- package/lib/collaboration/collaboration-dispatch.js +12 -12
- package/lib/collaboration/collaboration-dispatch.js.map +1 -1
- package/lib/collaboration/collaboration-kernel-bridge.d.ts +3 -3
- package/lib/collaboration/collaboration-kernel-bridge.d.ts.map +1 -1
- package/lib/collaboration/collaboration-kernel-bridge.js +15 -16
- package/lib/collaboration/collaboration-kernel-bridge.js.map +1 -1
- package/lib/collaboration/collaboration-outbound.d.ts +7 -7
- package/lib/collaboration/collaboration-outbound.d.ts.map +1 -1
- package/lib/collaboration/collaboration-outbound.js +38 -41
- package/lib/collaboration/collaboration-outbound.js.map +1 -1
- package/lib/collaboration/collaboration-scene-repository.d.ts +17 -15
- package/lib/collaboration/collaboration-scene-repository.d.ts.map +1 -1
- package/lib/collaboration/collaboration-scene-repository.js +43 -32
- package/lib/collaboration/collaboration-scene-repository.js.map +1 -1
- package/lib/collaboration/collaboration-turn-snapshot.d.ts +3 -3
- package/lib/collaboration/collaboration-turn-snapshot.d.ts.map +1 -1
- package/lib/collaboration/collaboration-turn-snapshot.js +6 -6
- package/lib/collaboration/collaboration-turn-snapshot.js.map +1 -1
- package/lib/collaboration/delegation-state.d.ts +6 -6
- package/lib/collaboration/delegation-state.d.ts.map +1 -1
- package/lib/collaboration/delegation-state.js +17 -17
- package/lib/collaboration/delegation-state.js.map +1 -1
- package/lib/collaboration/endpoint-identity.d.ts +4 -4
- package/lib/collaboration/endpoint-identity.d.ts.map +1 -1
- package/lib/collaboration/endpoint-identity.js +17 -25
- package/lib/collaboration/endpoint-identity.js.map +1 -1
- package/lib/collaboration/group-message.d.ts +5 -5
- package/lib/collaboration/group-message.d.ts.map +1 -1
- package/lib/collaboration/group-message.js +10 -71
- package/lib/collaboration/group-message.js.map +1 -1
- package/lib/collaboration/im-mention-delegate.d.ts +1 -1
- package/lib/collaboration/im-mention-delegate.d.ts.map +1 -1
- package/lib/collaboration/im-mention-delegate.js +2 -2
- package/lib/collaboration/im-mention-delegate.js.map +1 -1
- package/lib/collaboration/inbound-peer-handback.d.ts +1 -1
- package/lib/collaboration/inbound-peer-handback.d.ts.map +1 -1
- package/lib/collaboration/inbound-peer-handback.js +13 -17
- package/lib/collaboration/inbound-peer-handback.js.map +1 -1
- package/lib/collaboration/inbound-spawn-task.d.ts.map +1 -1
- package/lib/collaboration/inbound-spawn-task.js +7 -8
- package/lib/collaboration/inbound-spawn-task.js.map +1 -1
- package/lib/collaboration/inbound-turn-tools.d.ts +1 -1
- package/lib/collaboration/inbound-turn-tools.d.ts.map +1 -1
- package/lib/collaboration/inbound-turn-tools.js +8 -3
- package/lib/collaboration/inbound-turn-tools.js.map +1 -1
- package/lib/collaboration/index.d.ts +1 -5
- package/lib/collaboration/index.d.ts.map +1 -1
- package/lib/collaboration/index.js +1 -4
- package/lib/collaboration/index.js.map +1 -1
- package/lib/collaboration/init-observe-hook.d.ts +8 -11
- package/lib/collaboration/init-observe-hook.d.ts.map +1 -1
- package/lib/collaboration/init-observe-hook.js +18 -40
- package/lib/collaboration/init-observe-hook.js.map +1 -1
- package/lib/collaboration/init-wizard-service.d.ts +2 -2
- package/lib/collaboration/init-wizard-service.d.ts.map +1 -1
- package/lib/collaboration/init-wizard-service.js +9 -11
- package/lib/collaboration/init-wizard-service.js.map +1 -1
- package/lib/collaboration/outbound-resolver.d.ts +3 -3
- package/lib/collaboration/outbound-resolver.d.ts.map +1 -1
- package/lib/collaboration/outbound-resolver.js +18 -18
- package/lib/collaboration/outbound-resolver.js.map +1 -1
- package/lib/collaboration/peer-policy.d.ts +7 -7
- package/lib/collaboration/peer-policy.d.ts.map +1 -1
- package/lib/collaboration/peer-policy.js +19 -19
- package/lib/collaboration/peer-policy.js.map +1 -1
- package/lib/collaboration/resolve-agent-session-key.js +2 -2
- package/lib/collaboration/resolve-agent-session-key.js.map +1 -1
- package/lib/collaboration/runtime-inbound-gate.d.ts.map +1 -1
- package/lib/collaboration/runtime-inbound-gate.js +26 -32
- package/lib/collaboration/runtime-inbound-gate.js.map +1 -1
- package/lib/collaboration/scene-identity-service.d.ts +13 -11
- package/lib/collaboration/scene-identity-service.d.ts.map +1 -1
- package/lib/collaboration/scene-identity-service.js +33 -22
- package/lib/collaboration/scene-identity-service.js.map +1 -1
- package/lib/collaboration/scene-service.d.ts +5 -3
- package/lib/collaboration/scene-service.d.ts.map +1 -1
- package/lib/collaboration/scene-service.js +17 -12
- package/lib/collaboration/scene-service.js.map +1 -1
- package/lib/collaboration/structured-ai-outbound.d.ts +1 -1
- package/lib/collaboration/structured-ai-outbound.d.ts.map +1 -1
- package/lib/collaboration/structured-ai-outbound.js +8 -9
- package/lib/collaboration/structured-ai-outbound.js.map +1 -1
- package/lib/collaboration/turn-plan-resolver.d.ts +2 -2
- package/lib/collaboration/turn-plan-resolver.d.ts.map +1 -1
- package/lib/collaboration/turn-plan-resolver.js +12 -12
- package/lib/collaboration/turn-plan-resolver.js.map +1 -1
- package/lib/collaboration/types.d.ts +6 -6
- package/lib/collaboration/types.d.ts.map +1 -1
- package/lib/collaboration/wire-collaboration-storage.d.ts.map +1 -1
- package/lib/collaboration/wire-collaboration-storage.js +0 -2
- package/lib/collaboration/wire-collaboration-storage.js.map +1 -1
- package/lib/common-adapter-tools.js +1 -1
- package/lib/common-adapter-tools.js.map +1 -1
- package/lib/config/agent-interfaces.d.ts +1 -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 +52 -3
- 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.map +1 -1
- package/lib/config/normalize-ai-config.d.ts +4 -2
- package/lib/config/normalize-ai-config.d.ts.map +1 -1
- package/lib/config/normalize-ai-config.js +29 -81
- package/lib/config/normalize-ai-config.js.map +1 -1
- package/lib/config/validate-ai-config.d.ts.map +1 -1
- package/lib/config/validate-ai-config.js +10 -0
- package/lib/config/validate-ai-config.js.map +1 -1
- package/lib/config/zhin-agent-config.d.ts +20 -0
- package/lib/config/zhin-agent-config.d.ts.map +1 -1
- package/lib/config/zhin-agent-defaults.d.ts.map +1 -1
- package/lib/config/zhin-agent-defaults.js +14 -0
- package/lib/config/zhin-agent-defaults.js.map +1 -1
- package/lib/config/zhin-agent-dependencies.d.ts +1 -0
- package/lib/config/zhin-agent-dependencies.d.ts.map +1 -1
- package/lib/context/context-system.d.ts +4 -2
- package/lib/context/context-system.d.ts.map +1 -1
- package/lib/context/context-system.js +15 -12
- package/lib/context/context-system.js.map +1 -1
- package/lib/context/contracts.d.ts +3 -3
- package/lib/context/contracts.d.ts.map +1 -1
- package/lib/context/default-builders.js +3 -3
- package/lib/context/default-builders.js.map +1 -1
- package/lib/context/im-turn-context-adapter.d.ts +9 -0
- package/lib/context/im-turn-context-adapter.d.ts.map +1 -0
- package/lib/context/im-turn-context-adapter.js +54 -0
- package/lib/context/im-turn-context-adapter.js.map +1 -0
- package/lib/context/index.d.ts +2 -2
- package/lib/context/index.d.ts.map +1 -1
- package/lib/context/index.js +1 -1
- package/lib/context/index.js.map +1 -1
- package/lib/context/turn-envelope.d.ts +5 -4
- package/lib/context/turn-envelope.d.ts.map +1 -1
- package/lib/context/turn-envelope.js +43 -50
- package/lib/context/turn-envelope.js.map +1 -1
- package/lib/core/agent-core-run.d.ts +37 -14
- package/lib/core/agent-core-run.d.ts.map +1 -1
- package/lib/core/agent-core-run.js +79 -182
- package/lib/core/agent-core-run.js.map +1 -1
- package/lib/core/agent-loop-standalone.d.ts.map +1 -1
- package/lib/core/agent-loop-standalone.js +35 -34
- package/lib/core/agent-loop-standalone.js.map +1 -1
- package/lib/core/agent-run-shared.d.ts +4 -0
- package/lib/core/agent-run-shared.d.ts.map +1 -0
- package/lib/core/agent-run-shared.js +8 -0
- package/lib/core/agent-run-shared.js.map +1 -0
- package/lib/core/compose-deps.d.ts.map +1 -1
- package/lib/core/compose-deps.js +1 -2
- package/lib/core/compose-deps.js.map +1 -1
- package/lib/core/spawn-delegation.d.ts +23 -0
- package/lib/core/spawn-delegation.d.ts.map +1 -0
- package/lib/core/spawn-delegation.js +64 -0
- package/lib/core/spawn-delegation.js.map +1 -0
- package/lib/core/tool-execution-authority.d.ts +21 -0
- package/lib/core/tool-execution-authority.d.ts.map +1 -0
- package/lib/core/tool-execution-authority.js +2 -0
- package/lib/core/tool-execution-authority.js.map +1 -0
- package/lib/core/turn-event-mapper.d.ts.map +1 -1
- package/lib/core/turn-event-mapper.js +13 -0
- package/lib/core/turn-event-mapper.js.map +1 -1
- package/lib/deferred-worker-runner.d.ts.map +1 -1
- package/lib/deferred-worker-runner.js +9 -23
- package/lib/deferred-worker-runner.js.map +1 -1
- package/lib/discovery/agent-surface-info.d.ts.map +1 -1
- package/lib/discovery/agent-surface-info.js +7 -2
- package/lib/discovery/agent-surface-info.js.map +1 -1
- package/lib/discovery/skills.js +3 -3
- package/lib/discovery/skills.js.map +1 -1
- package/lib/discovery/tools.js +2 -2
- package/lib/discovery/tools.js.map +1 -1
- package/lib/event/event-emitter.d.ts.map +1 -1
- package/lib/event/event-emitter.js +2 -13
- package/lib/event/event-emitter.js.map +1 -1
- package/lib/event/session-events.d.ts +3 -2
- package/lib/event/session-events.d.ts.map +1 -1
- package/lib/event/session-events.js.map +1 -1
- package/lib/event/turn-event.d.ts +35 -2
- package/lib/event/turn-event.d.ts.map +1 -1
- package/lib/event/turn-event.js +4 -1
- package/lib/event/turn-event.js.map +1 -1
- package/lib/event/turn-to-agent-stream.js +20 -0
- package/lib/event/turn-to-agent-stream.js.map +1 -1
- package/lib/hooks.d.ts +1 -1
- package/lib/hooks.d.ts.map +1 -1
- package/lib/index.d.ts +34 -27
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +26 -21
- package/lib/index.js.map +1 -1
- package/lib/ingress/capability-ingress.d.ts +3 -1
- package/lib/ingress/capability-ingress.d.ts.map +1 -1
- package/lib/ingress/capability-ingress.js +10 -6
- package/lib/ingress/capability-ingress.js.map +1 -1
- package/lib/init/configure-zhin-agent.d.ts +7 -34
- package/lib/init/configure-zhin-agent.d.ts.map +1 -1
- package/lib/init/configure-zhin-agent.js +5 -1
- package/lib/init/configure-zhin-agent.js.map +1 -1
- package/lib/init/create-zhin-agent.d.ts.map +1 -1
- package/lib/init/create-zhin-agent.js +64 -78
- package/lib/init/create-zhin-agent.js.map +1 -1
- package/lib/init/dispose-zhin-agent.d.ts +6 -22
- package/lib/init/dispose-zhin-agent.d.ts.map +1 -1
- package/lib/init/dispose-zhin-agent.js +1 -2
- package/lib/init/dispose-zhin-agent.js.map +1 -1
- package/lib/init/introspection-collectors.js +2 -2
- package/lib/init/introspection-collectors.js.map +1 -1
- package/lib/init/register-ai-service.d.ts.map +1 -1
- package/lib/init/register-ai-service.js +3 -4
- package/lib/init/register-ai-service.js.map +1 -1
- package/lib/init/register-builtin-tools.d.ts.map +1 -1
- package/lib/init/register-builtin-tools.js +20 -31
- package/lib/init/register-builtin-tools.js.map +1 -1
- package/lib/init/register-db-upgrade.d.ts.map +1 -1
- package/lib/init/register-db-upgrade.js +5 -9
- package/lib/init/register-db-upgrade.js.map +1 -1
- package/lib/init/register-group-session-passive.d.ts.map +1 -1
- package/lib/init/register-group-session-passive.js +15 -10
- package/lib/init/register-group-session-passive.js.map +1 -1
- package/lib/init/register-init-wizard-guardrail.d.ts.map +1 -1
- package/lib/init/register-init-wizard-guardrail.js +6 -11
- package/lib/init/register-init-wizard-guardrail.js.map +1 -1
- package/lib/init/register-introspection-commands.d.ts.map +1 -1
- package/lib/init/register-introspection-commands.js +20 -1
- package/lib/init/register-introspection-commands.js.map +1 -1
- package/lib/init/register-mcp-from-config.js +4 -4
- package/lib/init/register-mcp-from-config.js.map +1 -1
- package/lib/init/upgrade-endpoint-id-schema.d.ts +2 -2
- package/lib/init/upgrade-endpoint-id-schema.d.ts.map +1 -1
- package/lib/init/upgrade-endpoint-id-schema.js +3 -3
- package/lib/init/upgrade-endpoint-id-schema.js.map +1 -1
- package/lib/init.d.ts +4 -22
- package/lib/init.d.ts.map +1 -1
- package/lib/init.js +6 -57
- package/lib/init.js.map +1 -1
- package/lib/interaction/index.d.ts +2 -0
- package/lib/interaction/index.d.ts.map +1 -0
- package/lib/interaction/index.js +2 -0
- package/lib/interaction/index.js.map +1 -0
- package/lib/interaction/interaction-router.d.ts +20 -0
- package/lib/interaction/interaction-router.d.ts.map +1 -0
- package/lib/interaction/interaction-router.js +146 -0
- package/lib/interaction/interaction-router.js.map +1 -0
- package/lib/internal/agent-host.d.ts +59 -67
- package/lib/internal/agent-host.d.ts.map +1 -1
- package/lib/internal/ai-service-refs.d.ts +8 -0
- package/lib/internal/ai-service-refs.d.ts.map +1 -0
- package/lib/internal/ai-service-refs.js +7 -0
- package/lib/internal/ai-service-refs.js.map +1 -0
- package/lib/internal/as-private.d.ts +3 -6
- package/lib/internal/as-private.d.ts.map +1 -1
- package/lib/internal/as-private.js.map +1 -1
- package/lib/internal/host-types.d.ts +26 -3
- package/lib/internal/host-types.d.ts.map +1 -1
- package/lib/internal/prompt-trace.d.ts.map +1 -1
- package/lib/internal/prompt-trace.js +4 -15
- package/lib/internal/prompt-trace.js.map +1 -1
- package/lib/internal/turn-context.d.ts +1 -6
- package/lib/internal/turn-context.d.ts.map +1 -1
- package/lib/internal/turn-context.js +0 -9
- package/lib/internal/turn-context.js.map +1 -1
- package/lib/journal/file-journal-store.d.ts +21 -0
- package/lib/journal/file-journal-store.d.ts.map +1 -0
- package/lib/journal/file-journal-store.js +200 -0
- package/lib/journal/file-journal-store.js.map +1 -0
- package/lib/journal/index.d.ts +3 -0
- package/lib/journal/index.d.ts.map +1 -0
- package/lib/journal/index.js +3 -0
- package/lib/journal/index.js.map +1 -0
- package/lib/journal/persistent-turn-journal.d.ts +13 -0
- package/lib/journal/persistent-turn-journal.d.ts.map +1 -0
- package/lib/journal/persistent-turn-journal.js +72 -0
- package/lib/journal/persistent-turn-journal.js.map +1 -0
- package/lib/media/index.d.ts +0 -1
- package/lib/media/index.d.ts.map +1 -1
- package/lib/media/index.js +0 -1
- package/lib/media/index.js.map +1 -1
- package/lib/media/media-capabilities.d.ts.map +1 -1
- package/lib/media/media-capabilities.js +0 -6
- package/lib/media/media-capabilities.js.map +1 -1
- package/lib/media/media-normalize.d.ts +1 -7
- package/lib/media/media-normalize.d.ts.map +1 -1
- package/lib/media/media-normalize.js +0 -47
- package/lib/media/media-normalize.js.map +1 -1
- package/lib/media/media-router.d.ts +1 -2
- package/lib/media/media-router.d.ts.map +1 -1
- package/lib/media/media-router.js +2 -10
- package/lib/media/media-router.js.map +1 -1
- package/lib/media/resolve-config.d.ts.map +1 -1
- package/lib/media/resolve-config.js +1 -28
- package/lib/media/resolve-config.js.map +1 -1
- package/lib/media/subagent-inbound.d.ts +2 -2
- package/lib/media/subagent-inbound.d.ts.map +1 -1
- package/lib/media/subagent-inbound.js +2 -7
- package/lib/media/subagent-inbound.js.map +1 -1
- package/lib/media/vision-capability.d.ts +1 -3
- package/lib/media/vision-capability.d.ts.map +1 -1
- package/lib/media/vision-capability.js +0 -15
- package/lib/media/vision-capability.js.map +1 -1
- package/lib/memory/compaction-runtime.d.ts +3 -4
- package/lib/memory/compaction-runtime.d.ts.map +1 -1
- package/lib/memory/compaction-runtime.js +0 -10
- package/lib/memory/compaction-runtime.js.map +1 -1
- package/lib/memory/memory-system.d.ts.map +1 -1
- package/lib/memory/memory-system.js +1 -2
- package/lib/memory/memory-system.js.map +1 -1
- package/lib/memory-entry-registry.d.ts +6 -0
- package/lib/memory-entry-registry.d.ts.map +1 -1
- package/lib/memory-entry-registry.js +19 -3
- package/lib/memory-entry-registry.js.map +1 -1
- package/lib/memory-layers.d.ts +2 -2
- package/lib/memory-layers.d.ts.map +1 -1
- package/lib/memory-layers.js +11 -22
- package/lib/memory-layers.js.map +1 -1
- package/lib/orchestration-runtime-registry.d.ts +3 -1
- package/lib/orchestration-runtime-registry.d.ts.map +1 -1
- package/lib/orchestration-runtime-registry.js +9 -4
- package/lib/orchestration-runtime-registry.js.map +1 -1
- package/lib/orchestrator/agent-dispatcher.d.ts +3 -38
- package/lib/orchestrator/agent-dispatcher.d.ts.map +1 -1
- package/lib/orchestrator/agent-dispatcher.js +2 -155
- package/lib/orchestrator/agent-dispatcher.js.map +1 -1
- package/lib/orchestrator/bootstrap-executors.d.ts +5 -1
- package/lib/orchestrator/bootstrap-executors.d.ts.map +1 -1
- package/lib/orchestrator/bootstrap-executors.js +65 -36
- package/lib/orchestrator/bootstrap-executors.js.map +1 -1
- package/lib/orchestrator/index.d.ts +1 -1
- package/lib/orchestrator/index.d.ts.map +1 -1
- package/lib/orchestrator/index.js +1 -1
- package/lib/orchestrator/index.js.map +1 -1
- package/lib/orchestrator/orchestration-mappers.js +8 -8
- package/lib/orchestrator/orchestration-mappers.js.map +1 -1
- package/lib/orchestrator/orchestration-service.d.ts +18 -9
- package/lib/orchestrator/orchestration-service.d.ts.map +1 -1
- package/lib/orchestrator/orchestration-service.js +50 -47
- package/lib/orchestrator/orchestration-service.js.map +1 -1
- package/lib/orchestrator/remote-agent-registry.d.ts +3 -3
- package/lib/orchestrator/remote-agent-registry.d.ts.map +1 -1
- package/lib/orchestrator/remote-agent-registry.js +9 -13
- package/lib/orchestrator/remote-agent-registry.js.map +1 -1
- package/lib/orchestrator/remote-task-executor.d.ts.map +1 -1
- package/lib/orchestrator/remote-task-executor.js +12 -4
- package/lib/orchestrator/remote-task-executor.js.map +1 -1
- package/lib/orchestrator/remote-task-poller.d.ts +3 -2
- package/lib/orchestrator/remote-task-poller.d.ts.map +1 -1
- package/lib/orchestrator/remote-task-poller.js +18 -15
- package/lib/orchestrator/remote-task-poller.js.map +1 -1
- package/lib/orchestrator/role-configs.d.ts +30 -0
- package/lib/orchestrator/role-configs.d.ts.map +1 -0
- package/lib/orchestrator/role-configs.js +133 -0
- package/lib/orchestrator/role-configs.js.map +1 -0
- package/lib/orchestrator/task-queue.d.ts +3 -2
- package/lib/orchestrator/task-queue.d.ts.map +1 -1
- package/lib/orchestrator/task-queue.js +12 -11
- package/lib/orchestrator/task-queue.js.map +1 -1
- package/lib/orchestrator/tool-selection.d.ts +4 -3
- package/lib/orchestrator/tool-selection.d.ts.map +1 -1
- package/lib/orchestrator/tool-selection.js +17 -14
- package/lib/orchestrator/tool-selection.js.map +1 -1
- package/lib/orchestrator/types.d.ts +3 -2
- package/lib/orchestrator/types.d.ts.map +1 -1
- package/lib/outbound/send-proactive.js +1 -1
- package/lib/outbound/send-proactive.js.map +1 -1
- package/lib/plugin-ai-hook-bus.d.ts +3 -6
- package/lib/plugin-ai-hook-bus.d.ts.map +1 -1
- package/lib/plugin-ai-hook-bus.js +2 -20
- package/lib/plugin-ai-hook-bus.js.map +1 -1
- package/lib/plugin-runtime/agent-host-port.d.ts +25 -0
- package/lib/plugin-runtime/agent-host-port.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-host-port.js.map +1 -1
- package/lib/plugin-runtime/agent-runtime.d.ts +61 -8
- package/lib/plugin-runtime/agent-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-runtime.js +226 -11
- package/lib/plugin-runtime/agent-runtime.js.map +1 -1
- package/lib/plugin-runtime/capability-ingress.d.ts +4 -4
- package/lib/plugin-runtime/capability-ingress.d.ts.map +1 -1
- package/lib/plugin-runtime/capability-ingress.js +46 -20
- package/lib/plugin-runtime/capability-ingress.js.map +1 -1
- package/lib/plugin-runtime/capability-tools.d.ts +17 -0
- package/lib/plugin-runtime/capability-tools.d.ts.map +1 -0
- package/lib/plugin-runtime/capability-tools.js +55 -0
- package/lib/plugin-runtime/capability-tools.js.map +1 -0
- package/lib/plugin-runtime/deferred-capability-plan.d.ts +30 -0
- package/lib/plugin-runtime/deferred-capability-plan.d.ts.map +1 -0
- package/lib/plugin-runtime/deferred-capability-plan.js +152 -0
- package/lib/plugin-runtime/deferred-capability-plan.js.map +1 -0
- package/lib/plugin-runtime/full-agent-turn-engine.d.ts +17 -0
- package/lib/plugin-runtime/full-agent-turn-engine.d.ts.map +1 -0
- package/lib/plugin-runtime/full-agent-turn-engine.js +174 -0
- package/lib/plugin-runtime/full-agent-turn-engine.js.map +1 -0
- package/lib/plugin-runtime/host-mcp-projection.d.ts +10 -0
- package/lib/plugin-runtime/host-mcp-projection.d.ts.map +1 -0
- package/lib/plugin-runtime/host-mcp-projection.js +33 -0
- package/lib/plugin-runtime/host-mcp-projection.js.map +1 -0
- package/lib/plugin-runtime/host-tool-projection.d.ts +21 -0
- package/lib/plugin-runtime/host-tool-projection.d.ts.map +1 -0
- package/lib/plugin-runtime/host-tool-projection.js +22 -0
- package/lib/plugin-runtime/host-tool-projection.js.map +1 -0
- package/lib/plugin-runtime/index.d.ts +10 -0
- package/lib/plugin-runtime/index.d.ts.map +1 -1
- package/lib/plugin-runtime/index.js +10 -0
- package/lib/plugin-runtime/index.js.map +1 -1
- package/lib/plugin-runtime/native-file-tools.d.ts +9 -0
- package/lib/plugin-runtime/native-file-tools.d.ts.map +1 -0
- package/lib/plugin-runtime/native-file-tools.js +240 -0
- package/lib/plugin-runtime/native-file-tools.js.map +1 -0
- package/lib/plugin-runtime/native-interaction-tools.d.ts +8 -0
- package/lib/plugin-runtime/native-interaction-tools.d.ts.map +1 -0
- package/lib/plugin-runtime/native-interaction-tools.js +72 -0
- package/lib/plugin-runtime/native-interaction-tools.js.map +1 -0
- package/lib/plugin-runtime/native-todo-tools.d.ts +26 -0
- package/lib/plugin-runtime/native-todo-tools.d.ts.map +1 -0
- package/lib/plugin-runtime/native-todo-tools.js +152 -0
- package/lib/plugin-runtime/native-todo-tools.js.map +1 -0
- package/lib/plugin-runtime/native-web-tools.d.ts +10 -0
- package/lib/plugin-runtime/native-web-tools.d.ts.map +1 -0
- package/lib/plugin-runtime/native-web-tools.js +120 -0
- package/lib/plugin-runtime/native-web-tools.js.map +1 -0
- package/lib/prompt/assembly.d.ts +19 -9
- package/lib/prompt/assembly.d.ts.map +1 -1
- package/lib/prompt/assembly.js +64 -25
- package/lib/prompt/assembly.js.map +1 -1
- package/lib/prompt/git-context.d.ts +7 -0
- package/lib/prompt/git-context.d.ts.map +1 -0
- package/lib/prompt/git-context.js +75 -0
- package/lib/prompt/git-context.js.map +1 -0
- package/lib/prompt/index.d.ts +3 -2
- package/lib/prompt/index.d.ts.map +1 -1
- package/lib/prompt/index.js +2 -2
- package/lib/prompt/index.js.map +1 -1
- package/lib/prompt/model-aware-builder.d.ts +8 -0
- package/lib/prompt/model-aware-builder.d.ts.map +1 -0
- package/lib/prompt/model-aware-builder.js +61 -0
- package/lib/prompt/model-aware-builder.js.map +1 -0
- package/lib/prompt/model-prompt-strategy.d.ts +12 -0
- package/lib/prompt/model-prompt-strategy.d.ts.map +1 -0
- package/lib/prompt/model-prompt-strategy.js +171 -0
- package/lib/prompt/model-prompt-strategy.js.map +1 -0
- package/lib/prompt/rules/code-references.d.ts +2 -0
- package/lib/prompt/rules/code-references.d.ts.map +1 -0
- package/lib/prompt/rules/code-references.js +11 -0
- package/lib/prompt/rules/code-references.js.map +1 -0
- package/lib/prompt/rules/critical-rules.d.ts +2 -0
- package/lib/prompt/rules/critical-rules.d.ts.map +1 -0
- package/lib/prompt/rules/critical-rules.js +17 -0
- package/lib/prompt/rules/critical-rules.js.map +1 -0
- package/lib/prompt/rules/editing.d.ts +2 -0
- package/lib/prompt/rules/editing.d.ts.map +1 -0
- package/lib/prompt/rules/editing.js +18 -0
- package/lib/prompt/rules/editing.js.map +1 -0
- package/lib/prompt/rules/error-handling.d.ts +2 -0
- package/lib/prompt/rules/error-handling.d.ts.map +1 -0
- package/lib/prompt/rules/error-handling.js +18 -0
- package/lib/prompt/rules/error-handling.js.map +1 -0
- package/lib/prompt/rules/index.d.ts +8 -0
- package/lib/prompt/rules/index.d.ts.map +1 -0
- package/lib/prompt/rules/index.js +8 -0
- package/lib/prompt/rules/index.js.map +1 -0
- package/lib/prompt/rules/memory.d.ts +2 -0
- package/lib/prompt/rules/memory.d.ts.map +1 -0
- package/lib/prompt/rules/memory.js +13 -0
- package/lib/prompt/rules/memory.js.map +1 -0
- package/lib/prompt/rules/task-completion.d.ts +2 -0
- package/lib/prompt/rules/task-completion.d.ts.map +1 -0
- package/lib/prompt/rules/task-completion.js +11 -0
- package/lib/prompt/rules/task-completion.js.map +1 -0
- package/lib/prompt/rules/workflow-rules.d.ts +2 -0
- package/lib/prompt/rules/workflow-rules.d.ts.map +1 -0
- package/lib/prompt/rules/workflow-rules.js +27 -0
- package/lib/prompt/rules/workflow-rules.js.map +1 -0
- package/lib/prompt/system-prompt.d.ts +19 -22
- package/lib/prompt/system-prompt.d.ts.map +1 -1
- package/lib/prompt/system-prompt.js +82 -262
- package/lib/prompt/system-prompt.js.map +1 -1
- package/lib/prompt/templates.d.ts +3 -6
- package/lib/prompt/templates.d.ts.map +1 -1
- package/lib/prompt/templates.js +17 -21
- package/lib/prompt/templates.js.map +1 -1
- package/lib/prompt/turn-prompt-profile.d.ts +16 -0
- package/lib/prompt/turn-prompt-profile.d.ts.map +1 -0
- package/lib/prompt/turn-prompt-profile.js +2 -0
- package/lib/prompt/turn-prompt-profile.js.map +1 -0
- package/lib/routing/route-matcher.d.ts +2 -2
- package/lib/routing/route-matcher.d.ts.map +1 -1
- package/lib/routing/route-matcher.js +1 -1
- package/lib/routing/route-matcher.js.map +1 -1
- package/lib/routing/subagent-summarize.d.ts.map +1 -1
- package/lib/routing/subagent-summarize.js +1 -6
- package/lib/routing/subagent-summarize.js.map +1 -1
- package/lib/schedule-domain/audit-logger.d.ts +38 -0
- package/lib/schedule-domain/audit-logger.d.ts.map +1 -0
- package/lib/schedule-domain/audit-logger.js +27 -0
- package/lib/schedule-domain/audit-logger.js.map +1 -0
- package/lib/schedule-domain/budget-guard.d.ts +27 -0
- package/lib/schedule-domain/budget-guard.d.ts.map +1 -0
- package/lib/schedule-domain/budget-guard.js +48 -0
- package/lib/schedule-domain/budget-guard.js.map +1 -0
- package/lib/schedule-domain/execution-domain.d.ts +49 -0
- package/lib/schedule-domain/execution-domain.d.ts.map +1 -0
- package/lib/schedule-domain/execution-domain.js +125 -0
- package/lib/schedule-domain/execution-domain.js.map +1 -0
- package/lib/schedule-domain/index.d.ts +8 -0
- package/lib/schedule-domain/index.d.ts.map +1 -0
- package/lib/schedule-domain/index.js +8 -0
- package/lib/schedule-domain/index.js.map +1 -0
- package/lib/schedule-domain/output-validator.d.ts +7 -0
- package/lib/schedule-domain/output-validator.d.ts.map +1 -0
- package/lib/schedule-domain/output-validator.js +36 -0
- package/lib/schedule-domain/output-validator.js.map +1 -0
- package/lib/schedule-domain/prompt-assembler.d.ts +22 -0
- package/lib/schedule-domain/prompt-assembler.d.ts.map +1 -0
- package/lib/schedule-domain/prompt-assembler.js +75 -0
- package/lib/schedule-domain/prompt-assembler.js.map +1 -0
- package/lib/schedule-domain/security-harness.d.ts +19 -0
- package/lib/schedule-domain/security-harness.d.ts.map +1 -0
- package/lib/schedule-domain/security-harness.js +89 -0
- package/lib/schedule-domain/security-harness.js.map +1 -0
- package/lib/schedule-domain/tool-resolver.d.ts +20 -0
- package/lib/schedule-domain/tool-resolver.d.ts.map +1 -0
- package/lib/schedule-domain/tool-resolver.js +80 -0
- package/lib/schedule-domain/tool-resolver.js.map +1 -0
- package/lib/schedule-domain/turn-context.d.ts +9 -0
- package/lib/schedule-domain/turn-context.d.ts.map +1 -0
- package/lib/schedule-domain/turn-context.js +36 -0
- package/lib/schedule-domain/turn-context.js.map +1 -0
- package/lib/schedule-manager.d.ts +12 -13
- package/lib/schedule-manager.d.ts.map +1 -1
- package/lib/schedule-manager.js +91 -155
- package/lib/schedule-manager.js.map +1 -1
- package/lib/security/anomaly-detection.d.ts +3 -6
- package/lib/security/anomaly-detection.d.ts.map +1 -1
- package/lib/security/anomaly-detection.js +24 -31
- package/lib/security/anomaly-detection.js.map +1 -1
- package/lib/security/audit-logger.d.ts +5 -4
- package/lib/security/audit-logger.d.ts.map +1 -1
- package/lib/security/audit-logger.js +17 -25
- package/lib/security/audit-logger.js.map +1 -1
- package/lib/security/dangerous-tool-policy.d.ts +1 -1
- package/lib/security/dangerous-tool-policy.d.ts.map +1 -1
- package/lib/security/dangerous-tool-policy.js +6 -25
- package/lib/security/dangerous-tool-policy.js.map +1 -1
- package/lib/security/exec-policy.d.ts +2 -1
- package/lib/security/exec-policy.d.ts.map +1 -1
- package/lib/security/exec-policy.js +6 -11
- package/lib/security/exec-policy.js.map +1 -1
- package/lib/security/file-policy.d.ts.map +1 -1
- package/lib/security/file-policy.js +1 -0
- package/lib/security/file-policy.js.map +1 -1
- package/lib/security/file-role-policy.d.ts.map +1 -1
- package/lib/security/file-role-policy.js +1 -4
- package/lib/security/file-role-policy.js.map +1 -1
- package/lib/security/index.d.ts +0 -2
- package/lib/security/index.d.ts.map +1 -1
- package/lib/security/index.js +0 -2
- package/lib/security/index.js.map +1 -1
- package/lib/security/network-policy-context.d.ts +7 -0
- package/lib/security/network-policy-context.d.ts.map +1 -0
- package/lib/security/network-policy-context.js +9 -0
- package/lib/security/network-policy-context.js.map +1 -0
- package/lib/security/network-policy.d.ts +14 -1
- package/lib/security/network-policy.d.ts.map +1 -1
- package/lib/security/network-policy.js +70 -3
- package/lib/security/network-policy.js.map +1 -1
- package/lib/security/owner-approve-always-store.d.ts +1 -1
- package/lib/security/owner-approve-always-store.d.ts.map +1 -1
- package/lib/security/owner-approve-always-store.js +12 -12
- package/lib/security/owner-approve-always-store.js.map +1 -1
- package/lib/security/policy-facade.d.ts +27 -0
- package/lib/security/policy-facade.d.ts.map +1 -1
- package/lib/security/policy-facade.js +190 -3
- package/lib/security/policy-facade.js.map +1 -1
- package/lib/security/sandbox.d.ts +2 -7
- package/lib/security/sandbox.d.ts.map +1 -1
- package/lib/security/sandbox.js +12 -21
- package/lib/security/sandbox.js.map +1 -1
- package/lib/security/turn-file-authority.d.ts +14 -0
- package/lib/security/turn-file-authority.d.ts.map +1 -0
- package/lib/security/turn-file-authority.js +101 -0
- package/lib/security/turn-file-authority.js.map +1 -0
- package/lib/security/turn-network-client.d.ts +30 -0
- package/lib/security/turn-network-client.d.ts.map +1 -0
- package/lib/security/turn-network-client.js +111 -0
- package/lib/security/turn-network-client.js.map +1 -0
- package/lib/service.d.ts +3 -13
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +3 -35
- package/lib/service.js.map +1 -1
- package/lib/session/{session-interaction-port.d.ts → approval-port.d.ts} +4 -7
- package/lib/session/approval-port.d.ts.map +1 -0
- package/lib/session/{session-interaction-port.js → approval-port.js} +1 -1
- package/lib/session/approval-port.js.map +1 -0
- package/lib/session/http-approval-adapter.d.ts +2 -2
- package/lib/session/http-approval-adapter.d.ts.map +1 -1
- package/lib/session/http-approval-adapter.js +1 -1
- package/lib/session/http-approval-adapter.js.map +1 -1
- package/lib/session/http-approval-waiter.d.ts +1 -1
- package/lib/session/http-approval-waiter.d.ts.map +1 -1
- package/lib/session/http-approval-waiter.js +25 -2
- package/lib/session/http-approval-waiter.js.map +1 -1
- package/lib/session/index.d.ts +6 -3
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +3 -2
- package/lib/session/index.js.map +1 -1
- package/lib/session/passive-group-session.d.ts +8 -10
- package/lib/session/passive-group-session.d.ts.map +1 -1
- package/lib/session/passive-group-session.js +23 -27
- package/lib/session/passive-group-session.js.map +1 -1
- package/lib/session/resolve-approval-port.d.ts +7 -0
- package/lib/session/resolve-approval-port.d.ts.map +1 -0
- package/lib/session/resolve-approval-port.js +13 -0
- package/lib/session/resolve-approval-port.js.map +1 -0
- package/lib/session/session-io.d.ts +3 -4
- package/lib/session/session-io.d.ts.map +1 -1
- package/lib/session/session-io.js +7 -15
- package/lib/session/session-io.js.map +1 -1
- package/lib/session/session-system.d.ts +22 -1
- package/lib/session/session-system.d.ts.map +1 -1
- package/lib/session/session-system.js +72 -10
- package/lib/session/session-system.js.map +1 -1
- package/lib/session/session-tree-commands.d.ts.map +1 -1
- package/lib/session/session-tree-commands.js +2 -4
- package/lib/session/session-tree-commands.js.map +1 -1
- package/lib/session/turn-ingress-session.d.ts +23 -0
- package/lib/session/turn-ingress-session.d.ts.map +1 -0
- package/lib/session/turn-ingress-session.js +89 -0
- package/lib/session/turn-ingress-session.js.map +1 -0
- package/lib/session-tree-runtime-registry.d.ts +3 -1
- package/lib/session-tree-runtime-registry.d.ts.map +1 -1
- package/lib/session-tree-runtime-registry.js +6 -4
- package/lib/session-tree-runtime-registry.js.map +1 -1
- package/lib/stability/memory-pressure.d.ts.map +1 -1
- package/lib/stability/memory-pressure.js +4 -21
- package/lib/stability/memory-pressure.js.map +1 -1
- package/lib/subagent/subagent-runtime.d.ts.map +1 -1
- package/lib/subagent/subagent-runtime.js +1 -5
- package/lib/subagent/subagent-runtime.js.map +1 -1
- package/lib/subagent/subagent-system-init.js +2 -2
- package/lib/subagent/subagent-system-init.js.map +1 -1
- package/lib/subagent-ai-events.d.ts +3 -0
- package/lib/subagent-ai-events.d.ts.map +1 -1
- package/lib/subagent-ai-events.js +4 -1
- package/lib/subagent-ai-events.js.map +1 -1
- package/lib/subagent-goal-notify.d.ts +1 -1
- package/lib/subagent-goal-notify.d.ts.map +1 -1
- package/lib/subagent-goal-notify.js +1 -1
- package/lib/subagent-goal-notify.js.map +1 -1
- package/lib/subagent-parent-context.d.ts +9 -0
- package/lib/subagent-parent-context.d.ts.map +1 -1
- package/lib/subagent-parent-context.js +8 -0
- package/lib/subagent-parent-context.js.map +1 -1
- package/lib/task-executor.d.ts +14 -25
- package/lib/task-executor.d.ts.map +1 -1
- package/lib/task-executor.js +106 -137
- package/lib/task-executor.js.map +1 -1
- package/lib/tool/builtin-policy-extractors.d.ts +2 -0
- package/lib/tool/builtin-policy-extractors.d.ts.map +1 -0
- package/lib/tool/builtin-policy-extractors.js +65 -0
- package/lib/tool/builtin-policy-extractors.js.map +1 -0
- package/lib/tool/classic-tool-execution-authority.d.ts +22 -0
- package/lib/tool/classic-tool-execution-authority.d.ts.map +1 -0
- package/lib/tool/classic-tool-execution-authority.js +79 -0
- package/lib/tool/classic-tool-execution-authority.js.map +1 -0
- package/lib/tool/contracts.d.ts +2 -2
- package/lib/tool/contracts.d.ts.map +1 -1
- package/lib/tool/contracts.js +1 -1
- package/lib/tool/deferred-resolution.d.ts +5 -3
- package/lib/tool/deferred-resolution.d.ts.map +1 -1
- package/lib/tool/deferred-resolution.js +31 -5
- package/lib/tool/deferred-resolution.js.map +1 -1
- package/lib/tool/index.d.ts +2 -0
- package/lib/tool/index.d.ts.map +1 -1
- package/lib/tool/index.js +1 -0
- package/lib/tool/index.js.map +1 -1
- package/lib/tool/prepare-turn-tools.d.ts +2 -0
- package/lib/tool/prepare-turn-tools.d.ts.map +1 -1
- package/lib/tool/prepare-turn-tools.js +62 -10
- package/lib/tool/prepare-turn-tools.js.map +1 -1
- package/lib/tool/runtime.d.ts +1 -1
- package/lib/tool/runtime.d.ts.map +1 -1
- package/lib/tool/runtime.js +1 -1
- package/lib/tool/runtime.js.map +1 -1
- package/lib/tool/sources.d.ts +5 -2
- package/lib/tool/sources.d.ts.map +1 -1
- package/lib/tool/sources.js +4 -4
- package/lib/tool/sources.js.map +1 -1
- package/lib/tool/tool-approval-gate.d.ts +3 -3
- package/lib/tool/tool-approval-gate.d.ts.map +1 -1
- package/lib/tool/tool-approval-gate.js +2 -1
- package/lib/tool/tool-approval-gate.js.map +1 -1
- package/lib/tool/tool-runtime.d.ts +52 -0
- package/lib/tool/tool-runtime.d.ts.map +1 -0
- package/lib/tool/tool-runtime.js +101 -0
- package/lib/tool/tool-runtime.js.map +1 -0
- package/lib/tool/tool-system.d.ts +7 -3
- package/lib/tool/tool-system.d.ts.map +1 -1
- package/lib/tool/tool-system.js +12 -6
- package/lib/tool/tool-system.js.map +1 -1
- package/lib/tool/turn-tool-runtime.d.ts +29 -0
- package/lib/tool/turn-tool-runtime.d.ts.map +1 -0
- package/lib/tool/turn-tool-runtime.js +89 -0
- package/lib/tool/turn-tool-runtime.js.map +1 -0
- package/lib/tool-catalog/deferred-turn-controller.d.ts +30 -0
- package/lib/tool-catalog/deferred-turn-controller.d.ts.map +1 -0
- package/lib/tool-catalog/deferred-turn-controller.js +126 -0
- package/lib/tool-catalog/deferred-turn-controller.js.map +1 -0
- package/lib/turn/auto-continue.d.ts +6 -15
- package/lib/turn/auto-continue.d.ts.map +1 -1
- package/lib/turn/auto-continue.js +43 -31
- package/lib/turn/auto-continue.js.map +1 -1
- package/lib/turn/deferred-turn-state.d.ts +29 -0
- package/lib/turn/deferred-turn-state.d.ts.map +1 -0
- package/lib/turn/deferred-turn-state.js +35 -0
- package/lib/turn/deferred-turn-state.js.map +1 -0
- package/lib/turn/execute-agent-turn.d.ts +14 -0
- package/lib/turn/execute-agent-turn.d.ts.map +1 -0
- package/lib/turn/execute-agent-turn.js +171 -0
- package/lib/turn/execute-agent-turn.js.map +1 -0
- package/lib/turn/inbound-media.d.ts +3 -3
- package/lib/turn/inbound-media.d.ts.map +1 -1
- package/lib/turn/inbound-media.js +11 -4
- package/lib/turn/inbound-media.js.map +1 -1
- package/lib/turn/index.d.ts +8 -1
- package/lib/turn/index.d.ts.map +1 -1
- package/lib/turn/index.js +5 -1
- package/lib/turn/index.js.map +1 -1
- package/lib/turn/journal-integrity.d.ts +5 -0
- package/lib/turn/journal-integrity.d.ts.map +1 -0
- package/lib/turn/journal-integrity.js +8 -0
- package/lib/turn/journal-integrity.js.map +1 -0
- package/lib/turn/process-stream.d.ts.map +1 -1
- package/lib/turn/process-stream.js +21 -55
- package/lib/turn/process-stream.js.map +1 -1
- package/lib/turn/prompt-controller.d.ts +7 -4
- package/lib/turn/prompt-controller.d.ts.map +1 -1
- package/lib/turn/prompt-controller.js +23 -11
- package/lib/turn/prompt-controller.js.map +1 -1
- package/lib/turn/subagent-auto-continue.d.ts +2 -0
- package/lib/turn/subagent-auto-continue.d.ts.map +1 -1
- package/lib/turn/subagent-auto-continue.js +17 -1
- package/lib/turn/subagent-auto-continue.js.map +1 -1
- package/lib/turn/task-continuation.d.ts +3 -6
- package/lib/turn/task-continuation.d.ts.map +1 -1
- package/lib/turn/task-continuation.js +10 -13
- package/lib/turn/task-continuation.js.map +1 -1
- package/lib/turn/turn-complete.d.ts +1 -0
- package/lib/turn/turn-complete.d.ts.map +1 -1
- package/lib/turn/turn-complete.js +3 -2
- package/lib/turn/turn-complete.js.map +1 -1
- package/lib/turn/turn-context-bridge.d.ts +0 -4
- package/lib/turn/turn-context-bridge.d.ts.map +1 -1
- package/lib/turn/turn-context-bridge.js +0 -10
- package/lib/turn/turn-context-bridge.js.map +1 -1
- package/lib/turn/turn-event-source.d.ts +15 -0
- package/lib/turn/turn-event-source.d.ts.map +1 -0
- package/lib/turn/turn-event-source.js +61 -0
- package/lib/turn/turn-event-source.js.map +1 -0
- package/lib/turn/turn-ingress.d.ts +157 -0
- package/lib/turn/turn-ingress.d.ts.map +1 -0
- package/lib/turn/turn-ingress.js +76 -0
- package/lib/turn/turn-ingress.js.map +1 -0
- package/lib/turn/turn-metrics.d.ts.map +1 -1
- package/lib/turn/turn-metrics.js +10 -9
- package/lib/turn/turn-metrics.js.map +1 -1
- package/lib/turn/turn-pipeline.d.ts +10 -3
- package/lib/turn/turn-pipeline.d.ts.map +1 -1
- package/lib/turn/turn-pipeline.js +73 -41
- package/lib/turn/turn-pipeline.js.map +1 -1
- package/lib/typing-indicator/adapter-integration.d.ts +3 -5
- 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/index.d.ts +4 -4
- package/lib/typing-indicator/index.d.ts.map +1 -1
- package/lib/typing-indicator/index.js +25 -29
- package/lib/typing-indicator/index.js.map +1 -1
- package/lib/typing-indicator/integration.d.ts +6 -8
- package/lib/typing-indicator/integration.d.ts.map +1 -1
- package/lib/typing-indicator/integration.js +12 -10
- package/lib/typing-indicator/integration.js.map +1 -1
- package/lib/utils/keyed-mutex.d.ts +10 -0
- package/lib/utils/keyed-mutex.d.ts.map +1 -0
- package/lib/utils/keyed-mutex.js +34 -0
- package/lib/utils/keyed-mutex.js.map +1 -0
- package/lib/zhin-agent/index.d.ts +71 -76
- package/lib/zhin-agent/index.d.ts.map +1 -1
- package/lib/zhin-agent/index.js +51 -157
- package/lib/zhin-agent/index.js.map +1 -1
- package/lib/zhin-agent/runtime-modules.d.ts +1 -0
- package/lib/zhin-agent/runtime-modules.d.ts.map +1 -1
- package/lib/zhin-agent/runtime-modules.js +16 -0
- package/lib/zhin-agent/runtime-modules.js.map +1 -1
- package/package.json +13 -11
- package/lib/assistant/domains/home-assistant.d.ts.map +0 -1
- package/lib/assistant/domains/home-assistant.js.map +0 -1
- package/lib/assistant/schedule-message.d.ts +0 -9
- package/lib/assistant/schedule-message.d.ts.map +0 -1
- package/lib/assistant/schedule-message.js +0 -23
- package/lib/assistant/schedule-message.js.map +0 -1
- package/lib/assistant/schedule-tool-runtime.d.ts +0 -7
- package/lib/assistant/schedule-tool-runtime.d.ts.map +0 -1
- package/lib/assistant/schedule-tool-runtime.js +0 -50
- package/lib/assistant/schedule-tool-runtime.js.map +0 -1
- package/lib/builtin/ask-user-session-service.d.ts +0 -40
- package/lib/builtin/ask-user-session-service.d.ts.map +0 -1
- package/lib/builtin/ask-user-session-service.js +0 -258
- package/lib/builtin/ask-user-session-service.js.map +0 -1
- package/lib/builtin/ask-user-session.d.ts +0 -18
- package/lib/builtin/ask-user-session.d.ts.map +0 -1
- package/lib/builtin/ask-user-session.js +0 -21
- package/lib/builtin/ask-user-session.js.map +0 -1
- package/lib/builtin/ask-user-tool.d.ts +0 -22
- package/lib/builtin/ask-user-tool.d.ts.map +0 -1
- package/lib/builtin/ask-user-tool.js +0 -148
- package/lib/builtin/ask-user-tool.js.map +0 -1
- package/lib/builtin/deferred-tool-meta.d.ts +0 -51
- package/lib/builtin/deferred-tool-meta.d.ts.map +0 -1
- package/lib/builtin/deferred-tool-meta.js +0 -143
- package/lib/builtin/deferred-tool-meta.js.map +0 -1
- package/lib/collaboration/ask-user-bridge.d.ts +0 -9
- package/lib/collaboration/ask-user-bridge.d.ts.map +0 -1
- package/lib/collaboration/ask-user-bridge.js +0 -73
- package/lib/collaboration/ask-user-bridge.js.map +0 -1
- package/lib/collaboration/bootstrap-agent-runtimes.d.ts +0 -22
- package/lib/collaboration/bootstrap-agent-runtimes.d.ts.map +0 -1
- package/lib/collaboration/bootstrap-agent-runtimes.js +0 -106
- package/lib/collaboration/bootstrap-agent-runtimes.js.map +0 -1
- package/lib/collaboration/inbound-turn-compat.d.ts +0 -32
- package/lib/collaboration/inbound-turn-compat.d.ts.map +0 -1
- package/lib/collaboration/inbound-turn-compat.js +0 -30
- package/lib/collaboration/inbound-turn-compat.js.map +0 -1
- package/lib/collaboration/runtime-registry.d.ts +0 -18
- package/lib/collaboration/runtime-registry.d.ts.map +0 -1
- package/lib/collaboration/runtime-registry.js +0 -45
- package/lib/collaboration/runtime-registry.js.map +0 -1
- package/lib/init/management-command-guard.d.ts +0 -6
- package/lib/init/management-command-guard.d.ts.map +0 -1
- package/lib/init/management-command-guard.js +0 -6
- package/lib/init/management-command-guard.js.map +0 -1
- package/lib/init/output-renderer.d.ts +0 -7
- package/lib/init/output-renderer.d.ts.map +0 -1
- package/lib/init/output-renderer.js +0 -44
- package/lib/init/output-renderer.js.map +0 -1
- package/lib/init/register-home-tools.d.ts +0 -2
- package/lib/init/register-home-tools.d.ts.map +0 -1
- package/lib/init/register-home-tools.js +0 -51
- package/lib/init/register-home-tools.js.map +0 -1
- package/lib/init/register-owner-approve-commands.d.ts +0 -10
- package/lib/init/register-owner-approve-commands.d.ts.map +0 -1
- package/lib/init/register-owner-approve-commands.js +0 -12
- package/lib/init/register-owner-approve-commands.js.map +0 -1
- package/lib/media/constants.d.ts +0 -3
- package/lib/media/constants.d.ts.map +0 -1
- package/lib/media/constants.js +0 -3
- package/lib/media/constants.js.map +0 -1
- package/lib/orchestrator/owner-confirm-orchestration.d.ts +0 -39
- package/lib/orchestrator/owner-confirm-orchestration.d.ts.map +0 -1
- package/lib/orchestrator/owner-confirm-orchestration.js +0 -92
- package/lib/orchestrator/owner-confirm-orchestration.js.map +0 -1
- package/lib/orchestrator/owner-orchestration-constants.d.ts +0 -6
- package/lib/orchestrator/owner-orchestration-constants.d.ts.map +0 -1
- package/lib/orchestrator/owner-orchestration-constants.js +0 -10
- package/lib/orchestrator/owner-orchestration-constants.js.map +0 -1
- package/lib/security/dangerous-tool-policy-hook.d.ts +0 -6
- package/lib/security/dangerous-tool-policy-hook.d.ts.map +0 -1
- package/lib/security/dangerous-tool-policy-hook.js +0 -41
- package/lib/security/dangerous-tool-policy-hook.js.map +0 -1
- package/lib/security/exec-policy-hook.d.ts +0 -7
- package/lib/security/exec-policy-hook.d.ts.map +0 -1
- package/lib/security/exec-policy-hook.js +0 -29
- package/lib/security/exec-policy-hook.js.map +0 -1
- package/lib/security/file-policy-hook.d.ts +0 -6
- package/lib/security/file-policy-hook.d.ts.map +0 -1
- package/lib/security/file-policy-hook.js +0 -30
- package/lib/security/file-policy-hook.js.map +0 -1
- package/lib/security/sandbox-enhanced.d.ts +0 -173
- package/lib/security/sandbox-enhanced.d.ts.map +0 -1
- package/lib/security/sandbox-enhanced.js +0 -665
- package/lib/security/sandbox-enhanced.js.map +0 -1
- package/lib/session/im-approval-adapter.d.ts +0 -12
- package/lib/session/im-approval-adapter.d.ts.map +0 -1
- package/lib/session/im-approval-adapter.js +0 -24
- package/lib/session/im-approval-adapter.js.map +0 -1
- package/lib/session/resolve-session-interaction-port.d.ts +0 -9
- package/lib/session/resolve-session-interaction-port.d.ts.map +0 -1
- package/lib/session/resolve-session-interaction-port.js +0 -17
- package/lib/session/resolve-session-interaction-port.js.map +0 -1
- package/lib/session/session-interaction-port.d.ts.map +0 -1
- package/lib/session/session-interaction-port.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-assembler.d.ts","sourceRoot":"","sources":["../../src/schedule-domain/prompt-assembler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAE7E,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,2BAA2B,EAAE,YAAY,CAAC,CAAC,CAAC;CACtE;AAED,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAqBD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,4BAA4B,GAAG,sBAAsB,CAyClG;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,MAAM,CAAC,CAUjB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { readSkillInstructions } from '../builtin/load-skill-tool.js';
|
|
2
|
+
import { buildSkillLoadOptsForAgent } from '../skill/skill-load-opts.js';
|
|
3
|
+
function formatTime(now, timeZone) {
|
|
4
|
+
return new Intl.DateTimeFormat('zh-CN', {
|
|
5
|
+
timeZone,
|
|
6
|
+
year: 'numeric',
|
|
7
|
+
month: '2-digit',
|
|
8
|
+
day: '2-digit',
|
|
9
|
+
hour: '2-digit',
|
|
10
|
+
minute: '2-digit',
|
|
11
|
+
second: '2-digit',
|
|
12
|
+
weekday: 'long',
|
|
13
|
+
hour12: false,
|
|
14
|
+
}).format(now);
|
|
15
|
+
}
|
|
16
|
+
function section(title, content) {
|
|
17
|
+
const value = content?.trim();
|
|
18
|
+
return value ? `# ${title}\n${value}` : null;
|
|
19
|
+
}
|
|
20
|
+
export function assembleSchedulePrompt(input) {
|
|
21
|
+
const creator = input.createdBy
|
|
22
|
+
? `${input.createdBy.name ?? input.createdBy.userId} (${input.createdBy.roles.join(', ') || 'readonly'})`
|
|
23
|
+
: 'system (readonly)';
|
|
24
|
+
const identity = [
|
|
25
|
+
'# 执行身份与约束',
|
|
26
|
+
'你是一个定时任务执行引擎。直接完成任务并输出最终结果。',
|
|
27
|
+
'禁止确认语、进度报告、寒暄、元评论和对话式措辞。',
|
|
28
|
+
'不得请求用户确认,不得派生子任务。工具或权限不足时明确失败,不得虚构结果。',
|
|
29
|
+
].join('\n');
|
|
30
|
+
const runtime = [
|
|
31
|
+
'# 执行上下文',
|
|
32
|
+
`当前时间: ${formatTime(input.now ?? new Date(), input.timeZone)}`,
|
|
33
|
+
`任务 ID: ${input.jobId}`,
|
|
34
|
+
`创建者: ${creator}`,
|
|
35
|
+
].join('\n');
|
|
36
|
+
const execPreset = input.security?.execPreset ?? 'readonly';
|
|
37
|
+
const safety = [
|
|
38
|
+
'# 安全约束',
|
|
39
|
+
'- 文件访问仅限 workspace。',
|
|
40
|
+
`- Shell 仅允许 ${execPreset} preset;无人值守审批一律拒绝。`,
|
|
41
|
+
'- 网络访问仅允许 HTTPS 且必须通过既有域名白名单。',
|
|
42
|
+
].join('\n');
|
|
43
|
+
const output = [
|
|
44
|
+
'# 输出格式',
|
|
45
|
+
'只输出最终内容,不包含前缀、后缀、系统标记或执行元信息。',
|
|
46
|
+
].join('\n');
|
|
47
|
+
return {
|
|
48
|
+
systemPrompt: [
|
|
49
|
+
identity,
|
|
50
|
+
runtime,
|
|
51
|
+
section('平台上下文', input.platformContext),
|
|
52
|
+
safety,
|
|
53
|
+
section('技能指令', input.skillContext),
|
|
54
|
+
section('记忆', input.memoryContext),
|
|
55
|
+
section('Workspace 指令', input.bootstrapContext),
|
|
56
|
+
output,
|
|
57
|
+
].filter((value) => Boolean(value)).join('\n\n'),
|
|
58
|
+
userPrompt: input.prompt.trim(),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export async function loadScheduleSkillContext(host, skillNames) {
|
|
62
|
+
if (!host.skillRegistry || skillNames.length === 0)
|
|
63
|
+
return '';
|
|
64
|
+
const options = buildSkillLoadOptsForAgent(host);
|
|
65
|
+
const instructions = [];
|
|
66
|
+
for (const name of skillNames) {
|
|
67
|
+
if (!host.skillRegistry.getByName(name))
|
|
68
|
+
continue;
|
|
69
|
+
const content = await readSkillInstructions(name, options);
|
|
70
|
+
if (!content.startsWith(`Skill '${name}' not found`))
|
|
71
|
+
instructions.push(content);
|
|
72
|
+
}
|
|
73
|
+
return instructions.join('\n\n');
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=prompt-assembler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-assembler.js","sourceRoot":"","sources":["../../src/schedule-domain/prompt-assembler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAsBzE,SAAS,UAAU,CAAC,GAAS,EAAE,QAAiB;IAC9C,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;QACtC,QAAQ;QACR,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,KAAK;KACd,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACjB,CAAC;AAED,SAAS,OAAO,CAAC,KAAa,EAAE,OAAgB;IAC9C,MAAM,KAAK,GAAG,OAAO,EAAE,IAAI,EAAE,CAAC;IAC9B,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,KAAmC;IACxE,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS;QAC7B,CAAC,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC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ACjE,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;KAChC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,IAAsB,EACtB,UAAoB;IAEpB,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC9D,MAAM,OAAO,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC;YAAE,SAAS;QAClD,MAAM,OAAO,GAAG,MAAM,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC3D,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,IAAI,aAAa,CAAC;YAAE,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ScheduleJobCreator } from '../assistant/types.js';
|
|
2
|
+
import { type ToolPolicyInput } from '../security/policy-facade.js';
|
|
3
|
+
import type { AgentTool } from '@zhin.js/ai';
|
|
4
|
+
import type { Message } from '@zhin.js/core';
|
|
5
|
+
import type { ZhinAgentConfig } from '../config/zhin-agent-config.js';
|
|
6
|
+
import type { HostScheduleSecurityContext as ScheduleSecurityContext, HostScheduleSecurityDenial as ScheduleSecurityDenial } from '../internal/host-types.js';
|
|
7
|
+
export type { ScheduleSecurityContext, ScheduleSecurityDenial };
|
|
8
|
+
export declare function createScheduleSecurityContext(execPreset?: ScheduleSecurityContext['execPreset'], allowedDomains?: string[]): ScheduleSecurityContext;
|
|
9
|
+
export declare function demoteScheduleCreator(creator: ScheduleJobCreator): ScheduleJobCreator;
|
|
10
|
+
export declare function hardenSchedulePolicyInput(input: ToolPolicyInput, context: ScheduleSecurityContext): ToolPolicyInput;
|
|
11
|
+
export interface SecureScheduleToolsInput {
|
|
12
|
+
tools: AgentTool[];
|
|
13
|
+
message: Message;
|
|
14
|
+
config: Required<ZhinAgentConfig>;
|
|
15
|
+
context: ScheduleSecurityContext;
|
|
16
|
+
onDenial?: (denial: ScheduleSecurityDenial) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function secureScheduleTools(input: SecureScheduleToolsInput): AgentTool[];
|
|
19
|
+
//# sourceMappingURL=security-harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security-harness.d.ts","sourceRoot":"","sources":["../../src/schedule-domain/security-harness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EACV,2BAA2B,IAAI,uBAAuB,EACtD,0BAA0B,IAAI,sBAAsB,EACrD,MAAM,2BAA2B,CAAC;AAInC,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,CAAC;AAEhE,wBAAgB,6BAA6B,CAC3C,UAAU,GAAE,uBAAuB,CAAC,YAAY,CAAc,EAC9D,cAAc,GAAE,MAAM,EAAO,GAC5B,uBAAuB,CAEzB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,GAAG,kBAAkB,CAOrF;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,uBAAuB,GAC/B,eAAe,CAYjB;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAClC,OAAO,EAAE,uBAAuB,CAAC;IACjC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAC;CACrD;AASD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,SAAS,EAAE,CAuDhF"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { runToolPolicies } from '../security/policy-facade.js';
|
|
2
|
+
import { runWithToolNetworkPolicy } from '../security/network-policy-context.js';
|
|
3
|
+
import { extractUrlsFromCommand } from '../security/network-policy.js';
|
|
4
|
+
export function createScheduleSecurityContext(execPreset = 'readonly', allowedDomains = []) {
|
|
5
|
+
return { execPreset, rejectOwnerApproval: true, allowedDomains: [...allowedDomains] };
|
|
6
|
+
}
|
|
7
|
+
export function demoteScheduleCreator(creator) {
|
|
8
|
+
const roles = creator.roles.includes('master')
|
|
9
|
+
? ['trusted']
|
|
10
|
+
: creator.roles.includes('trusted')
|
|
11
|
+
? ['user']
|
|
12
|
+
: [];
|
|
13
|
+
return { ...creator, roles };
|
|
14
|
+
}
|
|
15
|
+
export function hardenSchedulePolicyInput(input, context) {
|
|
16
|
+
return {
|
|
17
|
+
...input,
|
|
18
|
+
config: input.config
|
|
19
|
+
? {
|
|
20
|
+
...input.config,
|
|
21
|
+
execSecurity: 'allowlist',
|
|
22
|
+
execPreset: context.execPreset,
|
|
23
|
+
execApprovalMode: context.rejectOwnerApproval ? 'deny' : input.config.execApprovalMode,
|
|
24
|
+
}
|
|
25
|
+
: undefined,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function pathArgument(args) {
|
|
29
|
+
const value = args.path ?? args.file_path ?? args.filePath ?? args.cwd;
|
|
30
|
+
return typeof value === 'string' ? value : undefined;
|
|
31
|
+
}
|
|
32
|
+
const NETWORK_COMMAND = /(?:^|[;&|]\s*)(curl|wget|ping|dig|nslookup|host)\b/i;
|
|
33
|
+
export function secureScheduleTools(input) {
|
|
34
|
+
const networkPolicy = {
|
|
35
|
+
httpsOnly: true,
|
|
36
|
+
allowedDomains: input.context.allowedDomains,
|
|
37
|
+
};
|
|
38
|
+
return input.tools.map(tool => ({
|
|
39
|
+
...tool,
|
|
40
|
+
execute: async (args) => {
|
|
41
|
+
const command = tool.name === 'bash' ? String(args.command ?? '') : undefined;
|
|
42
|
+
const filePath = pathArgument(args);
|
|
43
|
+
const networkUrls = [
|
|
44
|
+
...(typeof args.url === 'string' ? [args.url] : []),
|
|
45
|
+
...(command ? extractUrlsFromCommand(command) : []),
|
|
46
|
+
];
|
|
47
|
+
if (command && NETWORK_COMMAND.test(command) && networkUrls.length === 0) {
|
|
48
|
+
const denial = {
|
|
49
|
+
tool: tool.name,
|
|
50
|
+
policy: 'network-access',
|
|
51
|
+
reason: '无人值守网络命令必须包含可校验的绝对 HTTPS URL',
|
|
52
|
+
};
|
|
53
|
+
input.onDenial?.(denial);
|
|
54
|
+
return `Error: ${denial.reason}`;
|
|
55
|
+
}
|
|
56
|
+
for (const networkUrl of networkUrls) {
|
|
57
|
+
const decision = runToolPolicies({ toolName: tool.name, networkUrl, networkPolicy });
|
|
58
|
+
if (!decision.allowed) {
|
|
59
|
+
const denial = {
|
|
60
|
+
tool: tool.name,
|
|
61
|
+
policy: decision.deniedBy ?? 'network-access',
|
|
62
|
+
reason: decision.reason ?? '网络访问被拒绝',
|
|
63
|
+
};
|
|
64
|
+
input.onDenial?.(denial);
|
|
65
|
+
return `Error: ${denial.reason}`;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const policy = runToolPolicies(hardenSchedulePolicyInput({
|
|
69
|
+
toolName: tool.name,
|
|
70
|
+
command,
|
|
71
|
+
filePath,
|
|
72
|
+
rawFilePath: filePath,
|
|
73
|
+
commMessage: input.message,
|
|
74
|
+
config: input.config,
|
|
75
|
+
}, input.context));
|
|
76
|
+
if (!policy.allowed || policy.needsOwnerApproval) {
|
|
77
|
+
const denial = {
|
|
78
|
+
tool: tool.name,
|
|
79
|
+
policy: policy.deniedBy ?? 'schedule-security',
|
|
80
|
+
reason: policy.reason ?? '无人值守执行不允许审批或越权操作',
|
|
81
|
+
};
|
|
82
|
+
input.onDenial?.(denial);
|
|
83
|
+
return `Error: ${denial.reason}`;
|
|
84
|
+
}
|
|
85
|
+
return runWithToolNetworkPolicy(networkPolicy, () => tool.execute(args));
|
|
86
|
+
},
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=security-harness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security-harness.js","sourceRoot":"","sources":["../../src/schedule-domain/security-harness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAwB,MAAM,8BAA8B,CAAC;AAQrF,OAAO,EAAE,wBAAwB,EAA0B,MAAM,uCAAuC,CAAC;AACzG,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAIvE,MAAM,UAAU,6BAA6B,CAC3C,aAAoD,UAAU,EAC9D,iBAA2B,EAAE;IAE7B,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,GAAG,cAAc,CAAC,EAAE,CAAC;AACxF,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAA2B;IAC/D,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC5C,CAAC,CAAC,CAAC,SAAS,CAAU;QACtB,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC;YACjC,CAAC,CAAC,CAAC,MAAM,CAAU;YACnB,CAAC,CAAC,EAAE,CAAC;IACT,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,CAAC;AAC/B,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,WAAW,EAAE,QAAQ;gBACrB,WAAW,EAAE,KAAK,CAAC,OAAO;gBAC1B,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YACnB,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,kBAAkB,EAAE,CAAC;gBACjD,MAAM,MAAM,GAAG;oBACb,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,MAAM,EAAE,MAAM,CAAC,QAAQ,IAAI,mBAAmB;oBAC9C,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,kBAAkB;iBAC5C,CAAC;gBACF,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC;gBACzB,OAAO,UAAU,MAAM,CAAC,MAAM,EAAE,CAAC;YACnC,CAAC;YACD,OAAO,wBAAwB,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3E,CAAC;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,G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,GAAG,CAAC,IAAI,CAAC,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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,10 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { ZhinTool } from '@zhin.js/core';
|
|
5
|
-
import { generateScheduleJobId } from './assistant/schedule-job-service.js';
|
|
1
|
+
/** Generation-owned schedule management and canonical Agent Tool definitions. */
|
|
2
|
+
import { type AgentToolDefinition } from '@zhin.js/tool';
|
|
3
|
+
import { generateScheduleJobId, type ScheduleInvocationContext } from './assistant/schedule-job-service.js';
|
|
6
4
|
import type { ScheduleJobEngine } from './assistant/job-engine.js';
|
|
7
|
-
import type {
|
|
5
|
+
import type { TaskExecutionResult } from './task-executor.js';
|
|
8
6
|
export declare const SCHEDULE_JOBS_FILENAME = "schedule-jobs.json";
|
|
9
7
|
export interface ScheduleManager {
|
|
10
8
|
scheduleFeature: {
|
|
@@ -18,13 +16,14 @@ export interface ScheduleManager {
|
|
|
18
16
|
}>;
|
|
19
17
|
};
|
|
20
18
|
engine: ScheduleJobEngine | null;
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
previewTask?: (prompt: string, context: ScheduleInvocationContext, options?: {
|
|
20
|
+
activityFeedback?: boolean;
|
|
21
|
+
}) => Promise<TaskExecutionResult>;
|
|
22
|
+
}
|
|
23
|
+
export interface ScheduleToolRegistration {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly definition: Readonly<AgentToolDefinition<Record<string, unknown>, unknown>>;
|
|
23
26
|
}
|
|
24
|
-
export declare function setScheduleManager(m: ScheduleManager | null): void;
|
|
25
|
-
/** Generation-safe registration; disposing an older owner cannot clear a newer manager. */
|
|
26
|
-
export declare function registerScheduleManager(manager: ScheduleManager): () => void;
|
|
27
|
-
export declare function getScheduleManager(): ScheduleManager | null;
|
|
28
27
|
export { generateScheduleJobId };
|
|
29
|
-
export declare function createScheduleTools():
|
|
28
|
+
export declare function createScheduleTools(manager: ScheduleManager): readonly ScheduleToolRegistration[];
|
|
30
29
|
//# sourceMappingURL=schedule-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule-manager.d.ts","sourceRoot":"","sources":["../src/schedule-manager.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"schedule-manager.d.ts","sourceRoot":"","sources":["../src/schedule-manager.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,qBAAqB,EAErB,KAAK,yBAAyB,EAC/B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAE3D,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE;QACf,SAAS,IAAI,KAAK,CAAC;YACjB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