@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,171 @@
|
|
|
1
|
+
export const DEFAULT_STRATEGY = Object.freeze({
|
|
2
|
+
family: 'unknown',
|
|
3
|
+
contextWindowThreshold: 128000,
|
|
4
|
+
preferConcise: true,
|
|
5
|
+
detailedToolInstructions: true,
|
|
6
|
+
detailedSecurityRules: true,
|
|
7
|
+
maxPromptChars: 80000,
|
|
8
|
+
style: 'balanced',
|
|
9
|
+
});
|
|
10
|
+
const MODEL_STRATEGIES = [
|
|
11
|
+
[/gpt-?5/i, {
|
|
12
|
+
family: 'gpt-5',
|
|
13
|
+
contextWindowThreshold: 200000,
|
|
14
|
+
preferConcise: false,
|
|
15
|
+
maxPromptChars: 100000,
|
|
16
|
+
style: 'detailed',
|
|
17
|
+
}],
|
|
18
|
+
[/gpt-?4o/i, {
|
|
19
|
+
family: 'gpt-4o',
|
|
20
|
+
contextWindowThreshold: 128000,
|
|
21
|
+
preferConcise: true,
|
|
22
|
+
maxPromptChars: 80000,
|
|
23
|
+
style: 'balanced',
|
|
24
|
+
}],
|
|
25
|
+
[/claude.*opus/i, {
|
|
26
|
+
family: 'claude-opus',
|
|
27
|
+
contextWindowThreshold: 200000,
|
|
28
|
+
preferConcise: false,
|
|
29
|
+
maxPromptChars: 100000,
|
|
30
|
+
style: 'detailed',
|
|
31
|
+
}],
|
|
32
|
+
[/claude.*sonnet/i, {
|
|
33
|
+
family: 'claude-sonnet',
|
|
34
|
+
contextWindowThreshold: 200000,
|
|
35
|
+
preferConcise: true,
|
|
36
|
+
maxPromptChars: 80000,
|
|
37
|
+
style: 'balanced',
|
|
38
|
+
}],
|
|
39
|
+
[/claude.*haiku/i, {
|
|
40
|
+
family: 'claude-haiku',
|
|
41
|
+
contextWindowThreshold: 200000,
|
|
42
|
+
preferConcise: true,
|
|
43
|
+
detailedToolInstructions: false,
|
|
44
|
+
detailedSecurityRules: false,
|
|
45
|
+
maxPromptChars: 40000,
|
|
46
|
+
style: 'concise',
|
|
47
|
+
}],
|
|
48
|
+
[/deepseek/i, {
|
|
49
|
+
family: 'deepseek',
|
|
50
|
+
contextWindowThreshold: 128000,
|
|
51
|
+
preferConcise: true,
|
|
52
|
+
detailedSecurityRules: false,
|
|
53
|
+
maxPromptChars: 60000,
|
|
54
|
+
style: 'balanced',
|
|
55
|
+
}],
|
|
56
|
+
[/mimo/i, {
|
|
57
|
+
family: 'mimo',
|
|
58
|
+
contextWindowThreshold: 32768,
|
|
59
|
+
preferConcise: true,
|
|
60
|
+
detailedToolInstructions: false,
|
|
61
|
+
detailedSecurityRules: false,
|
|
62
|
+
maxPromptChars: 24000,
|
|
63
|
+
style: 'concise',
|
|
64
|
+
}],
|
|
65
|
+
[/nemotron/i, {
|
|
66
|
+
family: 'nemotron',
|
|
67
|
+
contextWindowThreshold: 32768,
|
|
68
|
+
preferConcise: true,
|
|
69
|
+
detailedSecurityRules: false,
|
|
70
|
+
maxPromptChars: 24000,
|
|
71
|
+
style: 'concise',
|
|
72
|
+
}],
|
|
73
|
+
[/glm/i, {
|
|
74
|
+
family: 'glm',
|
|
75
|
+
contextWindowThreshold: 128000,
|
|
76
|
+
preferConcise: true,
|
|
77
|
+
detailedSecurityRules: false,
|
|
78
|
+
maxPromptChars: 60000,
|
|
79
|
+
style: 'balanced',
|
|
80
|
+
}],
|
|
81
|
+
[/agnes/i, {
|
|
82
|
+
family: 'agnes',
|
|
83
|
+
contextWindowThreshold: 128000,
|
|
84
|
+
preferConcise: true,
|
|
85
|
+
maxPromptChars: 60000,
|
|
86
|
+
style: 'balanced',
|
|
87
|
+
}],
|
|
88
|
+
[/step[- ]?\d/i, {
|
|
89
|
+
family: 'step',
|
|
90
|
+
contextWindowThreshold: 128000,
|
|
91
|
+
preferConcise: true,
|
|
92
|
+
maxPromptChars: 60000,
|
|
93
|
+
style: 'balanced',
|
|
94
|
+
}],
|
|
95
|
+
[/magistral/i, {
|
|
96
|
+
family: 'magistral',
|
|
97
|
+
contextWindowThreshold: 128000,
|
|
98
|
+
preferConcise: true,
|
|
99
|
+
maxPromptChars: 60000,
|
|
100
|
+
style: 'balanced',
|
|
101
|
+
}],
|
|
102
|
+
[/codestral/i, {
|
|
103
|
+
family: 'codestral',
|
|
104
|
+
contextWindowThreshold: 32768,
|
|
105
|
+
preferConcise: true,
|
|
106
|
+
detailedSecurityRules: false,
|
|
107
|
+
maxPromptChars: 24000,
|
|
108
|
+
style: 'concise',
|
|
109
|
+
}],
|
|
110
|
+
[/gemini/i, {
|
|
111
|
+
family: 'gemini',
|
|
112
|
+
contextWindowThreshold: 1000000,
|
|
113
|
+
preferConcise: false,
|
|
114
|
+
maxPromptChars: 100000,
|
|
115
|
+
style: 'detailed',
|
|
116
|
+
}],
|
|
117
|
+
[/qwen/i, {
|
|
118
|
+
family: 'qwen',
|
|
119
|
+
contextWindowThreshold: 128000,
|
|
120
|
+
preferConcise: true,
|
|
121
|
+
detailedSecurityRules: false,
|
|
122
|
+
maxPromptChars: 60000,
|
|
123
|
+
style: 'balanced',
|
|
124
|
+
}],
|
|
125
|
+
[/llama/i, {
|
|
126
|
+
family: 'llama',
|
|
127
|
+
contextWindowThreshold: 8192,
|
|
128
|
+
preferConcise: true,
|
|
129
|
+
detailedToolInstructions: false,
|
|
130
|
+
detailedSecurityRules: false,
|
|
131
|
+
maxPromptChars: 30000,
|
|
132
|
+
style: 'concise',
|
|
133
|
+
}],
|
|
134
|
+
[/gemma/i, {
|
|
135
|
+
family: 'gemma',
|
|
136
|
+
contextWindowThreshold: 8192,
|
|
137
|
+
preferConcise: true,
|
|
138
|
+
detailedToolInstructions: false,
|
|
139
|
+
detailedSecurityRules: false,
|
|
140
|
+
maxPromptChars: 30000,
|
|
141
|
+
style: 'concise',
|
|
142
|
+
}],
|
|
143
|
+
[/intern/i, {
|
|
144
|
+
family: 'intern',
|
|
145
|
+
contextWindowThreshold: 32768,
|
|
146
|
+
preferConcise: true,
|
|
147
|
+
detailedToolInstructions: false,
|
|
148
|
+
detailedSecurityRules: false,
|
|
149
|
+
maxPromptChars: 24000,
|
|
150
|
+
style: 'concise',
|
|
151
|
+
}],
|
|
152
|
+
[/flux|schnell/i, {
|
|
153
|
+
family: 'flux',
|
|
154
|
+
contextWindowThreshold: 4096,
|
|
155
|
+
preferConcise: true,
|
|
156
|
+
detailedToolInstructions: false,
|
|
157
|
+
detailedSecurityRules: false,
|
|
158
|
+
maxPromptChars: 8000,
|
|
159
|
+
style: 'concise',
|
|
160
|
+
}],
|
|
161
|
+
];
|
|
162
|
+
export function resolveModelStrategy(modelId) {
|
|
163
|
+
const root = modelId.includes('/') ? modelId.slice(modelId.indexOf('/') + 1) : modelId;
|
|
164
|
+
for (const [pattern, partial] of MODEL_STRATEGIES) {
|
|
165
|
+
if (pattern.test(root)) {
|
|
166
|
+
return { ...DEFAULT_STRATEGY, ...partial };
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return DEFAULT_STRATEGY;
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=model-prompt-strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-prompt-strategy.js","sourceRoot":"","sources":["../../src/prompt/model-prompt-strategy.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-references.d.ts","sourceRoot":"","sources":["../../../src/prompt/rules/code-references.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,QASzB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const CODE_REFERENCE_RULES = `
|
|
2
|
+
<code_references>
|
|
3
|
+
When referencing specific functions or code locations, use the pattern:
|
|
4
|
+
\`file_path:line_number\`
|
|
5
|
+
|
|
6
|
+
Examples:
|
|
7
|
+
- "The error is handled in src/main.ts:45"
|
|
8
|
+
- "See the implementation in src/utils/helper.ts:123-145"
|
|
9
|
+
</code_references>
|
|
10
|
+
`.trim();
|
|
11
|
+
//# sourceMappingURL=code-references.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-references.js","sourceRoot":"","sources":["../../../src/prompt/rules/code-references.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;CASnC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"critical-rules.d.ts","sourceRoot":"","sources":["../../../src/prompt/rules/critical-rules.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QAenB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const CRITICAL_RULES = `
|
|
2
|
+
<critical_rules>
|
|
3
|
+
These rules override everything else. Follow them strictly:
|
|
4
|
+
|
|
5
|
+
1. **BE AUTONOMOUS**: Don't ask questions - search, think, decide, act. Use tools when available.
|
|
6
|
+
2. **TOOL OVER MEMORY**: When a tool can answer a question (weather, calculation, search), call it. Never answer from training data alone.
|
|
7
|
+
3. **FOLLOW MEMORY**: If memory files contain specific instructions, you MUST follow them.
|
|
8
|
+
4. **MATCH USER LANGUAGE**: Reply in the same language the user uses. Default to Chinese if SOUL.md specifies it.
|
|
9
|
+
5. **BE CONCISE**: Keep output concise — match complexity to the question. Simple question = short answer.
|
|
10
|
+
6. **SECURITY FIRST**: Only assist with defensive security tasks. Never disclose internal implementation details.
|
|
11
|
+
7. **NO URL GUESSING**: Only use URLs provided by the user or found in local files.
|
|
12
|
+
8. **LOAD MATCHING SKILLS**: If any available skill matches the current task, you MUST load it.
|
|
13
|
+
9. **READ BEFORE EDIT**: Never edit a file you haven't read the relevant context for.
|
|
14
|
+
10. **NO HALLUCINATION**: Never claim actions, results, or system state unless confirmed by tool output.
|
|
15
|
+
</critical_rules>
|
|
16
|
+
`.trim();
|
|
17
|
+
//# sourceMappingURL=critical-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"critical-rules.js","sourceRoot":"","sources":["../../../src/prompt/rules/critical-rules.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;CAe7B,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editing.d.ts","sourceRoot":"","sources":["../../../src/prompt/rules/editing.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,QAgBlB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const EDITING_RULES = `
|
|
2
|
+
<whitespace_and_exact_matching>
|
|
3
|
+
The Edit tool is extremely literal. "Close enough" will fail.
|
|
4
|
+
|
|
5
|
+
**Before every edit:**
|
|
6
|
+
1. View the file and locate the exact lines to change
|
|
7
|
+
2. Copy the text EXACTLY including spaces, tabs, blank lines
|
|
8
|
+
3. Include enough surrounding lines (3-5) to make it unique
|
|
9
|
+
4. Double-check indentation level matches
|
|
10
|
+
|
|
11
|
+
**If edit fails:**
|
|
12
|
+
- View the file again at the specific location
|
|
13
|
+
- Copy even more context
|
|
14
|
+
- Check for tabs vs spaces
|
|
15
|
+
- Never retry with guessed changes - get the exact text first
|
|
16
|
+
</whitespace_and_exact_matching>
|
|
17
|
+
`.trim();
|
|
18
|
+
//# sourceMappingURL=editing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editing.js","sourceRoot":"","sources":["../../../src/prompt/rules/editing.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;CAgB5B,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../../src/prompt/rules/error-handling.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,QAgBzB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const ERROR_HANDLING_RULES = `
|
|
2
|
+
<error_handling>
|
|
3
|
+
When errors occur:
|
|
4
|
+
1. Read complete error message
|
|
5
|
+
2. Understand root cause (isolate with minimal reproduction)
|
|
6
|
+
3. Try different approach (don't repeat same action)
|
|
7
|
+
4. Search for similar code that works
|
|
8
|
+
5. Make targeted fix
|
|
9
|
+
6. Test to verify
|
|
10
|
+
|
|
11
|
+
**Edit tool "old_string not found":**
|
|
12
|
+
- View the file again at the target location
|
|
13
|
+
- Copy the EXACT text including all whitespace
|
|
14
|
+
- Include more surrounding context (full function if needed)
|
|
15
|
+
- Check for tabs vs spaces, extra/missing blank lines
|
|
16
|
+
</error_handling>
|
|
17
|
+
`.trim();
|
|
18
|
+
//# sourceMappingURL=error-handling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handling.js","sourceRoot":"","sources":["../../../src/prompt/rules/error-handling.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;CAgBnC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { CRITICAL_RULES } from './critical-rules.js';
|
|
2
|
+
export { WORKFLOW_RULES } from './workflow-rules.js';
|
|
3
|
+
export { ERROR_HANDLING_RULES } from './error-handling.js';
|
|
4
|
+
export { TASK_COMPLETION_RULES } from './task-completion.js';
|
|
5
|
+
export { EDITING_RULES } from './editing.js';
|
|
6
|
+
export { MEMORY_INSTRUCTIONS } from './memory.js';
|
|
7
|
+
export { CODE_REFERENCE_RULES } from './code-references.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/prompt/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { CRITICAL_RULES } from './critical-rules.js';
|
|
2
|
+
export { WORKFLOW_RULES } from './workflow-rules.js';
|
|
3
|
+
export { ERROR_HANDLING_RULES } from './error-handling.js';
|
|
4
|
+
export { TASK_COMPLETION_RULES } from './task-completion.js';
|
|
5
|
+
export { EDITING_RULES } from './editing.js';
|
|
6
|
+
export { MEMORY_INSTRUCTIONS } from './memory.js';
|
|
7
|
+
export { CODE_REFERENCE_RULES } from './code-references.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/prompt/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/prompt/rules/memory.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,QAWxB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const MEMORY_INSTRUCTIONS = `
|
|
2
|
+
<memory_instructions>
|
|
3
|
+
Memory files store commands, preferences, and codebase info.
|
|
4
|
+
Update them when you discover:
|
|
5
|
+
- Build/test/lint commands
|
|
6
|
+
- Code style preferences
|
|
7
|
+
- Important codebase patterns
|
|
8
|
+
- Useful project information
|
|
9
|
+
|
|
10
|
+
Check memory before executing tasks. Follow stored instructions when found.
|
|
11
|
+
</memory_instructions>
|
|
12
|
+
`.trim();
|
|
13
|
+
//# sourceMappingURL=memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../src/prompt/rules/memory.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;CAWlC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-completion.d.ts","sourceRoot":"","sources":["../../../src/prompt/rules/task-completion.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,QAS1B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const TASK_COMPLETION_RULES = `
|
|
2
|
+
<task_completion>
|
|
3
|
+
Ensure every task is implemented completely:
|
|
4
|
+
1. **Think before acting** — identify all components that need changes
|
|
5
|
+
2. **Implement end-to-end** — update all affected files, no TODOs
|
|
6
|
+
3. **Verify before finishing** — re-read original request, run tests
|
|
7
|
+
|
|
8
|
+
Only say "Done" when truly done — never stop mid-task.
|
|
9
|
+
</task_completion>
|
|
10
|
+
`.trim();
|
|
11
|
+
//# sourceMappingURL=task-completion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-completion.js","sourceRoot":"","sources":["../../../src/prompt/rules/task-completion.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;CASpC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-rules.d.ts","sourceRoot":"","sources":["../../../src/prompt/rules/workflow-rules.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QAyBnB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const WORKFLOW_RULES = `
|
|
2
|
+
<workflow>
|
|
3
|
+
For every task, follow this sequence internally (don't narrate it):
|
|
4
|
+
|
|
5
|
+
**Before acting:**
|
|
6
|
+
- Search codebase for relevant files
|
|
7
|
+
- Read files to understand current state
|
|
8
|
+
- Check memory for stored commands
|
|
9
|
+
- Identify what needs to change
|
|
10
|
+
|
|
11
|
+
**While acting:**
|
|
12
|
+
- Read entire file before editing it
|
|
13
|
+
- Before editing: verify exact whitespace from View output
|
|
14
|
+
- Use exact text for find/replace (include whitespace)
|
|
15
|
+
- Make one logical change at a time
|
|
16
|
+
- After each change: run tests
|
|
17
|
+
- If tests fail: fix immediately
|
|
18
|
+
- Keep going until query is completely resolved
|
|
19
|
+
|
|
20
|
+
**Before finishing:**
|
|
21
|
+
- Verify ENTIRE query is resolved
|
|
22
|
+
- Run lint/typecheck if in memory
|
|
23
|
+
- Verify all changes work
|
|
24
|
+
- Keep response under 4 lines
|
|
25
|
+
</workflow>
|
|
26
|
+
`.trim();
|
|
27
|
+
//# sourceMappingURL=workflow-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-rules.js","sourceRoot":"","sources":["../../../src/prompt/rules/workflow-rules.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyB7B,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -4,20 +4,13 @@
|
|
|
4
4
|
* 常驻提示词保持短小:身份由 persona 表达,固定段只保留上下文、风格、
|
|
5
5
|
* 工具、安全,以及按需注入的平台、技能、记忆和 Bootstrap 上下文。
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
8
|
-
import type { ContentPart, AgentMessage } from '@zhin.js/ai';
|
|
7
|
+
import type { AgentMessage } from '@zhin.js/ai';
|
|
9
8
|
import type { SkillRegistry } from '../orchestrator/skill-registry.js';
|
|
10
9
|
import { type ZhinAgentConfig } from '../config/index.js';
|
|
11
|
-
import {
|
|
10
|
+
import type { TurnContextView } from '../context/turn-envelope.js';
|
|
12
11
|
export declare const FIXED_DISCIPLINE_RULES: readonly ["Never claim actions, results, or system state unless confirmed by tool output.", "If a capability is unavailable, state it honestly and suggest the closest valid alternative.", "Lead with the answer or result; avoid unnecessary preambles and filler."];
|
|
13
|
-
export declare function contentToText(c: string | ContentPart[] | ContentPart | null | undefined): string;
|
|
14
12
|
/** @deprecated 主路径使用 contextRepository 原生 messages;保留供兼容调用。 */
|
|
15
13
|
export declare function buildUserMessageWithHistory(history: AgentMessage[], currentContent: string): string;
|
|
16
|
-
export declare function buildEnhancedPersona(config: Required<ZhinAgentConfig>, profileSummary: string, toneHint: string): string;
|
|
17
|
-
/** 从 Message 重算 SenderRole 并推导文件策略档位(提示词 §3b) */
|
|
18
|
-
export declare function resolvePromptFileRole(commMessage: Message): FileRole | undefined;
|
|
19
|
-
/** @deprecated 已并入 {@link buildContextSection};保留空实现避免重复 Context 行 */
|
|
20
|
-
export declare function buildContextHint(_commMessage: Message, _content: string): string;
|
|
21
14
|
export interface RichSystemPromptContext {
|
|
22
15
|
config: Required<ZhinAgentConfig>;
|
|
23
16
|
skillRegistry: SkillRegistry | null;
|
|
@@ -28,12 +21,20 @@ export interface RichSystemPromptContext {
|
|
|
28
21
|
toolSearchDeferredStats?: string;
|
|
29
22
|
/** Per-platform markdown from AgentPromptContributor (§6c). */
|
|
30
23
|
platformSections?: string;
|
|
31
|
-
/**
|
|
32
|
-
|
|
24
|
+
/** Canonical turn identity; never an IM Message adapter. */
|
|
25
|
+
turn?: TurnContextView;
|
|
33
26
|
/** SDK 分治编排片段(workspace prompts/orchestrator*.md) */
|
|
34
27
|
orchestratorSdk?: string;
|
|
35
28
|
/** ai.agents.*.nickname(经 activeBinding 解析) */
|
|
36
29
|
agentNickname?: string;
|
|
30
|
+
/** 单行 git 状态摘要(并入 §1 Runtime 信息行) */
|
|
31
|
+
gitStatus?: string;
|
|
32
|
+
/** 全局上下文文件段(默认路径 + config.contextPaths,置于 bootstrap 之前) */
|
|
33
|
+
globalContext?: string;
|
|
34
|
+
/** 当前模型 id(用于模型感知提示词策略) */
|
|
35
|
+
modelId?: string;
|
|
36
|
+
/** 模型上下文窗口大小 */
|
|
37
|
+
contextWindow?: number;
|
|
37
38
|
}
|
|
38
39
|
/** 单段字符数统计(日志 / Harness debug;与 buildRichSystemPrompt 分段一致) */
|
|
39
40
|
export interface PromptSectionDebugInfo {
|
|
@@ -45,19 +46,15 @@ export interface PromptSectionDebugInfo {
|
|
|
45
46
|
* 用于观测渐进披露与 token 压力,不改变线上 prompt 拼接逻辑。
|
|
46
47
|
*/
|
|
47
48
|
export declare function describePromptSectionsForDebug(ctx: RichSystemPromptContext): PromptSectionDebugInfo[];
|
|
48
|
-
export declare function buildRichSystemPrompt(ctx: RichSystemPromptContext): string;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* 这是一个更现代的提示词构建方式,支持:
|
|
53
|
-
* - 分层提示词结构
|
|
54
|
-
* - 优先级排序
|
|
55
|
-
* - 字符数截断
|
|
56
|
-
* - 安全规则嵌入
|
|
50
|
+
* 系统提示词总量护栏:超预算时按牺牲顺序(数组靠前的可截断段先压缩)
|
|
51
|
+
* 尾部截断,仍超长再整段丢弃;truncatable=false 段(runtime/orchestration/security)不动。
|
|
57
52
|
*/
|
|
58
|
-
export declare function
|
|
53
|
+
export declare function enforcePromptBudget(sections: {
|
|
54
|
+
content: string | null;
|
|
55
|
+
truncatable: boolean;
|
|
56
|
+
}[], maxChars: number): string;
|
|
57
|
+
export declare function buildRichSystemPrompt(ctx: RichSystemPromptContext): string;
|
|
59
58
|
/** Vision / lite paths: persona + optional platform + context hint. */
|
|
60
59
|
export declare function buildLiteSystemPromptWithPlatform(personaBlock: string, platformSections?: string, contextHint?: string): string;
|
|
61
|
-
/** @deprecated 引用说明已迁入 context/turn-envelope [Turn context] */
|
|
62
|
-
export declare function appendQuoteContextSystemHint(prompt: string, commMessage?: AgentTurnMessage): string;
|
|
63
60
|
//# sourceMappingURL=system-prompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/prompt/system-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/prompt/system-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAiC,MAAM,aAAa,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,KAAK,eAAe,EAA+D,MAAM,oBAAoB,CAAC;AAGvH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAYnE,eAAO,MAAM,sBAAsB,wQAIzB,CAAC;AAuBX,+DAA+D;AAC/D,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAQnG;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAClC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,sDAAsD;IACtD,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4DAA4D;IAC5D,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA2OD,+DAA+D;AAC/D,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,uBAAuB,GAAG,sBAAsB,EAAE,CA6BrG;AAID;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE;IAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,EAAE,EAC5D,QAAQ,EAAE,MAAM,GACf,MAAM,CAqBR;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,uBAAuB,GAAG,MAAM,CAiC1E;AAGD,uEAAuE;AACvE,wBAAgB,iCAAiC,CAC/C,YAAY,EAAE,MAAM,EACpB,gBAAgB,CAAC,EAAE,MAAM,EACzB,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CAOR"}
|