feat: convert AM516 lead times to workdays

This commit is contained in:
ar51
2026-09-03 17:34:42 +08:00
parent fa8aee91b9
commit c7c5c3259c
6 changed files with 332 additions and 27 deletions

View File

@@ -8,20 +8,22 @@
4. Confirm a separate trusted AR51 approval record explicitly covers `api.zeroerr-agent.com`, the AM516 use case, and API-key use.
5. If that domain-and-permission record is absent, stop before any outbound request; a general functional-test approval is insufficient by itself.
6. Use model recommendation rules to generate the complete ordered internal candidate pool.
7. Run the controlled script for the original model baseline and only the first four candidate models.
8. Summarize the current batch, state how many candidates remain, and invite the same sender to ask naturally for more when candidates remain; exact wording is not required.
9. Append a non-secret record.
10. Return Feishu-friendly text with the fixed disclaimer.
7. Immediately reply with `👀` to acknowledge the valid request.
8. Run the controlled script for the original model baseline and only the first four candidate models.
9. Convert each numeric natural-day lead time to workdays with the approved quotient-and-remainder rule, then count those workdays from the local query date through the configured China statutory workday calendar. The query date itself is excluded.
10. Summarize the current batch, including the original natural days, converted workdays, and calculated delivery date; state how many candidates remain and invite the same sender to ask naturally for more when candidates remain.
11. Append a non-secret record.
12. Return Feishu-friendly text with the fixed disclaimer.
## Candidate Continuation
1. Accept a clear request for more candidates only from the same sender in the same Feishu chat as the active initial query. Equivalent expressions such as `还有吗``有没有别的``再推荐几个``继续``下一批` or `more candidates` are valid; no exact phrase is required.
2. The in-memory continuation context expires after six hours and is cleared by a bridge restart. If no matching context exists, stay silent and require a new complete model-and-quantity query.
3. Query the next four unqueried rule candidates; do not re-query the original baseline or any earlier candidate.
3. Immediately reply with `👀`, then query the next four unqueried rule candidates; do not re-query the original baseline or any earlier candidate.
4. Missing or unsupported candidates still consume their rule-order positions and remain under `不可用候选`.
5. Append one record block for the models queried in this continuation batch, then state whether more candidates remain.
6. A new complete model-and-quantity request replaces the earlier continuation context for that sender and chat.
7. Keep the dual gate of continuation intent plus valid context: unrelated text such as `more interesting` or `继续查询英语例句` must not trigger the old query.
7. Keep the dual gate of continuation intent plus valid context: unrelated text such as `more interesting` or `继续查询英语例句` must not trigger the old query or acknowledgement.
## Approved Script