@unity-china/codely-cli 1.0.0-rc.52 → 1.0.0-rc.53
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.
|
@@ -13,10 +13,16 @@
|
|
|
13
13
|
# Threshold fields below are the shipped defaults (keep in sync with
|
|
14
14
|
# DEFAULT_LOOP_CYCLE_THRESHOLD_CONFIG in loopEvidencePolicy.ts). Higher-tier
|
|
15
15
|
# TOML may override individual fields; omitted fields keep these defaults.
|
|
16
|
+
# Same-tier conflicts resolve in ordinal (code-point) file order, independent
|
|
17
|
+
# of the system locale: thresholds/flags take the last ordinal declaration,
|
|
18
|
+
# rules take the first — and within one file, rules resolve by numeric
|
|
19
|
+
# declaration order (every toolName entry expanded from one rule shares its
|
|
20
|
+
# declaration index).
|
|
16
21
|
#
|
|
17
|
-
# Content detection layers
|
|
18
|
-
# - Short fast-path
|
|
19
|
-
#
|
|
22
|
+
# Content detection layers:
|
|
23
|
+
# - Short fast-path: identical short chunks / same line, count from
|
|
24
|
+
# content_repeat_threshold (the length windows stay code constants)
|
|
25
|
+
# - Long-stream probe: tail needle grep → discover period length
|
|
20
26
|
|
|
21
27
|
version = 1
|
|
22
28
|
|
|
@@ -24,16 +30,41 @@ version = 1
|
|
|
24
30
|
# Does NOT disable content/reasoning probe detection.
|
|
25
31
|
enable_cycle_detection = true
|
|
26
32
|
|
|
27
|
-
# Max tool-cycle period length k (detect cycles of length 2..k). Range: 2–
|
|
28
|
-
tool_cycle_max_period =
|
|
33
|
+
# Max tool-cycle period length k (detect cycles of length 2..k). Range: 2–32.
|
|
34
|
+
tool_cycle_max_period = 32
|
|
29
35
|
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
36
|
+
# Full A→B periods required before a tool cycle is reported. Range: 2–20.
|
|
37
|
+
# Deliberately independent of tool_call_threshold: an alternating pattern is
|
|
38
|
+
# weaker evidence than a byte-identical consecutive repeat, so lowering the
|
|
39
|
+
# consecutive threshold must not make cycles fire sooner. A run of the *same*
|
|
40
|
+
# call is never reported here — that is tool_call_threshold's job.
|
|
41
|
+
tool_cycle_repeat_count = 3
|
|
42
|
+
|
|
43
|
+
# Consecutive byte-identical calls of the same tool before detection. The key is
|
|
44
|
+
# a hash of the tool name plus the full model-supplied arguments (never the call
|
|
45
|
+
# id), so a repeat carries no new information. Default 3 tolerates exactly one
|
|
46
|
+
# identical retry: an errored tool's response carries retry guidance, so the
|
|
47
|
+
# immediate same-args re-request is legitimate. Range: 2–20.
|
|
48
|
+
tool_call_threshold = 3
|
|
49
|
+
|
|
50
|
+
# Same, for read-only and whitelisted tools. `read_file` uses this value
|
|
51
|
+
# directly; other whitelisted tools (job_*) get an internal ×2. Range: 2–20.
|
|
52
|
+
# Read-only classification covers the current retrieval tools, e.g.
|
|
53
|
+
# search_file_content, glob, lsp, list_directory.
|
|
54
|
+
read_only_tool_call_threshold = 3
|
|
55
|
+
|
|
56
|
+
# Identical short chunks, or an identical line, repeated this many times in one
|
|
57
|
+
# stream. Kept high on purpose: echoing a file with repetitive lines is normal,
|
|
58
|
+
# so lower this only deliberately. Range: 2–50.
|
|
59
|
+
content_repeat_threshold = 10
|
|
60
|
+
|
|
61
|
+
# Detections within a single prompt before escalating from corrective feedback
|
|
62
|
+
# to a hard halt. Main agent only; subagents never escalate. Range: 1–10.
|
|
63
|
+
strike_threshold = 3
|
|
34
64
|
|
|
35
65
|
# Long-stream content/reasoning: how many full periods after probe finds a cycle.
|
|
36
|
-
# Range: 2–20.
|
|
66
|
+
# Range: 2–20. Note this is separate from content_repeat_threshold, and the bar
|
|
67
|
+
# after a read-only tool is raised internally to 10 periods.
|
|
37
68
|
content_probe_repeat_threshold = 3
|
|
38
69
|
|
|
39
70
|
# Minimum discovered period length (chars). Must be > short fast-path max (30)
|
|
@@ -63,14 +94,18 @@ Batch edits across files, different regions of the same file, re-testing after e
|
|
|
63
94
|
{{ignored_tools_section}}
|
|
64
95
|
"""
|
|
65
96
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
97
|
+
# No loop-evidence rules ship by default: every tool counts as evidence.
|
|
98
|
+
#
|
|
99
|
+
# `loop_detection_rule` is the ONLY place these exemptions can come from — there
|
|
100
|
+
# are no hard-coded builtin rules. Exempting a tool is heavier than it looks: it
|
|
101
|
+
# hides the tool from the consecutive AND cycle detectors, and once ignored tools
|
|
102
|
+
# make up half of recent history the LLM judge is skipped entirely. Prefer
|
|
103
|
+
# raising a threshold over adding an exemption.
|
|
104
|
+
#
|
|
105
|
+
# To exempt a tool family, add it in a user/system policy file:
|
|
106
|
+
#
|
|
107
|
+
# [[loop_detection_rule]]
|
|
108
|
+
# name = "ignore my diagnostic tools"
|
|
109
|
+
# toolName = ["my_diag_*", "my_probe"]
|
|
110
|
+
# action = "ignore_as_evidence"
|
|
111
|
+
# priority = 500
|