@qlingzzy/qling 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +122 -0
- package/LICENSE +21 -0
- package/README.en.md +129 -0
- package/README.md +416 -0
- package/dist/agent/subtask.d.ts +21 -0
- package/dist/agent/subtask.d.ts.map +1 -0
- package/dist/agent/subtask.js +55 -0
- package/dist/agent-loop.d.ts +151 -0
- package/dist/agent-loop.d.ts.map +1 -0
- package/dist/agent-loop.js +1498 -0
- package/dist/agents/isolation-policy.d.ts +14 -0
- package/dist/agents/isolation-policy.d.ts.map +1 -0
- package/dist/agents/isolation-policy.js +52 -0
- package/dist/channels/console-channel.d.ts +15 -0
- package/dist/channels/console-channel.d.ts.map +1 -0
- package/dist/channels/console-channel.js +66 -0
- package/dist/channels/registry.d.ts +10 -0
- package/dist/channels/registry.d.ts.map +1 -0
- package/dist/channels/registry.js +25 -0
- package/dist/channels/slack-channel.d.ts +35 -0
- package/dist/channels/slack-channel.d.ts.map +1 -0
- package/dist/channels/slack-channel.js +232 -0
- package/dist/channels/telegram-channel.d.ts +32 -0
- package/dist/channels/telegram-channel.d.ts.map +1 -0
- package/dist/channels/telegram-channel.js +167 -0
- package/dist/channels/types.d.ts +31 -0
- package/dist/channels/types.d.ts.map +1 -0
- package/dist/channels/types.js +4 -0
- package/dist/cli/bootstrap.d.ts +39 -0
- package/dist/cli/bootstrap.d.ts.map +1 -0
- package/dist/cli/bootstrap.js +138 -0
- package/dist/cli/channel-bootstrap.d.ts +23 -0
- package/dist/cli/channel-bootstrap.d.ts.map +1 -0
- package/dist/cli/channel-bootstrap.js +46 -0
- package/dist/cli/daemon-control.d.ts +31 -0
- package/dist/cli/daemon-control.d.ts.map +1 -0
- package/dist/cli/daemon-control.js +177 -0
- package/dist/cli/guidance-panel.d.ts +11 -0
- package/dist/cli/guidance-panel.d.ts.map +1 -0
- package/dist/cli/guidance-panel.js +16 -0
- package/dist/cli/mcp-control.d.ts +7 -0
- package/dist/cli/mcp-control.d.ts.map +1 -0
- package/dist/cli/mcp-control.js +119 -0
- package/dist/cli/mission-views.d.ts +13 -0
- package/dist/cli/mission-views.d.ts.map +1 -0
- package/dist/cli/mission-views.js +82 -0
- package/dist/cli/setup.d.ts +9 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +140 -0
- package/dist/cli/startup-contract.d.ts +23 -0
- package/dist/cli/startup-contract.d.ts.map +1 -0
- package/dist/cli/startup-contract.js +694 -0
- package/dist/commands/agents.d.ts +3 -0
- package/dist/commands/agents.d.ts.map +1 -0
- package/dist/commands/agents.js +44 -0
- package/dist/commands/checkpoint.d.ts +3 -0
- package/dist/commands/checkpoint.d.ts.map +1 -0
- package/dist/commands/checkpoint.js +52 -0
- package/dist/commands/claude-style.d.ts +12 -0
- package/dist/commands/claude-style.d.ts.map +1 -0
- package/dist/commands/claude-style.js +560 -0
- package/dist/commands/clear.d.ts +3 -0
- package/dist/commands/clear.d.ts.map +1 -0
- package/dist/commands/clear.js +20 -0
- package/dist/commands/compact.d.ts +3 -0
- package/dist/commands/compact.d.ts.map +1 -0
- package/dist/commands/compact.js +23 -0
- package/dist/commands/config.d.ts +3 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +22 -0
- package/dist/commands/connect.d.ts +3 -0
- package/dist/commands/connect.d.ts.map +1 -0
- package/dist/commands/connect.js +102 -0
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +13 -0
- package/dist/commands/dashboard.d.ts +3 -0
- package/dist/commands/dashboard.d.ts.map +1 -0
- package/dist/commands/dashboard.js +22 -0
- package/dist/commands/detach.d.ts +3 -0
- package/dist/commands/detach.d.ts.map +1 -0
- package/dist/commands/detach.js +44 -0
- package/dist/commands/distill.d.ts +3 -0
- package/dist/commands/distill.d.ts.map +1 -0
- package/dist/commands/distill.js +23 -0
- package/dist/commands/doctor.d.ts +3 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +13 -0
- package/dist/commands/dream.d.ts +3 -0
- package/dist/commands/dream.d.ts.map +1 -0
- package/dist/commands/dream.js +59 -0
- package/dist/commands/export.d.ts +3 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +18 -0
- package/dist/commands/exports.d.ts +3 -0
- package/dist/commands/exports.d.ts.map +1 -0
- package/dist/commands/exports.js +15 -0
- package/dist/commands/goal.d.ts +3 -0
- package/dist/commands/goal.d.ts.map +1 -0
- package/dist/commands/goal.js +147 -0
- package/dist/commands/help.d.ts +4 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +75 -0
- package/dist/commands/hooks.d.ts +3 -0
- package/dist/commands/hooks.d.ts.map +1 -0
- package/dist/commands/hooks.js +14 -0
- package/dist/commands/index.d.ts +29 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +417 -0
- package/dist/commands/knowledge.d.ts +8 -0
- package/dist/commands/knowledge.d.ts.map +1 -0
- package/dist/commands/knowledge.js +191 -0
- package/dist/commands/loop.d.ts +3 -0
- package/dist/commands/loop.d.ts.map +1 -0
- package/dist/commands/loop.js +138 -0
- package/dist/commands/mcp.d.ts +3 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +57 -0
- package/dist/commands/memory.d.ts +3 -0
- package/dist/commands/memory.d.ts.map +1 -0
- package/dist/commands/memory.js +215 -0
- package/dist/commands/mission.d.ts +3 -0
- package/dist/commands/mission.d.ts.map +1 -0
- package/dist/commands/mission.js +129 -0
- package/dist/commands/permissions.d.ts +3 -0
- package/dist/commands/permissions.d.ts.map +1 -0
- package/dist/commands/permissions.js +82 -0
- package/dist/commands/privacy.d.ts +3 -0
- package/dist/commands/privacy.d.ts.map +1 -0
- package/dist/commands/privacy.js +13 -0
- package/dist/commands/recap.d.ts +3 -0
- package/dist/commands/recap.d.ts.map +1 -0
- package/dist/commands/recap.js +11 -0
- package/dist/commands/repomap.d.ts +3 -0
- package/dist/commands/repomap.d.ts.map +1 -0
- package/dist/commands/repomap.js +146 -0
- package/dist/commands/resume.d.ts +3 -0
- package/dist/commands/resume.d.ts.map +1 -0
- package/dist/commands/resume.js +42 -0
- package/dist/commands/runtime.d.ts +61 -0
- package/dist/commands/runtime.d.ts.map +1 -0
- package/dist/commands/runtime.js +20 -0
- package/dist/commands/sessions.d.ts +3 -0
- package/dist/commands/sessions.d.ts.map +1 -0
- package/dist/commands/sessions.js +34 -0
- package/dist/commands/shortcuts.d.ts +3 -0
- package/dist/commands/shortcuts.d.ts.map +1 -0
- package/dist/commands/shortcuts.js +12 -0
- package/dist/commands/skill.d.ts +3 -0
- package/dist/commands/skill.d.ts.map +1 -0
- package/dist/commands/skill.js +20 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +31 -0
- package/dist/commands/statusline.d.ts +3 -0
- package/dist/commands/statusline.d.ts.map +1 -0
- package/dist/commands/statusline.js +40 -0
- package/dist/commands/storage.d.ts +3 -0
- package/dist/commands/storage.d.ts.map +1 -0
- package/dist/commands/storage.js +122 -0
- package/dist/commands/tasks.d.ts +3 -0
- package/dist/commands/tasks.d.ts.map +1 -0
- package/dist/commands/tasks.js +117 -0
- package/dist/commands/types.d.ts +14 -0
- package/dist/commands/types.d.ts.map +1 -0
- package/dist/commands/types.js +1 -0
- package/dist/commands/verify.d.ts +3 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +86 -0
- package/dist/config-report.d.ts +35 -0
- package/dist/config-report.d.ts.map +1 -0
- package/dist/config-report.js +100 -0
- package/dist/config.d.ts +217 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +690 -0
- package/dist/context-compactor.d.ts +27 -0
- package/dist/context-compactor.d.ts.map +1 -0
- package/dist/context-compactor.js +489 -0
- package/dist/context-report.d.ts +35 -0
- package/dist/context-report.d.ts.map +1 -0
- package/dist/context-report.js +172 -0
- package/dist/daemon.d.ts +2 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +316 -0
- package/dist/dashboard-server.d.ts +18 -0
- package/dist/dashboard-server.d.ts.map +1 -0
- package/dist/dashboard-server.js +325 -0
- package/dist/discovery-registry.d.ts +28 -0
- package/dist/discovery-registry.d.ts.map +1 -0
- package/dist/discovery-registry.js +106 -0
- package/dist/discovery-types.d.ts +54 -0
- package/dist/discovery-types.d.ts.map +1 -0
- package/dist/discovery-types.js +5 -0
- package/dist/doctor.d.ts +31 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +343 -0
- package/dist/eval/runner.d.ts +10 -0
- package/dist/eval/runner.d.ts.map +1 -0
- package/dist/eval/runner.js +78 -0
- package/dist/eval/tasks.d.ts +3 -0
- package/dist/eval/tasks.d.ts.map +1 -0
- package/dist/eval/tasks.js +179 -0
- package/dist/eval/types.d.ts +31 -0
- package/dist/eval/types.d.ts.map +1 -0
- package/dist/eval/types.js +4 -0
- package/dist/git/auto-commit.d.ts +28 -0
- package/dist/git/auto-commit.d.ts.map +1 -0
- package/dist/git/auto-commit.js +112 -0
- package/dist/guard/approval.d.ts +16 -0
- package/dist/guard/approval.d.ts.map +1 -0
- package/dist/guard/approval.js +68 -0
- package/dist/guard/content-filter.d.ts +15 -0
- package/dist/guard/content-filter.d.ts.map +1 -0
- package/dist/guard/content-filter.js +102 -0
- package/dist/guard/permissions.d.ts +17 -0
- package/dist/guard/permissions.d.ts.map +1 -0
- package/dist/guard/permissions.js +54 -0
- package/dist/guard/rate-limit.d.ts +14 -0
- package/dist/guard/rate-limit.d.ts.map +1 -0
- package/dist/guard/rate-limit.js +47 -0
- package/dist/guard.d.ts +21 -0
- package/dist/guard.d.ts.map +1 -0
- package/dist/guard.js +144 -0
- package/dist/help-topics.d.ts +19 -0
- package/dist/help-topics.d.ts.map +1 -0
- package/dist/help-topics.js +391 -0
- package/dist/hooks-report.d.ts +23 -0
- package/dist/hooks-report.d.ts.map +1 -0
- package/dist/hooks-report.js +44 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +4 -0
- package/dist/i18n/zh-cn.d.ts +180 -0
- package/dist/i18n/zh-cn.d.ts.map +1 -0
- package/dist/i18n/zh-cn.js +184 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1157 -0
- package/dist/knowledge-agent.d.ts +47 -0
- package/dist/knowledge-agent.d.ts.map +1 -0
- package/dist/knowledge-agent.js +320 -0
- package/dist/local-status-report.d.ts +23 -0
- package/dist/local-status-report.d.ts.map +1 -0
- package/dist/local-status-report.js +63 -0
- package/dist/local-storage-report.d.ts +32 -0
- package/dist/local-storage-report.d.ts.map +1 -0
- package/dist/local-storage-report.js +171 -0
- package/dist/mcp/bridge.d.ts +11 -0
- package/dist/mcp/bridge.d.ts.map +1 -0
- package/dist/mcp/bridge.js +37 -0
- package/dist/mcp/client.d.ts +26 -0
- package/dist/mcp/client.d.ts.map +1 -0
- package/dist/mcp/client.js +209 -0
- package/dist/mcp/http-transport.d.ts +21 -0
- package/dist/mcp/http-transport.d.ts.map +1 -0
- package/dist/mcp/http-transport.js +126 -0
- package/dist/mcp/presets.d.ts +22 -0
- package/dist/mcp/presets.d.ts.map +1 -0
- package/dist/mcp/presets.js +80 -0
- package/dist/mcp/registry.d.ts +23 -0
- package/dist/mcp/registry.d.ts.map +1 -0
- package/dist/mcp/registry.js +85 -0
- package/dist/mcp/stdio-transport.d.ts +25 -0
- package/dist/mcp/stdio-transport.d.ts.map +1 -0
- package/dist/mcp/stdio-transport.js +92 -0
- package/dist/mcp/store.d.ts +41 -0
- package/dist/mcp/store.d.ts.map +1 -0
- package/dist/mcp/store.js +100 -0
- package/dist/mcp/types.d.ts +40 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +4 -0
- package/dist/mcp-report.d.ts +30 -0
- package/dist/mcp-report.d.ts.map +1 -0
- package/dist/mcp-report.js +104 -0
- package/dist/memory/cognitive-index.d.ts +56 -0
- package/dist/memory/cognitive-index.d.ts.map +1 -0
- package/dist/memory/cognitive-index.js +265 -0
- package/dist/memory/compactor.d.ts +28 -0
- package/dist/memory/compactor.d.ts.map +1 -0
- package/dist/memory/compactor.js +92 -0
- package/dist/memory/consolidation.d.ts +13 -0
- package/dist/memory/consolidation.d.ts.map +1 -0
- package/dist/memory/consolidation.js +77 -0
- package/dist/memory/embedding.d.ts +15 -0
- package/dist/memory/embedding.d.ts.map +1 -0
- package/dist/memory/embedding.js +59 -0
- package/dist/memory/memory-llm-dream.d.ts +3 -0
- package/dist/memory/memory-llm-dream.d.ts.map +1 -0
- package/dist/memory/memory-llm-dream.js +59 -0
- package/dist/memory/projection-worker.d.ts +30 -0
- package/dist/memory/projection-worker.d.ts.map +1 -0
- package/dist/memory/projection-worker.js +92 -0
- package/dist/memory/semantic-index.d.ts +18 -0
- package/dist/memory/semantic-index.d.ts.map +1 -0
- package/dist/memory/semantic-index.js +86 -0
- package/dist/memory/wal.d.ts +33 -0
- package/dist/memory/wal.d.ts.map +1 -0
- package/dist/memory/wal.js +131 -0
- package/dist/memory-report.d.ts +120 -0
- package/dist/memory-report.d.ts.map +1 -0
- package/dist/memory-report.js +726 -0
- package/dist/memory.d.ts +149 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +632 -0
- package/dist/metrics/agent-telemetry.d.ts +14 -0
- package/dist/metrics/agent-telemetry.d.ts.map +1 -0
- package/dist/metrics/agent-telemetry.js +44 -0
- package/dist/metrics/collector.d.ts +17 -0
- package/dist/metrics/collector.d.ts.map +1 -0
- package/dist/metrics/collector.js +137 -0
- package/dist/metrics/types.d.ts +14 -0
- package/dist/metrics/types.d.ts.map +1 -0
- package/dist/metrics/types.js +4 -0
- package/dist/mission/manager.d.ts +28 -0
- package/dist/mission/manager.d.ts.map +1 -0
- package/dist/mission/manager.js +208 -0
- package/dist/mission/types.d.ts +37 -0
- package/dist/mission/types.d.ts.map +1 -0
- package/dist/mission/types.js +5 -0
- package/dist/onboarding/tutorial.d.ts +33 -0
- package/dist/onboarding/tutorial.d.ts.map +1 -0
- package/dist/onboarding/tutorial.js +96 -0
- package/dist/output-style.d.ts +14 -0
- package/dist/output-style.d.ts.map +1 -0
- package/dist/output-style.js +29 -0
- package/dist/package-version.d.ts +12 -0
- package/dist/package-version.d.ts.map +1 -0
- package/dist/package-version.js +42 -0
- package/dist/permissions-report.d.ts +42 -0
- package/dist/permissions-report.d.ts.map +1 -0
- package/dist/permissions-report.js +120 -0
- package/dist/pipeline/consistency-checker.d.ts +8 -0
- package/dist/pipeline/consistency-checker.d.ts.map +1 -0
- package/dist/pipeline/consistency-checker.js +40 -0
- package/dist/pipeline/example-generator.d.ts +4 -0
- package/dist/pipeline/example-generator.d.ts.map +1 -0
- package/dist/pipeline/example-generator.js +64 -0
- package/dist/pipeline/hooks.d.ts +68 -0
- package/dist/pipeline/hooks.d.ts.map +1 -0
- package/dist/pipeline/hooks.js +377 -0
- package/dist/pipeline/sections.d.ts +41 -0
- package/dist/pipeline/sections.d.ts.map +1 -0
- package/dist/pipeline/sections.js +244 -0
- package/dist/pipeline/verification.d.ts +12 -0
- package/dist/pipeline/verification.d.ts.map +1 -0
- package/dist/pipeline/verification.js +138 -0
- package/dist/privacy-report.d.ts +24 -0
- package/dist/privacy-report.d.ts.map +1 -0
- package/dist/privacy-report.js +78 -0
- package/dist/providers/presets.d.ts +25 -0
- package/dist/providers/presets.d.ts.map +1 -0
- package/dist/providers/presets.js +205 -0
- package/dist/recap.d.ts +38 -0
- package/dist/recap.d.ts.map +1 -0
- package/dist/recap.js +154 -0
- package/dist/repl.d.ts +41 -0
- package/dist/repl.d.ts.map +1 -0
- package/dist/repl.js +396 -0
- package/dist/runtime-paths.d.ts +32 -0
- package/dist/runtime-paths.d.ts.map +1 -0
- package/dist/runtime-paths.js +134 -0
- package/dist/sdk.d.ts +12 -0
- package/dist/sdk.d.ts.map +1 -0
- package/dist/sdk.js +18 -0
- package/dist/session/daemon-session-api.d.ts +22 -0
- package/dist/session/daemon-session-api.d.ts.map +1 -0
- package/dist/session/daemon-session-api.js +48 -0
- package/dist/session/durable-session-supervisor.d.ts +24 -0
- package/dist/session/durable-session-supervisor.d.ts.map +1 -0
- package/dist/session/durable-session-supervisor.js +195 -0
- package/dist/session/goal-controller.d.ts +43 -0
- package/dist/session/goal-controller.d.ts.map +1 -0
- package/dist/session/goal-controller.js +77 -0
- package/dist/session/goal-evaluator.d.ts +29 -0
- package/dist/session/goal-evaluator.d.ts.map +1 -0
- package/dist/session/goal-evaluator.js +100 -0
- package/dist/session/loop-prompt.d.ts +14 -0
- package/dist/session/loop-prompt.d.ts.map +1 -0
- package/dist/session/loop-prompt.js +49 -0
- package/dist/session/session-goal-manager.d.ts +51 -0
- package/dist/session/session-goal-manager.d.ts.map +1 -0
- package/dist/session/session-goal-manager.js +118 -0
- package/dist/session/session-registry.d.ts +40 -0
- package/dist/session/session-registry.d.ts.map +1 -0
- package/dist/session/session-registry.js +124 -0
- package/dist/session/session-scheduler.d.ts +59 -0
- package/dist/session/session-scheduler.d.ts.map +1 -0
- package/dist/session/session-scheduler.js +170 -0
- package/dist/session-checkpoint-report.d.ts +22 -0
- package/dist/session-checkpoint-report.d.ts.map +1 -0
- package/dist/session-checkpoint-report.js +99 -0
- package/dist/session-export-index.d.ts +23 -0
- package/dist/session-export-index.d.ts.map +1 -0
- package/dist/session-export-index.js +96 -0
- package/dist/session-export.d.ts +28 -0
- package/dist/session-export.d.ts.map +1 -0
- package/dist/session-export.js +99 -0
- package/dist/session-goal-report.d.ts +37 -0
- package/dist/session-goal-report.d.ts.map +1 -0
- package/dist/session-goal-report.js +219 -0
- package/dist/session-list-report.d.ts +16 -0
- package/dist/session-list-report.d.ts.map +1 -0
- package/dist/session-list-report.js +60 -0
- package/dist/session-task-report.d.ts +23 -0
- package/dist/session-task-report.d.ts.map +1 -0
- package/dist/session-task-report.js +183 -0
- package/dist/shortcuts.d.ts +2 -0
- package/dist/shortcuts.d.ts.map +1 -0
- package/dist/shortcuts.js +32 -0
- package/dist/skills/registry.d.ts +8 -0
- package/dist/skills/registry.d.ts.map +1 -0
- package/dist/skills/registry.js +119 -0
- package/dist/skills/types.d.ts +7 -0
- package/dist/skills/types.d.ts.map +1 -0
- package/dist/skills/types.js +4 -0
- package/dist/statusline.d.ts +37 -0
- package/dist/statusline.d.ts.map +1 -0
- package/dist/statusline.js +207 -0
- package/dist/tools/bash.d.ts +10 -0
- package/dist/tools/bash.d.ts.map +1 -0
- package/dist/tools/bash.js +278 -0
- package/dist/tools/browser-fetch.d.ts +7 -0
- package/dist/tools/browser-fetch.d.ts.map +1 -0
- package/dist/tools/browser-fetch.js +133 -0
- package/dist/tools/error-utils.d.ts +9 -0
- package/dist/tools/error-utils.d.ts.map +1 -0
- package/dist/tools/error-utils.js +35 -0
- package/dist/tools/index.d.ts +27 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +86 -0
- package/dist/tools/patch.d.ts +22 -0
- package/dist/tools/patch.d.ts.map +1 -0
- package/dist/tools/patch.js +458 -0
- package/dist/tools/planner.d.ts +7 -0
- package/dist/tools/planner.d.ts.map +1 -0
- package/dist/tools/planner.js +148 -0
- package/dist/tools/read.d.ts +8 -0
- package/dist/tools/read.d.ts.map +1 -0
- package/dist/tools/read.js +114 -0
- package/dist/tools/search.d.ts +11 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +636 -0
- package/dist/tools/skill.d.ts +8 -0
- package/dist/tools/skill.d.ts.map +1 -0
- package/dist/tools/skill.js +181 -0
- package/dist/tools/subtask.d.ts +9 -0
- package/dist/tools/subtask.d.ts.map +1 -0
- package/dist/tools/subtask.js +120 -0
- package/dist/tools/todo.d.ts +8 -0
- package/dist/tools/todo.d.ts.map +1 -0
- package/dist/tools/todo.js +170 -0
- package/dist/tools/url-fetch.d.ts +11 -0
- package/dist/tools/url-fetch.d.ts.map +1 -0
- package/dist/tools/url-fetch.js +208 -0
- package/dist/tools/vision-analyze.d.ts +9 -0
- package/dist/tools/vision-analyze.d.ts.map +1 -0
- package/dist/tools/vision-analyze.js +179 -0
- package/dist/tools/write.d.ts +7 -0
- package/dist/tools/write.d.ts.map +1 -0
- package/dist/tools/write.js +128 -0
- package/dist/tui/chrome.d.ts +7 -0
- package/dist/tui/chrome.d.ts.map +1 -0
- package/dist/tui/chrome.js +22 -0
- package/dist/tui/input-buffer.d.ts +37 -0
- package/dist/tui/input-buffer.d.ts.map +1 -0
- package/dist/tui/input-buffer.js +228 -0
- package/dist/tui/input-history.d.ts +11 -0
- package/dist/tui/input-history.d.ts.map +1 -0
- package/dist/tui/input-history.js +69 -0
- package/dist/tui/input-queue.d.ts +27 -0
- package/dist/tui/input-queue.d.ts.map +1 -0
- package/dist/tui/input-queue.js +85 -0
- package/dist/tui/markdown.d.ts +10 -0
- package/dist/tui/markdown.d.ts.map +1 -0
- package/dist/tui/markdown.js +396 -0
- package/dist/tui/progress.d.ts +3 -0
- package/dist/tui/progress.d.ts.map +1 -0
- package/dist/tui/progress.js +13 -0
- package/dist/tui/shell.d.ts +67 -0
- package/dist/tui/shell.d.ts.map +1 -0
- package/dist/tui/shell.js +271 -0
- package/dist/tui/streaming-repl.d.ts +39 -0
- package/dist/tui/streaming-repl.d.ts.map +1 -0
- package/dist/tui/streaming-repl.js +460 -0
- package/dist/tui/streaming-tui.d.ts +174 -0
- package/dist/tui/streaming-tui.d.ts.map +1 -0
- package/dist/tui/streaming-tui.js +1049 -0
- package/dist/types.d.ts +221 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +37 -0
- package/dist/utils/symbol-extractor.d.ts +8 -0
- package/dist/utils/symbol-extractor.d.ts.map +1 -0
- package/dist/utils/symbol-extractor.js +190 -0
- package/dist/workflow-runtime.d.ts +45 -0
- package/dist/workflow-runtime.d.ts.map +1 -0
- package/dist/workflow-runtime.js +146 -0
- package/dist/workflow-types.d.ts +73 -0
- package/dist/workflow-types.d.ts.map +1 -0
- package/dist/workflow-types.js +34 -0
- package/docs/docker.md +66 -0
- package/docs/install.md +159 -0
- package/docs/sdk.md +67 -0
- package/docs/skills.md +51 -0
- package/package.json +102 -0
- package/scripts/bootstrap.mjs +63 -0
- package/scripts/check_image.ps1 +18 -0
- package/scripts/clean-dist.mjs +18 -0
- package/scripts/copy_image.ps1 +5 -0
- package/scripts/eval-smoke.mjs +17 -0
- package/skills/examples/repo-triage/SKILL.md +50 -0
- package/skills/qling.md +42 -0
- package/skills/templates/SKILL.md +37 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemon-session-api.d.ts","sourceRoot":"","sources":["../../src/session/daemon-session-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;gBAE3B,OAAO,CAAC,EAAE,MAAM;IAQtB,cAAc,CAClB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,EAAE,QAAQ,CAAC;KAClB,GACA,OAAO,CAAC,WAAW,CAAC;IAKjB,OAAO,CACX,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAC5C,OAAO,CAAC,gBAAgB,CAAC;IAQtB,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAKvD,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAK5D,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAKxD,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAQvE,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAUzD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
export class DaemonSessionApi {
|
|
3
|
+
client;
|
|
4
|
+
constructor(baseUrl) {
|
|
5
|
+
const port = process.env.QLING_DAEMON_PORT || "9998";
|
|
6
|
+
this.client = axios.create({
|
|
7
|
+
baseURL: baseUrl ?? `http://127.0.0.1:${port}`,
|
|
8
|
+
timeout: 3_000,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
async createLoopTask(sessionId, payload) {
|
|
12
|
+
const response = await this.client.post(`/sessions/${encodeURIComponent(sessionId)}/loop-tasks`, payload);
|
|
13
|
+
return response.data;
|
|
14
|
+
}
|
|
15
|
+
async setGoal(sessionId, condition, stats) {
|
|
16
|
+
const response = await this.client.post(`/sessions/${encodeURIComponent(sessionId)}/goal`, {
|
|
17
|
+
condition,
|
|
18
|
+
stats,
|
|
19
|
+
});
|
|
20
|
+
return response.data;
|
|
21
|
+
}
|
|
22
|
+
async clearGoal(sessionId) {
|
|
23
|
+
const response = await this.client.post(`/sessions/${encodeURIComponent(sessionId)}/goal/clear`, {});
|
|
24
|
+
return response.data;
|
|
25
|
+
}
|
|
26
|
+
async getGoal(sessionId) {
|
|
27
|
+
const response = await this.client.get(`/sessions/${encodeURIComponent(sessionId)}/goal`);
|
|
28
|
+
return response.data;
|
|
29
|
+
}
|
|
30
|
+
async listLoopTasks(sessionId) {
|
|
31
|
+
const response = await this.client.get(`/sessions/${encodeURIComponent(sessionId)}/loop-tasks`);
|
|
32
|
+
return response.data ?? [];
|
|
33
|
+
}
|
|
34
|
+
async cancelLoopTask(sessionId, taskId) {
|
|
35
|
+
const response = await this.client.post(`/sessions/${encodeURIComponent(sessionId)}/loop-tasks/${encodeURIComponent(taskId)}/cancel`, {});
|
|
36
|
+
return response.data;
|
|
37
|
+
}
|
|
38
|
+
async clearLoopTasks(sessionId) {
|
|
39
|
+
const tasks = await this.listLoopTasks(sessionId);
|
|
40
|
+
const active = tasks.filter((task) => task.status === "active" || task.status === "running");
|
|
41
|
+
let count = 0;
|
|
42
|
+
for (const task of active) {
|
|
43
|
+
await this.cancelLoopTask(sessionId, task.id);
|
|
44
|
+
count += 1;
|
|
45
|
+
}
|
|
46
|
+
return count;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface DurableSessionSupervisorOptions {
|
|
2
|
+
stateDir: string;
|
|
3
|
+
tickIntervalMs?: number;
|
|
4
|
+
log?: (message: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare class DurableSessionSupervisor {
|
|
7
|
+
private readonly stateDir;
|
|
8
|
+
private readonly tickIntervalMs;
|
|
9
|
+
private readonly log;
|
|
10
|
+
private readonly runningSessions;
|
|
11
|
+
private timer;
|
|
12
|
+
private ticking;
|
|
13
|
+
constructor(options: DurableSessionSupervisorOptions);
|
|
14
|
+
start(): void;
|
|
15
|
+
stop(): Promise<void>;
|
|
16
|
+
private tick;
|
|
17
|
+
private collectSessionIds;
|
|
18
|
+
private tryRunDurableGoal;
|
|
19
|
+
private tryRunDurableLoopTasks;
|
|
20
|
+
private runDurableGoal;
|
|
21
|
+
private executePromptTurn;
|
|
22
|
+
private createAgent;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=durable-session-supervisor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"durable-session-supervisor.d.ts","sourceRoot":"","sources":["../../src/session/durable-session-supervisor.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA4B;IAChD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqB;IACrD,OAAO,CAAC,KAAK,CAA+C;IAC5D,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,+BAA+B;IAMpD,KAAK,IAAI,IAAI;IAQP,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAOb,IAAI;YAoBJ,iBAAiB;YAcjB,iBAAiB;YAiBjB,sBAAsB;YA+BtB,cAAc;YAoCd,iBAAiB;YAyBjB,WAAW;CA+B1B"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import * as fs from "fs/promises";
|
|
2
|
+
import { existsSync } from "fs";
|
|
3
|
+
import * as path from "path";
|
|
4
|
+
import { AgentLoop } from "../agent-loop.js";
|
|
5
|
+
import { applyConfigToProcessEnv, loadQlingConfig } from "../config.js";
|
|
6
|
+
import { buildToolRegistry } from "../tools/index.js";
|
|
7
|
+
import { SessionGoalController } from "./goal-controller.js";
|
|
8
|
+
import { SessionGoalManager } from "./session-goal-manager.js";
|
|
9
|
+
import { SessionScheduler } from "./session-scheduler.js";
|
|
10
|
+
export class DurableSessionSupervisor {
|
|
11
|
+
stateDir;
|
|
12
|
+
tickIntervalMs;
|
|
13
|
+
log;
|
|
14
|
+
runningSessions = new Set();
|
|
15
|
+
timer = null;
|
|
16
|
+
ticking = false;
|
|
17
|
+
constructor(options) {
|
|
18
|
+
this.stateDir = options.stateDir;
|
|
19
|
+
this.tickIntervalMs = options.tickIntervalMs ?? 1_000;
|
|
20
|
+
this.log = options.log ?? (() => { });
|
|
21
|
+
}
|
|
22
|
+
start() {
|
|
23
|
+
if (this.timer)
|
|
24
|
+
return;
|
|
25
|
+
this.timer = setInterval(() => {
|
|
26
|
+
void this.tick();
|
|
27
|
+
}, this.tickIntervalMs);
|
|
28
|
+
void this.tick();
|
|
29
|
+
}
|
|
30
|
+
async stop() {
|
|
31
|
+
if (this.timer) {
|
|
32
|
+
clearInterval(this.timer);
|
|
33
|
+
this.timer = null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async tick() {
|
|
37
|
+
if (this.ticking)
|
|
38
|
+
return;
|
|
39
|
+
this.ticking = true;
|
|
40
|
+
try {
|
|
41
|
+
const sessionIds = await this.collectSessionIds();
|
|
42
|
+
for (const sessionId of sessionIds) {
|
|
43
|
+
if (this.runningSessions.has(sessionId)) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const handledGoal = await this.tryRunDurableGoal(sessionId);
|
|
47
|
+
if (handledGoal) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
await this.tryRunDurableLoopTasks(sessionId);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
finally {
|
|
54
|
+
this.ticking = false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async collectSessionIds() {
|
|
58
|
+
const sessionIds = new Set();
|
|
59
|
+
for (const dirName of ["session-goals", "session-tasks"]) {
|
|
60
|
+
const dirPath = path.join(this.stateDir, dirName);
|
|
61
|
+
if (!existsSync(dirPath))
|
|
62
|
+
continue;
|
|
63
|
+
const files = await fs.readdir(dirPath);
|
|
64
|
+
for (const file of files) {
|
|
65
|
+
if (!file.endsWith(".json"))
|
|
66
|
+
continue;
|
|
67
|
+
sessionIds.add(path.basename(file, ".json"));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return Array.from(sessionIds.values()).sort();
|
|
71
|
+
}
|
|
72
|
+
async tryRunDurableGoal(sessionId) {
|
|
73
|
+
const manager = new SessionGoalManager({ stateDir: this.stateDir, sessionId });
|
|
74
|
+
await manager.init();
|
|
75
|
+
const goal = await manager.getGoalStatus();
|
|
76
|
+
if (!goal || goal.status !== "active" || goal.runner !== "daemon" || !goal.pending) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
this.runningSessions.add(sessionId);
|
|
80
|
+
try {
|
|
81
|
+
await this.runDurableGoal(sessionId);
|
|
82
|
+
}
|
|
83
|
+
finally {
|
|
84
|
+
this.runningSessions.delete(sessionId);
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
async tryRunDurableLoopTasks(sessionId) {
|
|
89
|
+
const scheduler = new SessionScheduler({
|
|
90
|
+
stateDir: this.stateDir,
|
|
91
|
+
sessionId,
|
|
92
|
+
runner: "daemon",
|
|
93
|
+
onDue: async (task) => {
|
|
94
|
+
await this.executePromptTurn(sessionId, task.prompt);
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
await scheduler.init();
|
|
98
|
+
const tasks = await scheduler.listTasks();
|
|
99
|
+
const now = Date.now();
|
|
100
|
+
const hasDue = tasks.some((task) => task.runner === "daemon" &&
|
|
101
|
+
task.status !== "canceled" &&
|
|
102
|
+
task.status !== "completed" &&
|
|
103
|
+
(task.pending || task.nextRunAt <= now));
|
|
104
|
+
if (!hasDue) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
this.runningSessions.add(sessionId);
|
|
108
|
+
try {
|
|
109
|
+
await scheduler.runDueTasksOnce();
|
|
110
|
+
}
|
|
111
|
+
finally {
|
|
112
|
+
this.runningSessions.delete(sessionId);
|
|
113
|
+
}
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
async runDurableGoal(sessionId) {
|
|
117
|
+
const manager = new SessionGoalManager({ stateDir: this.stateDir, sessionId });
|
|
118
|
+
const controller = new SessionGoalController({
|
|
119
|
+
manager,
|
|
120
|
+
runner: "daemon",
|
|
121
|
+
});
|
|
122
|
+
await controller.init();
|
|
123
|
+
let goal = await controller.getGoalStatus();
|
|
124
|
+
if (!goal || goal.status !== "active" || goal.runner !== "daemon") {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
let prompt = goal.evaluatedTurns > 0 && goal.lastReason
|
|
128
|
+
? controller.buildContinuationPrompt(goal.condition, goal.lastReason)
|
|
129
|
+
: controller.buildInitialPrompt(goal.condition);
|
|
130
|
+
while (goal && goal.status === "active") {
|
|
131
|
+
const turn = await this.executePromptTurn(sessionId, prompt);
|
|
132
|
+
const outcome = await controller.afterTurn({
|
|
133
|
+
transcript: SessionGoalController.messagesToTranscript(turn.messages),
|
|
134
|
+
stats: {
|
|
135
|
+
turnCount: turn.stats.turnCount,
|
|
136
|
+
tokens: turn.stats.tokens,
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
if (outcome.status === "continue" && outcome.continuePrompt) {
|
|
140
|
+
prompt = outcome.continuePrompt;
|
|
141
|
+
goal = await controller.getGoalStatus();
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
async executePromptTurn(sessionId, prompt) {
|
|
148
|
+
const agent = await this.createAgent();
|
|
149
|
+
try {
|
|
150
|
+
const restored = await agent.restoreSession(sessionId);
|
|
151
|
+
if (!restored) {
|
|
152
|
+
throw new Error(`session snapshot not found: ${sessionId}`);
|
|
153
|
+
}
|
|
154
|
+
agent.addUserMessage(prompt);
|
|
155
|
+
await agent.run();
|
|
156
|
+
await agent.checkpointSession();
|
|
157
|
+
return {
|
|
158
|
+
messages: agent.getMessagesSnapshot(),
|
|
159
|
+
stats: agent.getSessionStats(),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
finally {
|
|
163
|
+
await agent.shutdown();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
async createAgent() {
|
|
167
|
+
const { config } = await loadQlingConfig({});
|
|
168
|
+
applyConfigToProcessEnv(config);
|
|
169
|
+
const staticEnabled = {};
|
|
170
|
+
for (const [name, cfg] of Object.entries(config.tools)) {
|
|
171
|
+
staticEnabled[name] = cfg.enabled;
|
|
172
|
+
}
|
|
173
|
+
const tools = buildToolRegistry({ staticEnabled });
|
|
174
|
+
const agent = new AgentLoop({
|
|
175
|
+
apiKey: config.llm.api_key || process.env.QLING_LLM_API_KEY || "",
|
|
176
|
+
provider: config.llm.provider,
|
|
177
|
+
endpoint: config.llm.endpoint,
|
|
178
|
+
model: config.llm.model,
|
|
179
|
+
maxIterations: config.runtime.max_steps,
|
|
180
|
+
tools,
|
|
181
|
+
runtime: {
|
|
182
|
+
workspaceDir: config.runtime.workspace_dir || process.cwd(),
|
|
183
|
+
fileCacheDir: config.runtime.file_cache_dir,
|
|
184
|
+
fileStateDir: this.stateDir,
|
|
185
|
+
maxSteps: config.runtime.max_steps,
|
|
186
|
+
parseRetries: config.runtime.parse_retries,
|
|
187
|
+
maxTokenBudget: config.runtime.max_token_budget,
|
|
188
|
+
toolRepeatLimit: config.runtime.tool_repeat_limit,
|
|
189
|
+
timeoutMs: config.runtime.timeout_ms,
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
await agent.waitForInit();
|
|
193
|
+
return agent;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Message } from "../types.js";
|
|
2
|
+
import { GoalEvaluator } from "./goal-evaluator.js";
|
|
3
|
+
import { SessionGoalManager, type SessionGoalRunner, type SessionGoalState } from "./session-goal-manager.js";
|
|
4
|
+
export interface GoalControllerAfterTurnInput {
|
|
5
|
+
transcript: string;
|
|
6
|
+
stats: {
|
|
7
|
+
turnCount: number;
|
|
8
|
+
tokens: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface GoalControllerAfterTurnResult {
|
|
12
|
+
status: "idle" | "continue" | "achieved" | "cleared";
|
|
13
|
+
reason: string | null;
|
|
14
|
+
continuePrompt: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface SessionGoalControllerOptions {
|
|
17
|
+
manager: SessionGoalManager;
|
|
18
|
+
evaluator?: Pick<GoalEvaluator, "evaluate">;
|
|
19
|
+
maxAutoTurns?: number;
|
|
20
|
+
runner?: SessionGoalRunner;
|
|
21
|
+
}
|
|
22
|
+
export declare class SessionGoalController {
|
|
23
|
+
private readonly manager;
|
|
24
|
+
private readonly evaluator;
|
|
25
|
+
private readonly maxAutoTurns;
|
|
26
|
+
private readonly runner;
|
|
27
|
+
constructor(options: SessionGoalControllerOptions);
|
|
28
|
+
init(): Promise<void>;
|
|
29
|
+
setGoal(condition: string, stats: {
|
|
30
|
+
turnCount: number;
|
|
31
|
+
tokens: number;
|
|
32
|
+
}, options?: {
|
|
33
|
+
runner?: SessionGoalRunner;
|
|
34
|
+
pending?: boolean;
|
|
35
|
+
}): Promise<SessionGoalState>;
|
|
36
|
+
clearGoal(reason: string): Promise<SessionGoalState>;
|
|
37
|
+
getGoalStatus(): Promise<SessionGoalState | null>;
|
|
38
|
+
buildInitialPrompt(condition: string): string;
|
|
39
|
+
buildContinuationPrompt(condition: string, reason: string): string;
|
|
40
|
+
afterTurn(input: GoalControllerAfterTurnInput): Promise<GoalControllerAfterTurnResult>;
|
|
41
|
+
static messagesToTranscript(messages: Message[]): string;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=goal-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goal-controller.d.ts","sourceRoot":"","sources":["../../src/session/goal-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,aAAa,EAA6B,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE9G,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE;QACL,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IACrD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,kBAAkB,CAAC;IAC5B,SAAS,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkC;IAC5D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;gBAE/B,OAAO,EAAE,4BAA4B;IAO3C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,OAAO,CACX,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAC5C,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,iBAAiB,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAO,GAC9D,OAAO,CAAC,gBAAgB,CAAC;IAOtB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIpD,aAAa,IAAI,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAIvD,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAI7C,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAI5D,SAAS,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,6BAA6B,CAAC;IA2C5F,MAAM,CAAC,oBAAoB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM;CAMzD"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { GoalEvaluator } from "./goal-evaluator.js";
|
|
2
|
+
export class SessionGoalController {
|
|
3
|
+
manager;
|
|
4
|
+
evaluator;
|
|
5
|
+
maxAutoTurns;
|
|
6
|
+
runner;
|
|
7
|
+
constructor(options) {
|
|
8
|
+
this.manager = options.manager;
|
|
9
|
+
this.evaluator = options.evaluator ?? new GoalEvaluator();
|
|
10
|
+
this.maxAutoTurns = options.maxAutoTurns ?? Number(process.env.QLING_GOAL_MAX_AUTO_TURNS ?? "12");
|
|
11
|
+
this.runner = options.runner ?? "session";
|
|
12
|
+
}
|
|
13
|
+
async init() {
|
|
14
|
+
await this.manager.init();
|
|
15
|
+
}
|
|
16
|
+
async setGoal(condition, stats, options = {}) {
|
|
17
|
+
return this.manager.setGoal(condition, stats, {
|
|
18
|
+
runner: options.runner ?? this.runner,
|
|
19
|
+
pending: options.pending ?? false,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
async clearGoal(reason) {
|
|
23
|
+
return this.manager.clearGoal(reason);
|
|
24
|
+
}
|
|
25
|
+
async getGoalStatus() {
|
|
26
|
+
return this.manager.getGoalStatus();
|
|
27
|
+
}
|
|
28
|
+
buildInitialPrompt(condition) {
|
|
29
|
+
return `当前激活目标条件:${condition}\n请立即开始工作,直到条件满足。每轮都优先做最有效的下一步,并把可验证证据写入对话。`;
|
|
30
|
+
}
|
|
31
|
+
buildContinuationPrompt(condition, reason) {
|
|
32
|
+
return `目标条件:${condition}\n上一轮 goal 评估:${reason}\n请继续推进,优先执行最有效的下一步,并把可验证证据写入对话。`;
|
|
33
|
+
}
|
|
34
|
+
async afterTurn(input) {
|
|
35
|
+
const active = this.manager.getActiveGoal(this.runner);
|
|
36
|
+
if (!active) {
|
|
37
|
+
return { status: "idle", reason: null, continuePrompt: null };
|
|
38
|
+
}
|
|
39
|
+
const autoTurnsSpent = Math.max(0, input.stats.turnCount - active.baselineTurns);
|
|
40
|
+
if (autoTurnsSpent > this.maxAutoTurns) {
|
|
41
|
+
const cleared = await this.manager.clearGoal(`max auto turns reached (${this.maxAutoTurns})`);
|
|
42
|
+
return {
|
|
43
|
+
status: "cleared",
|
|
44
|
+
reason: cleared.lastReason,
|
|
45
|
+
continuePrompt: null,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const evaluation = await this.evaluator.evaluate({
|
|
49
|
+
condition: active.condition,
|
|
50
|
+
transcript: input.transcript,
|
|
51
|
+
});
|
|
52
|
+
const updated = await this.manager.markEvaluation({
|
|
53
|
+
done: evaluation.done,
|
|
54
|
+
reason: evaluation.reason,
|
|
55
|
+
turnCount: input.stats.turnCount,
|
|
56
|
+
tokens: input.stats.tokens,
|
|
57
|
+
});
|
|
58
|
+
if (evaluation.done) {
|
|
59
|
+
return {
|
|
60
|
+
status: "achieved",
|
|
61
|
+
reason: updated.lastReason,
|
|
62
|
+
continuePrompt: null,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
status: "continue",
|
|
67
|
+
reason: updated.lastReason,
|
|
68
|
+
continuePrompt: this.buildContinuationPrompt(updated.condition, updated.lastReason ?? "条件未满足"),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
static messagesToTranscript(messages) {
|
|
72
|
+
return messages
|
|
73
|
+
.slice(-40)
|
|
74
|
+
.map((message) => `${message.role}: ${message.content}`)
|
|
75
|
+
.join("\n\n");
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type GoalFetch = typeof fetch;
|
|
2
|
+
export interface GoalEvaluationResult {
|
|
3
|
+
done: boolean;
|
|
4
|
+
reason: string;
|
|
5
|
+
}
|
|
6
|
+
export interface GoalEvaluatorOptions {
|
|
7
|
+
provider?: string;
|
|
8
|
+
endpoint?: string;
|
|
9
|
+
apiKey?: string;
|
|
10
|
+
model?: string;
|
|
11
|
+
timeoutMs?: number;
|
|
12
|
+
fetchImpl?: GoalFetch;
|
|
13
|
+
}
|
|
14
|
+
export declare class GoalEvaluator {
|
|
15
|
+
private readonly provider;
|
|
16
|
+
private readonly endpoint;
|
|
17
|
+
private readonly apiKey;
|
|
18
|
+
private readonly model;
|
|
19
|
+
private readonly timeoutMs;
|
|
20
|
+
private readonly fetchImpl;
|
|
21
|
+
constructor(options?: GoalEvaluatorOptions);
|
|
22
|
+
evaluate(input: {
|
|
23
|
+
condition: string;
|
|
24
|
+
transcript: string;
|
|
25
|
+
}): Promise<GoalEvaluationResult>;
|
|
26
|
+
parse(raw: string): GoalEvaluationResult;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=goal-evaluator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goal-evaluator.d.ts","sourceRoot":"","sources":["../../src/session/goal-evaluator.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GAAG,OAAO,KAAK,CAAC;AAE9B,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AA0BD,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;gBAE1B,OAAO,GAAE,oBAAyB;IAcxC,QAAQ,CAAC,KAAK,EAAE;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA+CjC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB;CAczC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
const GOAL_EVALUATION_PROMPT = `你是轻灵的 Goal Evaluator。
|
|
2
|
+
|
|
3
|
+
任务:判断给定的目标条件是否已经被对话中的证据满足。
|
|
4
|
+
|
|
5
|
+
约束:
|
|
6
|
+
1. 只能基于 transcript 中已经出现的内容判断,不能假设工具已经成功运行。
|
|
7
|
+
2. 如果证据不足,必须返回 done=false。
|
|
8
|
+
3. 输出必须是严格 JSON,禁止额外文本。
|
|
9
|
+
|
|
10
|
+
输出格式:
|
|
11
|
+
{"done":true,"reason":"一句话理由"}
|
|
12
|
+
或
|
|
13
|
+
{"done":false,"reason":"一句话理由"}`;
|
|
14
|
+
function resolveChatEndpoint(endpoint) {
|
|
15
|
+
return endpoint.endsWith("/chat/completions")
|
|
16
|
+
? endpoint
|
|
17
|
+
: endpoint.replace(/\/$/, "") + "/chat/completions";
|
|
18
|
+
}
|
|
19
|
+
function stripCodeFences(text) {
|
|
20
|
+
return text.trim().replace(/^```json\s*/i, "").replace(/^```\s*/i, "").replace(/```$/, "").trim();
|
|
21
|
+
}
|
|
22
|
+
export class GoalEvaluator {
|
|
23
|
+
provider;
|
|
24
|
+
endpoint;
|
|
25
|
+
apiKey;
|
|
26
|
+
model;
|
|
27
|
+
timeoutMs;
|
|
28
|
+
fetchImpl;
|
|
29
|
+
constructor(options = {}) {
|
|
30
|
+
this.provider = options.provider ?? process.env.QLING_GOAL_EVALUATOR_PROVIDER ?? process.env.QLING_LLM_PROVIDER ?? "deepseek";
|
|
31
|
+
const endpoint = options.endpoint ??
|
|
32
|
+
process.env.QLING_GOAL_EVALUATOR_ENDPOINT ??
|
|
33
|
+
process.env.QLING_LLM_ENDPOINT ??
|
|
34
|
+
(this.provider === "openai" ? "https://api.openai.com/v1" : "https://api.deepseek.com");
|
|
35
|
+
this.endpoint = resolveChatEndpoint(endpoint);
|
|
36
|
+
this.apiKey = options.apiKey ?? process.env.QLING_GOAL_EVALUATOR_API_KEY ?? process.env.QLING_LLM_API_KEY ?? "";
|
|
37
|
+
this.model = options.model ?? process.env.QLING_GOAL_EVALUATOR_MODEL ?? process.env.QLING_LLM_MODEL ?? "deepseek-chat";
|
|
38
|
+
this.timeoutMs = options.timeoutMs ?? Number(process.env.QLING_GOAL_EVALUATOR_TIMEOUT_MS ?? "30000");
|
|
39
|
+
this.fetchImpl = options.fetchImpl ?? fetch;
|
|
40
|
+
}
|
|
41
|
+
async evaluate(input) {
|
|
42
|
+
if (!this.apiKey && this.provider !== "local") {
|
|
43
|
+
return {
|
|
44
|
+
done: false,
|
|
45
|
+
reason: "goal evaluator 缺少 API key,无法确认条件达成",
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const prompt = `${GOAL_EVALUATION_PROMPT}
|
|
49
|
+
|
|
50
|
+
【目标条件】
|
|
51
|
+
${input.condition}
|
|
52
|
+
|
|
53
|
+
【Transcript】
|
|
54
|
+
${input.transcript.slice(-12_000)}`;
|
|
55
|
+
const controller = new AbortController();
|
|
56
|
+
const timer = setTimeout(() => controller.abort(), this.timeoutMs);
|
|
57
|
+
try {
|
|
58
|
+
const response = await this.fetchImpl(this.endpoint, {
|
|
59
|
+
method: "POST",
|
|
60
|
+
headers: {
|
|
61
|
+
"Content-Type": "application/json",
|
|
62
|
+
...(this.provider === "local" || !this.apiKey ? {} : { Authorization: `Bearer ${this.apiKey}` }),
|
|
63
|
+
},
|
|
64
|
+
body: JSON.stringify({
|
|
65
|
+
model: this.model,
|
|
66
|
+
temperature: 0,
|
|
67
|
+
max_tokens: 120,
|
|
68
|
+
messages: [
|
|
69
|
+
{ role: "user", content: prompt },
|
|
70
|
+
],
|
|
71
|
+
}),
|
|
72
|
+
signal: controller.signal,
|
|
73
|
+
});
|
|
74
|
+
if (!response.ok) {
|
|
75
|
+
throw new Error(`goal evaluator http ${response.status}`);
|
|
76
|
+
}
|
|
77
|
+
const data = await response.json();
|
|
78
|
+
const content = data.choices?.[0]?.message?.content ?? "";
|
|
79
|
+
return this.parse(content);
|
|
80
|
+
}
|
|
81
|
+
finally {
|
|
82
|
+
clearTimeout(timer);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
parse(raw) {
|
|
86
|
+
try {
|
|
87
|
+
const parsed = JSON.parse(stripCodeFences(raw));
|
|
88
|
+
if (typeof parsed.done === "boolean" && typeof parsed.reason === "string") {
|
|
89
|
+
return parsed;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
// fall through
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
done: false,
|
|
97
|
+
reason: raw.trim() || "goal evaluator 返回了不可解析结果",
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const DEFAULT_LOOP_INTERVAL_MS: number;
|
|
2
|
+
export declare const DEFAULT_MAINTENANCE_PROMPT: string;
|
|
3
|
+
export type LoopPromptSource = "inline" | "project" | "user" | "builtin";
|
|
4
|
+
export interface ResolvedLoopPrompt {
|
|
5
|
+
prompt: string;
|
|
6
|
+
source: LoopPromptSource;
|
|
7
|
+
path?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function resolveLoopPrompt(options: {
|
|
10
|
+
workspaceDir: string;
|
|
11
|
+
homeDir?: string;
|
|
12
|
+
inlinePrompt?: string;
|
|
13
|
+
}): Promise<ResolvedLoopPrompt>;
|
|
14
|
+
//# sourceMappingURL=loop-prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loop-prompt.d.ts","sourceRoot":"","sources":["../../src/session/loop-prompt.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB,QAAiB,CAAC;AACvD,eAAO,MAAM,0BAA0B,QAI3B,CAAC;AAEb,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAEzE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AASD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAmC9B"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as fs from "fs/promises";
|
|
2
|
+
import { existsSync } from "fs";
|
|
3
|
+
import * as os from "os";
|
|
4
|
+
import * as path from "path";
|
|
5
|
+
export const DEFAULT_LOOP_INTERVAL_MS = 10 * 60 * 1000;
|
|
6
|
+
export const DEFAULT_MAINTENANCE_PROMPT = [
|
|
7
|
+
"继续当前对话中已经授权但尚未完成的工作。",
|
|
8
|
+
"如果当前工作区里有待验证的修改,优先完成验证并报告结果。",
|
|
9
|
+
"如果没有待办事项,只输出一行:当前没有需要继续的工作。",
|
|
10
|
+
].join("\n");
|
|
11
|
+
async function readPromptFile(filePath) {
|
|
12
|
+
if (!existsSync(filePath))
|
|
13
|
+
return null;
|
|
14
|
+
const raw = await fs.readFile(filePath, "utf-8");
|
|
15
|
+
const trimmed = raw.trim();
|
|
16
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
17
|
+
}
|
|
18
|
+
export async function resolveLoopPrompt(options) {
|
|
19
|
+
const inlinePrompt = options.inlinePrompt?.trim();
|
|
20
|
+
if (inlinePrompt) {
|
|
21
|
+
return {
|
|
22
|
+
prompt: inlinePrompt,
|
|
23
|
+
source: "inline",
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const homeDir = options.homeDir ?? os.homedir();
|
|
27
|
+
const projectPromptPath = path.join(options.workspaceDir, ".claude", "loop.md");
|
|
28
|
+
const userPromptPath = path.join(homeDir, ".claude", "loop.md");
|
|
29
|
+
const projectPrompt = await readPromptFile(projectPromptPath);
|
|
30
|
+
if (projectPrompt) {
|
|
31
|
+
return {
|
|
32
|
+
prompt: projectPrompt,
|
|
33
|
+
source: "project",
|
|
34
|
+
path: projectPromptPath,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const userPrompt = await readPromptFile(userPromptPath);
|
|
38
|
+
if (userPrompt) {
|
|
39
|
+
return {
|
|
40
|
+
prompt: userPrompt,
|
|
41
|
+
source: "user",
|
|
42
|
+
path: userPromptPath,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
prompt: DEFAULT_MAINTENANCE_PROMPT,
|
|
47
|
+
source: "builtin",
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type SessionGoalStatus = "active" | "achieved" | "cleared";
|
|
2
|
+
export type SessionGoalDecision = "done" | "continue" | "cleared" | null;
|
|
3
|
+
export type SessionGoalRunner = "session" | "daemon";
|
|
4
|
+
export interface SessionGoalState {
|
|
5
|
+
condition: string;
|
|
6
|
+
status: SessionGoalStatus;
|
|
7
|
+
runner: SessionGoalRunner;
|
|
8
|
+
pending: boolean;
|
|
9
|
+
createdAt: number;
|
|
10
|
+
updatedAt: number;
|
|
11
|
+
achievedAt?: number;
|
|
12
|
+
clearedAt?: number;
|
|
13
|
+
baselineTurns: number;
|
|
14
|
+
baselineTokens: number;
|
|
15
|
+
evaluatedTurns: number;
|
|
16
|
+
lastReason: string | null;
|
|
17
|
+
lastDecision: SessionGoalDecision;
|
|
18
|
+
}
|
|
19
|
+
export interface SessionGoalManagerOptions {
|
|
20
|
+
stateDir: string;
|
|
21
|
+
sessionId: string;
|
|
22
|
+
clock?: () => number;
|
|
23
|
+
}
|
|
24
|
+
export declare class SessionGoalManager {
|
|
25
|
+
private readonly goalsDir;
|
|
26
|
+
private readonly stateFile;
|
|
27
|
+
private readonly clock;
|
|
28
|
+
private goal;
|
|
29
|
+
constructor(options: SessionGoalManagerOptions);
|
|
30
|
+
init(): Promise<void>;
|
|
31
|
+
setGoal(condition: string, baseline: {
|
|
32
|
+
turnCount: number;
|
|
33
|
+
tokens: number;
|
|
34
|
+
}, options?: {
|
|
35
|
+
runner?: SessionGoalRunner;
|
|
36
|
+
pending?: boolean;
|
|
37
|
+
}): Promise<SessionGoalState>;
|
|
38
|
+
markEvaluation(result: {
|
|
39
|
+
done: boolean;
|
|
40
|
+
reason: string;
|
|
41
|
+
turnCount: number;
|
|
42
|
+
tokens: number;
|
|
43
|
+
}): Promise<SessionGoalState>;
|
|
44
|
+
clearGoal(reason: string): Promise<SessionGoalState>;
|
|
45
|
+
getGoalStatus(): Promise<SessionGoalState | null>;
|
|
46
|
+
getActiveGoal(runner?: SessionGoalRunner): SessionGoalState | null;
|
|
47
|
+
private getGoalOrThrow;
|
|
48
|
+
private loadGoal;
|
|
49
|
+
private saveGoal;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=session-goal-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-goal-manager.d.ts","sourceRoot":"","sources":["../../src/session/session-goal-manager.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAClE,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC;CACtB;AAMD,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;IACrC,OAAO,CAAC,IAAI,CAAiC;gBAEjC,OAAO,EAAE,yBAAyB;IAMxC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKrB,OAAO,CACX,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAC/C,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,iBAAiB,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAO,GAC9D,OAAO,CAAC,gBAAgB,CAAC;IAmBtB,cAAc,CAAC,MAAM,EAAE;QAC3B,IAAI,EAAE,OAAO,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAgBvB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAiCpD,aAAa,IAAI,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAKvD,aAAa,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,IAAI;IAUlE,OAAO,CAAC,cAAc;YAOR,QAAQ;YAWR,QAAQ;CAGvB"}
|